mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
op/clip: replace Rect and RoundRect with Rect type
Remembering the order of the corners in the RoundRect is difficult, which suggest that RoundRect should be a struct with named fields. Do that, and make Rect the special case where corner radii are all zero. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -249,7 +249,7 @@ func (l *List) layout() Dimensions {
|
||||
}
|
||||
var stack op.StackOp
|
||||
stack.Push(ops)
|
||||
clip.Rect(ops, toRectF(r)).Add(ops)
|
||||
clip.Rect{Rect: toRectF(r)}.Op(ops).Add(ops)
|
||||
op.TransformOp{}.Offset(toPointF(axisPoint(l.Axis, pos, cross))).Add(ops)
|
||||
child.macro.Add(ops)
|
||||
stack.Pop()
|
||||
|
||||
Reference in New Issue
Block a user