Hi all,
Plese visit this link.
http://x480118.cpinet.jp/Version0/edit_page1.php
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[10]; //here i have divided the width by scaleX value
high = high / parentArr[11];//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[7];//this is the previously saved rotation value
GL.mcRef.graphics.clear();
GL.mcRef.graphics.lineStyle(GL.lineStyleRect, GL.lineColorRect, 1.0);
GL.mcRef.graphics.beginFill(GL.fillColorRect, 1.0);
GL.mcRef.graphics.drawRect(0, 0, wid, high);
GL.mcRef.x = parentArr[8];
GL.mcRef.y = parentArr[9];
GL.mcRef.graphics.endFill();
GL.mcRef.scaleX = parentArr[10];//the scaleX
GL.mcRef.scaleY = parentArr[11];//the scaleY
Main.instance.drawArea_mc.addChildAt( GL.mcDrawing, 2);//adding to the stage
This is argent please share your idea.
Thanks in advance
PROB