Ok, "this.rotation" compiles. Since the application used the rotation matrix to calculate the new coordinates of some intersection points, I think I'll probably have to construct a rotation matrix from the angle. Otherwise, I wanted to try to use AdvancedLayoutFeatures, but could not find an example on how to integrate it with my UIComponent
On Mon, 3 Oct 2022 at 02:40, Greg Dove <[email protected]> wrote: > > Assuming the angle is in radians, you might be able to simply use: > > this.rotation = Math.round(angle * 180/Math.PI); > > otherwise you could try setting this.element.style.transform to a matrix > string, something like: > > this.element.style.transform > ='matrix('+m.a+','+m.b+','+m.c+','+m.d+','+m.tx+','+m.ty+')'; > > you probably would also need to set: > this.element.style.transformOrigin = '0 0'; > in this latter case. > > This might help, but probably the getter values for x,y, width and height > could be inconsistent with the results from the original native flash api > that flex uses. > > > > > On Mon, Oct 3, 2022 at 12:32 PM CapitanoG76 <[email protected]> wrote: > >> Hello, >> >> I am porting a Flex application into Royale in order to transpile to >> Javascript. >> >> The application had some graphical elements which extended UIComponent >> and were added as children to an mx.containers.Canvas. >> I was using UIComponent.transform.matrix to rotate the elements, however >> in Royale UIComponent does not have the transform property anymore. >> >> Is there any way I can apply rotation/translation to my elements? I'd >> need to write code similar to >> >> var m:Matrix = new Matrix(); >> m.rotate(angle); >> this.transform.matrix = m; >> >> Thanks, >> Marco >> >
