# Argent help needed

**URL:** <https://forum.kirupa.com/t/argent-help-needed/290884>\
**Category:** Uncategorized\
**Created:** [June 21, 2009, 6:30pm UTC](https://forum.kirupa.com/t/argent-help-needed/290884 "2009-06-21T18:30:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![probphp](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@probphp](https://forum.kirupa.com/u/probphp)\
**Post date:** [June 21, 2009, 6:30pm UTC](https://forum.kirupa.com/t/argent-help-needed/290884/1 "2009-06-21T18:30:37Z")

</div>

Hi all,

Plese visit this link.  
[http://x480118.cpinet.jp/Version0/edit\_page1.php](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
