Introduction to flex plot Functions

Source: Internet
Author: User

I have very little access to the graph class of Flex. This time I just tried to draw a border for a pair of images.

But record it. After all, it is the first time to use the flex plotting class.

At that time, we wanted to draw a stroke for an image,CodeThe test results are as follows:

Private function imageclickhandle (EVT: mouseevent): void
{

Rectangle = new uicomponent (); // defines a rectangle.
Imagecanvas. addchild (rectangle); // Add this rectangle to the parent container where the image is to be drawn.
Imagecanvas. setchildindex (imagecanvas. getchildat (imagecanvas. numChildren-1), 0); // place the rectangle to the bottom of the border, so that the middle part is covered by the graph.
Rectangle. Graphics. beginfill (0xbbdb00, 0.3); // set the color and Alpha value (transparency)
Rectangle. graphics. drawrect (EVT. currenttarget. x, EVT. currenttarget. y, (EVT. currenttarget. width), (EVT. currenttarget. height); // call the graphics class to draw
Rectangle. Graphics. endfill (); // The painting is complete.

}

 

Finally, a summary http://www.cssflex.com/huatu.asp for the drawing class is recommended.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.