Is there a way to rotate a `Path` object in compos...
# compose-desktop
r
Is there a way to rotate a
Path
object in compose-desktop whilst pivoting at the center? The only transformation method that exists in the
Path
object is
translate
which internally converts the path object to a skija path and applies matrix transformation to it by calling
Matrix33.makeTranslate
. I tried to use the
Matrix33.makeRotate
method in this class but it only accepts an angle in degrees without a pivot.
r
You can use
Canvas
APIs for this
i.e.
Canvas.translate()
to the pivot point,
Canvas.rotate()
, and
Canvas.translate()
back to the original position
r
hmm I don't want to use canvas rotations this time. I'm iterating through a list of paths and drawing them sequentially so I thought manipulating the path objects would be more feasible.