mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
all: remove redundant op.TransformOp.Offset
Use op.Offset instead, or create and manipulate a f32.Affine2D.
API change. Update your code with a gofmt rule:
gofmt -r 'op.TransformOp{}.Offset -> op.Offset'
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -405,7 +405,7 @@ func (e *Editor) PaintText(gtx layout.Context) {
|
||||
clip.Max = clip.Max.Add(e.viewSize)
|
||||
for _, shape := range e.shapes {
|
||||
stack := op.Push(gtx.Ops)
|
||||
op.TransformOp{}.Offset(shape.offset).Add(gtx.Ops)
|
||||
op.Offset(shape.offset).Add(gtx.Ops)
|
||||
shape.clip.Add(gtx.Ops)
|
||||
paint.PaintOp{Rect: layout.FRect(clip).Sub(shape.offset)}.Add(gtx.Ops)
|
||||
stack.Pop()
|
||||
|
||||
Reference in New Issue
Block a user