forked from joejulian/gio
f32: replace Affine2D{} with AffineId() for identity transformations
References: https://todo.sr.ht/~eliasnaur/gio/655 Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu> Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
committed by
Elias Naur
parent
78b54615cc
commit
4e5a344cc2
@@ -581,12 +581,10 @@ func ArcTransform(p, f1, f2 f32.Point, angle float32) (transform f32.Affine2D, s
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
θ = angle / float32(segments)
|
||||
ref f32.Affine2D // transform from absolute frame to ellipse-based one
|
||||
rot f32.Affine2D // rotation matrix for each segment
|
||||
inv f32.Affine2D // transform from ellipse-based frame to absolute one
|
||||
)
|
||||
θ := angle / float32(segments)
|
||||
ref := f32.AffineId() // transform from absolute frame to ellipse-based one
|
||||
rot := f32.AffineId() // rotation matrix for each segment
|
||||
inv := f32.AffineId() // transform from ellipse-based frame to absolute one
|
||||
center := f32.Point{
|
||||
X: 0.5 * (f1.X + f2.X),
|
||||
Y: 0.5 * (f1.Y + f2.Y),
|
||||
|
||||
Reference in New Issue
Block a user