1Template::Plugin::GD::PUosleyrgoCno(n3t)ributed Perl DocTuemmepnltaattei:o:nPlugin::GD::Polygon(3)
2
3
4

NAME

6       Template::Plugin::GD::Polygon - Interface to GD module Polygon class
7

SYNOPSIS

9           [% USE poly = GD.Polygon;
10              poly.addPt(50,0);
11              poly.addPt(99,99);
12           %]
13

EXAMPLES

15           [% FILTER null;
16               USE im   = GD.Image(100,100);
17               USE c    = GD.Constants;
18
19               # allocate some colors
20               white = im.colorAllocate(255,255,255);
21               black = im.colorAllocate(0,  0,  0);
22               red   = im.colorAllocate(255,0,  0);
23               blue  = im.colorAllocate(0,  0,255);
24               green = im.colorAllocate(0,  255,0);
25
26               # make the background transparent and interlaced
27               im.transparent(white);
28               im.interlaced('true');
29
30               # Put a black frame around the picture
31               im.rectangle(0,0,99,99,black);
32
33               # Draw a blue oval
34               im.arc(50,50,95,75,0,360,blue);
35
36               # And fill it with red
37               im.fill(50,50,red);
38
39               # Draw a blue triangle by defining a polygon
40               USE poly = GD.Polygon;
41               poly.addPt(50,0);
42               poly.addPt(99,99);
43               poly.addPt(0,99);
44               im.filledPolygon(poly, blue);
45
46               # Output binary image in PNG format
47               im.png | stdout(1);
48              END;
49           -%]
50

DESCRIPTION

52       The GD.Polygon plugin provides an interface to GD.pm's GD::Polygon
53       class.
54
55       See GD for a complete description of the GD library and all the methods
56       that can be called via the GD.Polygon plugin.  See
57       Template::Plugin::GD::Image for the main interface to the GD functions.
58       See Template::Plugin::GD::Constants for a plugin that allows you access
59       to GD.pm's constants.
60

AUTHOR

62       Thomas Boutell wrote the GD graphics library.
63
64       Lincoln D. Stein wrote the Perl GD modules that interface to it.
65
66       Craig Barratt <craig@arraycomm.com> wrote the original GD plugins for
67       the Template Toolkit (2001).
68
69       Andy Wardley <abw@cpan.org> extracted them from the TT core into a
70       separate distribution for TT version 2.15.
71
73       Copyright (C) 2001 Craig Barratt <craig@arraycomm.com>, 2006 Andy
74       Wardley <abw@cpan.org>.
75
76       The GD.pm interface is copyright 1995-2000, Lincoln D. Stein.
77
78       This module is free software; you can redistribute it and/or modify it
79       under the same terms as Perl itself.
80

SEE ALSO

82       Template::Plugin::GD, Template::Plugin::GD::Image, GD
83
84
85
86perl v5.36.0                      2023-01-20  Template::Plugin::GD::Polygon(3)
Impressum