op/clip: split Rect into pixel-aligned Rect and rounded RRect

The pixel-aligned Rect is more efficient and easier to use in the common case
of layout clipping.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-07-09 18:06:00 +02:00
parent 4818538ef8
commit d572aa23ac
14 changed files with 105 additions and 116 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ func (l *List) layout() Dimensions {
Max: axisPoint(l.Axis, max, inf),
}
stack := op.Push(ops)
clip.Rect{Rect: FRect(r)}.Add(ops)
clip.Rect(r).Add(ops)
op.Offset(FPt(axisPoint(l.Axis, pos, cross))).Add(ops)
child.call.Add(ops)
stack.Pop()