Flex custom dotted line

Source: Internet
Author: User
Package COM. tjsoft. utils {import MX. core. uicomponent; public class graphicsutil {public function graphicsutil () {}/ *** draw a dotted line * @ Param U specify the container to draw a dotted line * @ Param W specify the length (spacing) of the dotted line) * @ Param UW specifies the total length of the dotted line * @ author LHY 2011-11-11 */public static function drawvirtualline (U: uicomponent, W: Number, UW: Number): void {u. graphics. clear (); // clear the drawing drawn to this graphics object, and reset the fill and line style settings. U. graphics. linestyle (1, 0xa0a4a7, 1); // specify a line style var width: Number = 0; var I: Int = 0; while (width <UW) {u. graphics. moveTo (0 + 2 * w * I, 0); U. graphics. lineto (0 + W + 2 * w * I, 0); width + = W * 2; I ++ ;}}}}

:

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.