GD :: Arrow. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~tcaine/
GD :: Arrow. ű×
GD :: Arrow. ¼³¸í
GD¸¦ »ç¿ëÇÏ¿© È»ìÇ¥¸¦ ±×¸³´Ï´Ù GD :: Arrow´Â GD :: PolygonÀÇ Perl ¼ºê Ŭ·¡½ºÀÔ´Ï´Ù. GD :: È»ìÇ¥¸¦ »ç¿ëÇϽʽÿÀ. ³» $ ³Êºñ = 8; My ($ x1, $ y1) = (100, 10); My ($ x2, $ y2) = (100, 190); ³» ($ x3, $ y3) = (10, 30); My ($ x4, $ y4) = (190, 75); MY $ how = gd :: arrow :: full -> new (-x1 => $ x1, -y1 => $ y1, -x2 => $ x2, -y2 => $ y2, -width => $ ³Êºñ, ); ³» $ image = gd :: À̹ÌÁö -> new (200, 200); MY $ WHITE = $ IMAGE-> colorAllocate (255, 255, 255); MY $ BLACK = $ IMAGE-> colorAllocate (0, 0, 0); ³» $ BLUE = $ IMAGE-> colorAllocate (0, 0, 255); ³» $ Yellow = $ Image-> colorAllocate (255, 255, 0); $ image-> Åõ¸í ($ white); $ IMAGE-> BUFFPLYGON ($ È»ìÇ¥, $ blue); $ image-> polygon ($ È»ìÇ¥, $ black); MY $ half_arrow_1 = GD :: Arrow :: Lefthalf-> new (-x1 => $ x3, -y1 => $ y3, -x2 => $ x4, -y2 => $ y4, -width => $ ³Êºñ, ); MY $ half_arrow_2 = gd :: arrow :: Lefthalf-> new (-x1 => $ x4, -y1 => $ y4, -x2 => $ x3, -y2 => $ y3, -width => $ ³Êºñ) ...¿¡ $ image-> buefpolygon ($ half_arrow_1, $ blue); $ image-> polygon ($ half_arrow_1, $ black); $ image-> buefpolygon ($ half_arrow_2, $ yellow); $ image-> polygon ($ half_arrow_2, $ black); À̹ÌÁö, "> image.png"¶Ç´Â Die $!; binmode (À̹ÌÁö, ": raw"); Àμâ À̹ÌÁö Àμâ -> png; À̹ÌÁö¸¦ ´Ý½À´Ï´Ù; Ãⱸ (0); ¿ä±¸ »çÇ× : ¡¤ Perl.
GD :: Arrow. °ü·Ã ¼ÒÇÁÆ®¿þ¾î