Playing with Graphics in Flex
Posted
by Anoop
on Stack Overflow
See other posts from Stack Overflow
or by Anoop
Published on 2010-02-17T08:10:25Z
Indexed on
2010/05/20
19:50 UTC
Read the original article
Hit count: 283
Hi All,
I was just going through one code used to draw one chart. This code is written in the updateDisplayList of the itemrenderer of column chart. I am not good at the graphics part of flex. Can anybody please explain me what this code is doing. I can see the final output, but am not sure how is this achieved.
var rc:Rectangle = new Rectangle(0, 0, width , height );
var g:Graphics = graphics;
g.clear();
g.moveTo(rc.left,rc.top);
g.beginFill(fill);
g.lineTo(rc.right,rc.top);
g.lineTo(rc.right,rc.bottom);
g.lineTo(rc.left,rc.bottom);
g.lineTo(rc.left,rc.top);
g.endFill();
Regards, PK
© Stack Overflow or respective owner