mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
gpu, io/router, op: use f32.Affine2D instead of op.TransformOp for transforms
Encode TransformOp as an Affince2D matrix instead and use that in gpu and io transform handling. There are no changes to user facing API and so far only the offset part of the matrix is used. This patch is a step towards full affine transformations. Signed-off-by: Viktor <viktor.ogeman@gmail.com>
This commit is contained in:
+3
-3
@@ -69,7 +69,7 @@ type drawOps struct {
|
||||
|
||||
type drawState struct {
|
||||
clip f32.Rectangle
|
||||
t op.TransformOp
|
||||
t f32.Affine2D
|
||||
cpath *pathOp
|
||||
rect bool
|
||||
z int
|
||||
@@ -691,8 +691,8 @@ loop:
|
||||
case opconst.TypeProfile:
|
||||
d.profile = true
|
||||
case opconst.TypeTransform:
|
||||
dop := ops.DecodeTransformOp(encOp.Data)
|
||||
state.t = state.t.Multiply(op.TransformOp(dop))
|
||||
dop := ops.DecodeTransform(encOp.Data)
|
||||
state.t = state.t.Mul(dop)
|
||||
case opconst.TypeAux:
|
||||
aux = encOp.Data[opconst.TypeAuxLen:]
|
||||
auxKey = encOp.Key
|
||||
|
||||
Reference in New Issue
Block a user