Need to create a diagram(rectangle) in Flex app using svg

I need to create a diagram(rectangle) in Flex, I can read the svg into an array of points, I need to create a rectangle from those points.

Here is the svg in a file

<g id="rectangle" transform="translate(18.9296,-1.5)">
                    <path d="M0 153.75 L,71.77 153.75 L,71.77 3 L,0 3 L,0 153.75 L,0 153.75" class="st1"/>

my points array
0 153.75  -- Move point
71.77 153.75
71.77  3
0  3
0  153.75
0  153.75

I still need to parse the transform, but I initialy I needed help in creating a diagram(in this case rectangle) from the above points x and y coordinates
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

danyul_cConnect With a Mentor Commented:
What you are going to want to do is to separate your array of points into your initial x and y positions (in this case I would say 0, 3) and then the width and height (71.77, 150.75).

Then you can draw it with the code I've written below.

If you don't want a line or dont want a fill simply leave those lines out.
var rect:UIComponent = new UIComponent(); //Or whatever fill colour, 0x000000) //Again choose your own line thickness and colour, 3, 71.77, 150.75);;

Open in new window

All Courses

From novice to tech pro — start learning today.