Gd :: arrow Classement & Résumé
- Licence:
- Perl Artistic License
- Nom de l'éditeur:
- Todd Caine
- Site Internet de l'éditeur:
- http://search.cpan.org/~tcaine/
Gd :: arrow Mots clés
Gd :: arrow La description
Dessinez des flèches à l'aide de GD Gd :: arrow est une sous-classe Perl de GD :: Polygon utilisée pour dessiner une flèche entre deux sommets.Synopsis Utilisez GD; Utilisez gd :: arrow; ma largeur $ = 8; mon ($ x1, $ y1) = (100, 10); mon ($ x2, $ y2) = (100, 190); mon ($ x3, $ y3) = (10, 30); mon ($ x4, $ y4) = (190, 75); My $ arrow = gd :: arrow :: complet-> nouveau (-x1 => x1, -y1 => $ y1, -x2 => $ x2, -y2 => $ x2, -y2 => $ x2, -width => width => $ width, ); ma $ image = gd :: image-> nouvelle (200, 200); mon $ blanc = $ image-> colorAllocate (255, 255, 255); mon dollar noir = $ image-> colorAllocate (0, 0, 0); mon $ bleu = $ image-> colorAllocate (0, 0, 255); mon $ jaune = $ image-> coloralis (255, 255, 0); $ image-> transparent ($ blanc); $ image-> rempliPolygon ($ flèche, $ bleue); $ image-> polygone (flèche $, $ noir); My $ Half_ARrow_1 = gd :: arrow :: Lefthalf-> Nouveau (-X1 => x3 $, -Y1 => $ y3, -x2 => $ x4, -y2 => $ x4, -width => $ => $ ); My $ Half_ARrow_2 = gd :: arrow :: Lefthalf-> nouveau (-x1 => x4 $, -Y1 => $ y4, -x2 => $ x3, -y2 => $ x3, -width => width => width) ; $ image-> rempliPolygon ($ demi_arrow_1, $ bleue); $ image-> polygone ($ demi_arrow_1, $ noir); $ image-> rempliPolygon ($ demi_arrow_2, $ jaune); $ image-> polygone ($ demi_arrow_2, $ noir); Image ouverte, "> image.png" ou die $!; binmode (image, ": brut"); Image imprimer $ image-> png; Fermer l'image; sortie (0); Exigences: · Perl
Gd :: arrow Logiciels associés