Plese visit this link.
If you press on “LayoutEditor” button,
will open an drawing api.
if you draw a rectangle and stretch it.
after stretch if you rotate it and press the “Save”
button the information is being saved well with the correct data,
but when it is redrawing the rectangle
with the saved data it is not drawing well.
without rotation it is drawing well.
but problem is when you rotate the object and after save redraw it.
i thing my calculation is wrong when trying to redraw it.
my calculation is as follows:
wid = wid / parentArr; //here i have divided the width by scaleX value
high = high / parentArr;//divided the width by scaleY value
wid = wid - GL.lineStyleRect;//the line thickness
high = high - GL.lineStyleRect;
GL.mcDrawing = new Sprite();
GL.mcDrawing.buttonMode = true;
GL.mcDrawing.name = name;
GL.mcRef = GL.mcDrawing;
GL.mcDrawing.rotation = parentArr;//this is the previously saved rotation value
GL.mcRef.graphics.lineStyle(GL.lineStyleRect, GL.lineColorRect, 1.0);
GL.mcRef.graphics.drawRect(0, 0, wid, high);
GL.mcRef.x = parentArr;
GL.mcRef.y = parentArr;
GL.mcRef.scaleX = parentArr;//the scaleX
GL.mcRef.scaleY = parentArr;//the scaleY
Main.instance.drawArea_mc.addChildAt( GL.mcDrawing, 2);//adding to the stage
This is argent please share your idea.
Thanks in advance