I’m developing a plugin for AdobeXD and am trying to apply a matrix on a new rectangle.
// Creating new rectangle const newRect = new Rectangle() newRect.width = 315 newRect.height = 910 newRect.fill = new Color('red') // Trying to apply transform - always fails let transform = newRect.transform const matrix = mockupScreen.transform.clone() // Getting the matrix from the mockupScreen variable, which is a Path transform.add(matrix) // Adding newRect to the selection selection.insertionParent.addChild(newRect) newRect.moveInParentCoordinates(10, 10)
However, nothing happens with any transform method that I try to apply to my newRect. Is there a way to apply a matrix to a rectangle?
If not, is there a function from the plugin API I can use to rotate around the X and/or Y axis (aka applying 3d transform), other than the rotateAround function which rotates around the Z axis?
Thanks for your help!