mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
f32: replace Affine2D{} with AffineId() for identity transformations
Reduces ambiguity by introducing AffineId() for representing identity transformation matrices. References: https://todo.sr.ht/~eliasnaur/gio/655 Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
This commit is contained in:
committed by
Elias Naur
parent
3e601e73c4
commit
d76b4272aa
@@ -183,7 +183,7 @@ func (c CallOp) Add(o *Ops) {
|
||||
// Offset converts an offset to a TransformOp.
|
||||
func Offset(off image.Point) TransformOp {
|
||||
offf := f32.Pt(float32(off.X), float32(off.Y))
|
||||
return Affine(f32.Affine2D{}.Offset(offf))
|
||||
return Affine(f32.AffineId().Offset(offf))
|
||||
}
|
||||
|
||||
// Affine creates a TransformOp representing the transformation a.
|
||||
|
||||
Reference in New Issue
Block a user