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:
Elias Naur
2020-06-21 22:41:56 +02:00
parent 9e3d3b6f58
commit 878131189b
11 changed files with 29 additions and 35 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ func (f Flex) Layout(gtx Context, children ...FlexChild) Dimensions {
}
}
stack := op.Push(gtx.Ops)
op.TransformOp{}.Offset(FPt(axisPoint(f.Axis, mainSize, cross))).Add(gtx.Ops)
op.Offset(FPt(axisPoint(f.Axis, mainSize, cross))).Add(gtx.Ops)
child.call.Add(gtx.Ops)
stack.Pop()
mainSize += axisMain(f.Axis, dims.Size)