func (b *ProgressBar) PaintProgress(c gxui.Canvas, r math.Rect, frac float32) { r.Max.X = math.Lerp(r.Min.X, r.Max.X, frac) c.DrawRect(r, gxui.CreateBrush(gxui.Gray50)) c.Push() c.AddClip(r) c.DrawCanvas(b.chevrons, math.Point{X: b.scroll}) c.Pop() }
func (p *PaintChildren) Paint(c gxui.Canvas) { for i, v := range p.outer.Children() { if v.Control.IsVisible() { c.Push() c.AddClip(v.Control.Size().Rect().Offset(v.Offset)) p.outer.PaintChild(c, v, i) c.Pop() } } }