diff options
Diffstat (limited to 'lib/Template/Plugin/GD')
| -rw-r--r-- | lib/Template/Plugin/GD/Constants.pm | 138 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Graph/area.pm | 148 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Graph/bars.pm | 191 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Graph/bars3d.pm | 166 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Graph/lines.pm | 178 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Graph/lines3d.pm | 166 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Graph/linespoints.pm | 158 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Graph/mixed.pm | 176 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Graph/pie.pm | 141 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Graph/pie3d.pm | 145 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Graph/points.pm | 155 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Image.pm | 184 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Polygon.pm | 155 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Text.pm | 140 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Text/Align.pm | 147 | ||||
| -rw-r--r-- | lib/Template/Plugin/GD/Text/Wrap.pm | 183 |
16 files changed, 0 insertions, 2571 deletions
diff --git a/lib/Template/Plugin/GD/Constants.pm b/lib/Template/Plugin/GD/Constants.pm deleted file mode 100644 index 6fc8e7c..0000000 --- a/lib/Template/Plugin/GD/Constants.pm +++ /dev/null @@ -1,138 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Constants -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD constants -# in the GD.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: Constants.pm,v 1.55 2004/01/13 16:20:46 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Constants; - -require 5.004; - -use strict; -use GD qw(/^gd/ /^GD/); -use Template::Plugin; -use base qw( Template::Plugin ); -use vars qw( @ISA $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.55 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - my $self = { }; - bless $self, $class; - - # - # GD has exported various gd* and GD_* contstants. Find them. - # - foreach my $v ( keys(%Template::Plugin::GD::Constants::) ) { - $self->{$v} = eval($v) if ( $v =~ /^gd/ || $v =~ /^GD_/ ); - } - return $self; -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Constants - Interface to GD module constants - -=head1 SYNOPSIS - - [% USE gdc = GD.Constants %] - - # --> the constants gdc.gdBrushed, gdc.gdSmallFont, gdc.GD_CMP_IMAGE - # are now available - -=head1 EXAMPLES - - [% FILTER null; - USE gdc = GD.Constants; - USE im = GD.Image(200,100); - black = im.colorAllocate(0 ,0, 0); - red = im.colorAllocate(255,0, 0); - r = im.string(gdc.gdLargeFont, 10, 10, "Large Red Text", red); - im.png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Constants plugin provides access to the various GD module's -constants (such as gdBrushed, gdSmallFont, gdTransparent, GD_CMP_IMAGE -etc). When GD.pm is used in perl it exports various contstants -into the caller's namespace. This plugin makes those exported -constants available as template variables. - -See L<Template::Plugin::GD::Image> and L<GD> for further examples and -details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -Lincoln D. Stein wrote the GD.pm interface to the GD library. - - -=head1 VERSION - -1.55, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -The GD.pm interface is copyright 1995-2000, Lincoln D. Stein. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Image|Template::Plugin::GD::Image>, L<Template::Plugin::GD::Polygon|Template::Plugin::GD::Polygon>, L<GD|GD> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Graph/area.pm b/lib/Template/Plugin/GD/Graph/area.pm deleted file mode 100644 index d09d024..0000000 --- a/lib/Template/Plugin/GD/Graph/area.pm +++ /dev/null @@ -1,148 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Graph::area -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Graph::area -# package in the GD::Graph.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: area.pm,v 1.57 2004/01/13 16:20:51 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Graph::area; - -require 5.004; - -use strict; -use GD::Graph::area; -use Template::Plugin; -use base qw( GD::Graph::area Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.57 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return $class->SUPER::new(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - - -sub set_legend -{ - my $self = shift; - - $self->SUPER::set_legend(ref $_[0] ? @{$_[0]} : @_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Graph::area - Create area graphs with axes and legends - -=head1 SYNOPSIS - - [% USE g = GD.Graph.area(x_size, y_size); %] - -=head1 EXAMPLES - - [% FILTER null; - data = [ - ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"], - [ 5, 12, 24, 33, 19, 8, 6, 15, 21], - [ -1, -2, -5, -6, -3, 1.5, 1, 1.3, 2] - ]; - - USE my_graph = GD.Graph.area(); - my_graph.set( - two_axes => 1, - zero_axis => 1, - transparent => 0, - ); - my_graph.set_legend('left axis', 'right axis' ); - my_graph.plot(data).png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Graph.area plugin provides an interface to the GD::Graph::area -class defined by the GD::Graph module. It allows one or more (x,y) data -sets to be plotted as lines with the area between the line and x-axis -shaded, in addition to axes and legends. - -See L<GD::Graph> for more details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Graph module was written by Martien Verbruggen. - - -=head1 VERSION - -1.57, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Graph is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Graph::lines|Template::Plugin::GD::Graph::lines>, L<Template::Plugin::GD::Graph::lines3d|Template::Plugin::GD::Graph::lines3d>, L<Template::Plugin::GD::Graph::bars|Template::Plugin::GD::Graph::bars>, L<Template::Plugin::GD::Graph::bars3d|Template::Plugin::GD::Graph::bars3d>, L<Template::Plugin::GD::Graph::points|Template::Plugin::GD::Graph::points>, L<Template::Plugin::GD::Graph::linespoints|Template::Plugin::GD::Graph::linespoints>, L<Template::Plugin::GD::Graph::mixed|Template::Plugin::GD::Graph::mixed>, L<Template::Plugin::GD::Graph::pie|Template::Plugin::GD::Graph::pie>, L<Template::Plugin::GD::Graph::pie3d|Template::Plugin::GD::Graph::pie3d>, L<GD::Graph|GD::Graph> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Graph/bars.pm b/lib/Template/Plugin/GD/Graph/bars.pm deleted file mode 100644 index 9bc08c5..0000000 --- a/lib/Template/Plugin/GD/Graph/bars.pm +++ /dev/null @@ -1,191 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Graph::bars -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Graph::bars -# package in the GD::Graph.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: bars.pm,v 1.57 2004/01/13 16:20:56 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Graph::bars; - -require 5.004; - -use strict; -use GD::Graph::bars; -use Template::Plugin; -use base qw( GD::Graph::bars Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.57 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return $class->SUPER::new(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - - -sub set_legend -{ - my $self = shift; - - $self->SUPER::set_legend(ref $_[0] ? @{$_[0]} : @_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Graph::bars - Create bar graphs with axes and legends - -=head1 SYNOPSIS - - [% USE g = GD.Graph.bars(x_size, y_size); %] - -=head1 EXAMPLES - - [% FILTER null; - data = [ - ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"], - [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4], - ]; - - USE my_graph = GD.Graph.bars(); - - my_graph.set( - x_label => 'X Label', - y_label => 'Y label', - title => 'A Simple Bar Chart', - y_max_value => 8, - y_tick_number => 8, - y_label_skip => 2, - - # shadows - bar_spacing => 8, - shadow_depth => 4, - shadowclr => 'dred', - - transparent => 0, - ); - my_graph.plot(data).png | stdout(1); - END; - -%] - - [% FILTER null; - data = [ - ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"], - [ 5, 12, 24, 33, 19, 8, 6, 15, 21], - [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4], - ]; - - USE my_graph = GD.Graph.bars(); - - my_graph.set( - x_label => 'X Label', - y_label => 'Y label', - title => 'Two data sets', - - # shadows - bar_spacing => 8, - shadow_depth => 4, - shadowclr => 'dred', - - long_ticks => 1, - y_max_value => 40, - y_tick_number => 8, - y_label_skip => 2, - bar_spacing => 3, - - accent_treshold => 200, - - transparent => 0, - ); - my_graph.set_legend( 'Data set 1', 'Data set 2' ); - my_graph.plot(data).png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Graph.bars plugin provides an interface to the GD::Graph::bars -class defined by the GD::Graph module. It allows one or more (x,y) data -sets to be plotted with each point represented by a bar, in addition -to axes and legends. - -See L<GD::Graph> for more details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Graph module was written by Martien Verbruggen. - - -=head1 VERSION - -1.57, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Graph is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Graph::lines|Template::Plugin::GD::Graph::lines>, L<Template::Plugin::GD::Graph::lines3d|Template::Plugin::GD::Graph::lines3d>, L<Template::Plugin::GD::Graph::bars3d|Template::Plugin::GD::Graph::bars3d>, L<Template::Plugin::GD::Graph::points|Template::Plugin::GD::Graph::points>, L<Template::Plugin::GD::Graph::linespoints|Template::Plugin::GD::Graph::linespoints>, L<Template::Plugin::GD::Graph::area|Template::Plugin::GD::Graph::area>, L<Template::Plugin::GD::Graph::mixed|Template::Plugin::GD::Graph::mixed>, L<Template::Plugin::GD::Graph::pie|Template::Plugin::GD::Graph::pie>, L<Template::Plugin::GD::Graph::pie3d|Template::Plugin::GD::Graph::pie3d>, L<GD::Graph|GD::Graph> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Graph/bars3d.pm b/lib/Template/Plugin/GD/Graph/bars3d.pm deleted file mode 100644 index 79a930b..0000000 --- a/lib/Template/Plugin/GD/Graph/bars3d.pm +++ /dev/null @@ -1,166 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Graph::bars3d -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Graph::bars3d -# package in the GD::Graph3D.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: bars3d.pm,v 1.57 2004/01/13 16:20:56 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Graph::bars3d; - -require 5.004; - -use strict; -use GD::Graph::bars3d; -use Template::Plugin; -use base qw( GD::Graph::bars3d Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.57 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return $class->SUPER::new(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - - -sub set_legend -{ - my $self = shift; - - $self->SUPER::set_legend(ref $_[0] ? @{$_[0]} : @_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Graph::bars3d - Create 3D bar graphs with axes and legends - -=head1 SYNOPSIS - - [% USE g = GD.Graph.bars3d(x_size, y_size); %] - -=head1 EXAMPLES - - [% FILTER null; - data = [ - ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", - "Sep", "Oct", "Nov", "Dec", ], - [-5, -4, -3, -3, -1, 0, 2, 1, 3, 4, 6, 7], - [4, 3, 5, 6, 3,1.5, -1, -3, -4, -6, -7, -8], - [1, 2, 2, 3, 4, 3, 1, -1, 0, 2, 3, 2], - ]; - - USE my_graph = GD.Graph.bars3d(); - - my_graph.set( - x_label => 'Month', - y_label => 'Measure of success', - title => 'A 3d Bar Chart', - - y_max_value => 8, - y_min_value => -8, - y_tick_number => 16, - y_label_skip => 2, - box_axis => 0, - line_width => 3, - zero_axis_only => 1, - x_label_position => 1, - y_label_position => 1, - - x_label_skip => 3, - x_tick_offset => 2, - - transparent => 0, - ); - my_graph.set_legend("Us", "Them", "Others"); - my_graph.plot(data).png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Graph.bars3d plugin provides an interface to the GD::Graph::bars3d -class defined by the GD::Graph3d module. It allows one or more (x,y) data -sets to be plotted as y versus x bars with a 3-dimensional appearance, -together with axes and legends. - -See L<GD::Graph3d> for more details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Graph3d module was written by Jeremy Wadsack. - - -=head1 VERSION - -1.57, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Graph3d is copyright (C) 1999,2000 Wadsack-Allen. All Rights Reserved. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Graph::lines|Template::Plugin::GD::Graph::lines>, L<Template::Plugin::GD::Graph::lines3d|Template::Plugin::GD::Graph::lines3d>, L<Template::Plugin::GD::Graph::bars|Template::Plugin::GD::Graph::bars>, L<Template::Plugin::GD::Graph::points|Template::Plugin::GD::Graph::points>, L<Template::Plugin::GD::Graph::linespoints|Template::Plugin::GD::Graph::linespoints>, L<Template::Plugin::GD::Graph::area|Template::Plugin::GD::Graph::area>, L<Template::Plugin::GD::Graph::mixed|Template::Plugin::GD::Graph::mixed>, L<Template::Plugin::GD::Graph::pie|Template::Plugin::GD::Graph::pie>, L<Template::Plugin::GD::Graph::pie3d|Template::Plugin::GD::Graph::pie3d>, L<GD::Graph|GD::Graph>, L<GD::Graph3d|GD::Graph3d> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Graph/lines.pm b/lib/Template/Plugin/GD/Graph/lines.pm deleted file mode 100644 index 678cc64..0000000 --- a/lib/Template/Plugin/GD/Graph/lines.pm +++ /dev/null @@ -1,178 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Graph::lines -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Graph::lines -# package in the GD::Graph.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: lines.pm,v 1.57 2004/01/13 16:20:56 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Graph::lines; - -require 5.004; - -use strict; -use GD::Graph::lines; -use Template::Plugin; -use base qw( GD::Graph::lines Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.57 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return $class->SUPER::new(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - - -sub set_legend -{ - my $self = shift; - - $self->SUPER::set_legend(ref $_[0] ? @{$_[0]} : @_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Graph::lines - Create line graphs with axes and legends - -=head1 SYNOPSIS - - [% USE g = GD.Graph.lines(x_size, y_size); %] - -=head1 EXAMPLES - - [% FILTER null; - USE g = GD.Graph.lines(300,200); - x = [1, 2, 3, 4]; - y = [5, 4, 2, 3]; - g.set( - x_label => 'X Label', - y_label => 'Y label', - title => 'Title' - ); - g.plot([x, y]).png | stdout(1); - END; - -%] - - [% FILTER null; - data = [ - ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", - "Sep", "Oct", "Nov", "Dec", ], - [-5, -4, -3, -3, -1, 0, 2, 1, 3, 4, 6, 7], - [4, 3, 5, 6, 3,1.5, -1, -3, -4, -6, -7, -8], - [1, 2, 2, 3, 4, 3, 1, -1, 0, 2, 3, 2], - ]; - - USE my_graph = GD.Graph.lines(); - - my_graph.set( - x_label => 'Month', - y_label => 'Measure of success', - title => 'A Simple Line Graph', - - y_max_value => 8, - y_min_value => -8, - y_tick_number => 16, - y_label_skip => 2, - box_axis => 0, - line_width => 3, - zero_axis_only => 1, - x_label_position => 1, - y_label_position => 1, - - x_label_skip => 3, - x_tick_offset => 2, - - transparent => 0, - ); - my_graph.set_legend("Us", "Them", "Others"); - my_graph.plot(data).png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Graph.lines plugin provides an interface to the GD::Graph::lines -class defined by the GD::Graph module. It allows one or more (x,y) data -sets to be plotted as y versus x lines with axes and legends. - -See L<GD::Graph> for more details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Graph module was written by Martien Verbruggen. - - -=head1 VERSION - -1.57, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Graph is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Graph::lines3d|Template::Plugin::GD::Graph::lines3d>, L<Template::Plugin::GD::Graph::bars|Template::Plugin::GD::Graph::bars>, L<Template::Plugin::GD::Graph::bars3d|Template::Plugin::GD::Graph::bars3d>, L<Template::Plugin::GD::Graph::points|Template::Plugin::GD::Graph::points>, L<Template::Plugin::GD::Graph::linespoints|Template::Plugin::GD::Graph::linespoints>, L<Template::Plugin::GD::Graph::area|Template::Plugin::GD::Graph::area>, L<Template::Plugin::GD::Graph::mixed|Template::Plugin::GD::Graph::mixed>, L<Template::Plugin::GD::Graph::pie|Template::Plugin::GD::Graph::pie>, L<Template::Plugin::GD::Graph::pie3d|Template::Plugin::GD::Graph::pie3d>, L<GD::Graph|GD::Graph> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Graph/lines3d.pm b/lib/Template/Plugin/GD/Graph/lines3d.pm deleted file mode 100644 index 1f12715..0000000 --- a/lib/Template/Plugin/GD/Graph/lines3d.pm +++ /dev/null @@ -1,166 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Graph::lines3d -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Graph::lines3d -# package in the GD::Graph3D.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: lines3d.pm,v 1.57 2004/01/13 16:20:56 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Graph::lines3d; - -require 5.004; - -use strict; -use GD::Graph::lines3d; -use Template::Plugin; -use base qw( GD::Graph::lines3d Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.57 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return $class->SUPER::new(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - - -sub set_legend -{ - my $self = shift; - - $self->SUPER::set_legend(ref $_[0] ? @{$_[0]} : @_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Graph::lines3d - Create 3D line graphs with axes and legends - -=head1 SYNOPSIS - - [% USE g = GD.Graph.lines3d(x_size, y_size); %] - -=head1 EXAMPLES - - [% FILTER null; - data = [ - ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", - "Sep", "Oct", "Nov", "Dec", ], - [-5, -4, -3, -3, -1, 0, 2, 1, 3, 4, 6, 7], - [4, 3, 5, 6, 3,1.5, -1, -3, -4, -6, -7, -8], - [1, 2, 2, 3, 4, 3, 1, -1, 0, 2, 3, 2], - ]; - - USE my_graph = GD.Graph.lines3d(); - - my_graph.set( - x_label => 'Month', - y_label => 'Measure of success', - title => 'A 3d Line Graph', - - y_max_value => 8, - y_min_value => -8, - y_tick_number => 16, - y_label_skip => 2, - box_axis => 0, - line_width => 3, - zero_axis_only => 1, - x_label_position => 1, - y_label_position => 1, - - x_label_skip => 3, - x_tick_offset => 2, - - transparent => 0, - ); - my_graph.set_legend("Us", "Them", "Others"); - my_graph.plot(data).png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Graph.lines3d plugin provides an interface to the GD::Graph::lines3d -class defined by the GD::Graph3d module. It allows one or more (x,y) data -sets to be plotted as y versus x lines with a 3-dimensional appearance, -together with axes and legends. - -See L<GD::Graph3d> for more details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Graph3d module was written by Jeremy Wadsack. - - -=head1 VERSION - -1.57, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Graph3d is copyright (C) 1999,2000 Wadsack-Allen. All Rights Reserved. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Graph::lines|Template::Plugin::GD::Graph::lines>, L<Template::Plugin::GD::Graph::bars|Template::Plugin::GD::Graph::bars>, L<Template::Plugin::GD::Graph::bars3d|Template::Plugin::GD::Graph::bars3d>, L<Template::Plugin::GD::Graph::points|Template::Plugin::GD::Graph::points>, L<Template::Plugin::GD::Graph::linespoints|Template::Plugin::GD::Graph::linespoints>, L<Template::Plugin::GD::Graph::area|Template::Plugin::GD::Graph::area>, L<Template::Plugin::GD::Graph::mixed|Template::Plugin::GD::Graph::mixed>, L<Template::Plugin::GD::Graph::pie|Template::Plugin::GD::Graph::pie>, L<Template::Plugin::GD::Graph::pie3d|Template::Plugin::GD::Graph::pie3d>, L<GD::Graph|GD::Graph>, L<GD::Graph3d|GD::Graph3d> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Graph/linespoints.pm b/lib/Template/Plugin/GD/Graph/linespoints.pm deleted file mode 100644 index 8dc48d9..0000000 --- a/lib/Template/Plugin/GD/Graph/linespoints.pm +++ /dev/null @@ -1,158 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Graph::linespoints -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Graph::linespoints -# package in the GD::Graph.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: linespoints.pm,v 1.57 2004/01/13 16:20:56 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Graph::linespoints; - -require 5.004; - -use strict; -use GD::Graph::linespoints; -use Template::Plugin; -use base qw( GD::Graph::linespoints Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.57 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return $class->SUPER::new(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - - -sub set_legend -{ - my $self = shift; - - $self->SUPER::set_legend(ref $_[0] ? @{$_[0]} : @_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Graph::linespoints - Create line/point graphs with axes and legends - -=head1 SYNOPSIS - - [% USE g = GD.Graph.linespoints(x_size, y_size); %] - -=head1 EXAMPLES - - [% FILTER null; - data = [ - ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"], - [50, 52, 53, 54, 55, 56, 57, 58, 59], - [60, 61, 61, 63, 68, 66, 65, 61, 58], - [70, 72, 71, 74, 78, 73, 75, 71, 68], - ]; - - USE my_graph = GD.Graph.linespoints; - - my_graph.set( - x_label => 'X Label', - y_label => 'Y label', - title => 'A Lines and Points Graph', - y_max_value => 80, - y_tick_number => 6, - y_label_skip => 2, - y_long_ticks => 1, - x_tick_length => 2, - markers => [ 1, 5 ], - skip_undef => 1, - transparent => 0, - ); - my_graph.set_legend('data set 1', 'data set 2', 'data set 3'); - my_graph.plot(data).png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Graph.linespoints plugin provides an interface to the -GD::Graph::linespoints class defined by the GD::Graph module. It allows -one or more (x,y) data sets to be plotted as y versus x lines, plus -symbols placed at each point, in addition to axes and legends. - -See L<GD::Graph> for more details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Graph module was written by Martien Verbruggen. - - -=head1 VERSION - -1.57, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Graph is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Graph::lines|Template::Plugin::GD::Graph::lines>, L<Template::Plugin::GD::Graph::lines3d|Template::Plugin::GD::Graph::lines3d>, L<Template::Plugin::GD::Graph::bars|Template::Plugin::GD::Graph::bars>, L<Template::Plugin::GD::Graph::bars3d|Template::Plugin::GD::Graph::bars3d>, L<Template::Plugin::GD::Graph::points|Template::Plugin::GD::Graph::points>, L<Template::Plugin::GD::Graph::area|Template::Plugin::GD::Graph::area>, L<Template::Plugin::GD::Graph::mixed|Template::Plugin::GD::Graph::mixed>, L<Template::Plugin::GD::Graph::pie|Template::Plugin::GD::Graph::pie>, L<Template::Plugin::GD::Graph::pie3d|Template::Plugin::GD::Graph::pie3d>, L<GD::Graph|GD::Graph> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Graph/mixed.pm b/lib/Template/Plugin/GD/Graph/mixed.pm deleted file mode 100644 index 10dd533..0000000 --- a/lib/Template/Plugin/GD/Graph/mixed.pm +++ /dev/null @@ -1,176 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Graph::mixed -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Graph::mixed -# package in the GD::Graph.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: mixed.pm,v 1.57 2004/01/13 16:20:56 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Graph::mixed; - -require 5.004; - -use strict; -use GD::Graph::mixed; -use Template::Plugin; -use base qw( GD::Graph::mixed Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.57 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return $class->SUPER::new(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - - -sub set_legend -{ - my $self = shift; - - $self->SUPER::set_legend(ref $_[0] ? @{$_[0]} : @_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Graph::mixed - Create mixed graphs with axes and legends - -=head1 SYNOPSIS - - [% USE g = GD.Graph.mixed(x_size, y_size); %] - -=head1 EXAMPLES - - [% FILTER null; - data = [ - ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"], - [ 1, 2, 5, 6, 3, 1.5, -1, -3, -4], - [ -4, -3, 1, 1, -3, -1.5, -2, -1, 0], - [ 9, 8, 9, 8.4, 7.1, 7.5, 8, 3, -3], - [ 0.1, 0.2, 0.5, 0.4, 0.3, 0.5, 0.1, 0, 0.4], - [ -0.1, 2, 5, 4, -3, 2.5, 3.2, 4, -4], - ]; - - USE my_graph = GD.Graph.mixed(); - - my_graph.set( - types => ['lines', 'lines', 'points', 'area', 'linespoints'], - default_type => 'points', - ); - - my_graph.set( - - x_label => 'X Label', - y_label => 'Y label', - title => 'A Mixed Type Graph', - - y_max_value => 10, - y_min_value => -5, - y_tick_number => 3, - y_label_skip => 0, - x_plot_values => 0, - y_plot_values => 0, - - long_ticks => 1, - x_ticks => 0, - - legend_marker_width => 24, - line_width => 3, - marker_size => 5, - - bar_spacing => 8, - - transparent => 0, - ); - - my_graph.set_legend('one', 'two', 'three', 'four', 'five', 'six'); - my_graph.plot(data).png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Graph.mixed plugin provides an interface to the GD::Graph::mixed -class defined by the GD::Graph module. It allows one or more (x,y) data -sets to be plotted with various styles (lines, points, bars, areas etc). - -See L<GD::Graph> for more details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Graph module was written by Martien Verbruggen. - - -=head1 VERSION - -1.57, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Graph is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Graph::lines|Template::Plugin::GD::Graph::lines>, L<Template::Plugin::GD::Graph::lines3d|Template::Plugin::GD::Graph::lines3d>, L<Template::Plugin::GD::Graph::bars|Template::Plugin::GD::Graph::bars>, L<Template::Plugin::GD::Graph::bars3d|Template::Plugin::GD::Graph::bars3d>, L<Template::Plugin::GD::Graph::points|Template::Plugin::GD::Graph::points>, L<Template::Plugin::GD::Graph::linespoints|Template::Plugin::GD::Graph::linespoints>, L<Template::Plugin::GD::Graph::area|Template::Plugin::GD::Graph::area>, L<Template::Plugin::GD::Graph::pie|Template::Plugin::GD::Graph::pie>, L<Template::Plugin::GD::Graph::pie3d|Template::Plugin::GD::Graph::pie3d>, L<GD::Graph|GD::Graph> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Graph/pie.pm b/lib/Template/Plugin/GD/Graph/pie.pm deleted file mode 100644 index e72e26c..0000000 --- a/lib/Template/Plugin/GD/Graph/pie.pm +++ /dev/null @@ -1,141 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Graph::pie -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Graph::pie -# package in the GD::Graph.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: pie.pm,v 1.55 2004/01/13 16:20:56 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Graph::pie; - -require 5.004; - -use strict; -use GD::Graph::pie; -use Template::Plugin; -use base qw( GD::Graph::pie Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.55 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return $class->SUPER::new(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Graph::pie - Create pie charts with legends - -=head1 SYNOPSIS - - [% USE g = GD.Graph.pie(x_size, y_size); %] - -=head1 EXAMPLES - - [% FILTER null; - data = [ - ["1st","2nd","3rd","4th","5th","6th"], - [ 4, 2, 3, 4, 3, 3.5] - ]; - - USE my_graph = GD.Graph.pie( 250, 200 ); - - my_graph.set( - title => 'A Pie Chart', - label => 'Label', - axislabelclr => 'black', - pie_height => 36, - - transparent => 0, - ); - my_graph.plot(data).png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Graph.pie plugin provides an interface to the GD::Graph::pie -class defined by the GD::Graph module. It allows an (x,y) data set to -be plotted as a pie chart. The x values are typically strings. - -See L<GD::Graph> for more details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Graph module was written by Martien Verbruggen. - - -=head1 VERSION - -1.55, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Graph is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Graph::lines|Template::Plugin::GD::Graph::lines>, L<Template::Plugin::GD::Graph::lines3d|Template::Plugin::GD::Graph::lines3d>, L<Template::Plugin::GD::Graph::bars|Template::Plugin::GD::Graph::bars>, L<Template::Plugin::GD::Graph::bars3d|Template::Plugin::GD::Graph::bars3d>, L<Template::Plugin::GD::Graph::points|Template::Plugin::GD::Graph::points>, L<Template::Plugin::GD::Graph::linespoints|Template::Plugin::GD::Graph::linespoints>, L<Template::Plugin::GD::Graph::area|Template::Plugin::GD::Graph::area>, L<Template::Plugin::GD::Graph::mixed|Template::Plugin::GD::Graph::mixed>, L<Template::Plugin::GD::Graph::pie3d|Template::Plugin::GD::Graph::pie3d>, L<GD::Graph|GD::Graph> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Graph/pie3d.pm b/lib/Template/Plugin/GD/Graph/pie3d.pm deleted file mode 100644 index 5f677e0..0000000 --- a/lib/Template/Plugin/GD/Graph/pie3d.pm +++ /dev/null @@ -1,145 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Graph::pie3d -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Graph::pie3d -# package in the GD::Graph3D.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: pie3d.pm,v 1.55 2004/01/13 16:20:56 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Graph::pie3d; - -require 5.004; - -use strict; -use GD::Graph::pie3d; -use Template::Plugin; -use base qw( GD::Graph::pie3d Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.55 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return $class->SUPER::new(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Graph::pie3d - Create 3D pie charts with legends - -=head1 SYNOPSIS - - [% USE g = GD.Graph.pie3d(x_size, y_size); %] - -=head1 EXAMPLES - - [% FILTER null; - data = [ - ["1st","2nd","3rd","4th","5th","6th"], - [ 4, 2, 3, 4, 3, 3.5] - ]; - - USE my_graph = GD.Graph.pie3d( 250, 200 ); - - my_graph.set( - title => 'A Pie Chart', - label => 'Label', - axislabelclr => 'black', - pie_height => 36, - - transparent => 0, - ); - my_graph.plot(data).png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Graph.pie3d plugin provides an interface to the GD::Graph::pie3d -class defined by the GD::Graph module. It allows an (x,y) data set to -be plotted as a 3d pie chart. The x values are typically strings. - -Note that GD::Graph::pie already produces a 3d effect, so GD::Graph::pie3d -is just a wrapper around GD::Graph::pie. Similarly, the plugin -GD.Graph.pie3d is effectively the same as the plugin GD.Graph.pie. - -See L<GD::Graph3d> for more details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Graph3d module was written by Jeremy Wadsack. The GD::Graph module was written by Martien Verbruggen. - - -=head1 VERSION - -1.55, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Graph3d is copyright (c) 1999,2000 Wadsack-Allen. All Rights Reserved. GD::Graph is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Graph::lines|Template::Plugin::GD::Graph::lines>, L<Template::Plugin::GD::Graph::lines3d|Template::Plugin::GD::Graph::lines3d>, L<Template::Plugin::GD::Graph::bars|Template::Plugin::GD::Graph::bars>, L<Template::Plugin::GD::Graph::bars3d|Template::Plugin::GD::Graph::bars3d>, L<Template::Plugin::GD::Graph::points|Template::Plugin::GD::Graph::points>, L<Template::Plugin::GD::Graph::linespoints|Template::Plugin::GD::Graph::linespoints>, L<Template::Plugin::GD::Graph::area|Template::Plugin::GD::Graph::area>, L<Template::Plugin::GD::Graph::mixed|Template::Plugin::GD::Graph::mixed>, L<Template::Plugin::GD::Graph::pie|Template::Plugin::GD::Graph::pie>, L<GD::Graph|GD::Graph>, L<GD::Graph3d|GD::Graph3d> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Graph/points.pm b/lib/Template/Plugin/GD/Graph/points.pm deleted file mode 100644 index 97acf51..0000000 --- a/lib/Template/Plugin/GD/Graph/points.pm +++ /dev/null @@ -1,155 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Graph::points -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Graph::points -# package in the GD::Graph.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: points.pm,v 1.57 2004/01/13 16:20:56 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Graph::points; - -require 5.004; - -use strict; -use GD::Graph::points; -use Template::Plugin; -use base qw( GD::Graph::points Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.57 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return $class->SUPER::new(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - - -sub set_legend -{ - my $self = shift; - - $self->SUPER::set_legend(ref $_[0] ? @{$_[0]} : @_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Graph::points - Create point graphs with axes and legends - -=head1 SYNOPSIS - - [% USE g = GD.Graph.points(x_size, y_size); %] - -=head1 EXAMPLES - - [% FILTER null; - data = [ - ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"], - [ 5, 12, 24, 33, 19, 8, 6, 15, 21], - [ 1, 2, 5, 6, 3, 1.5, 2, 3, 4], - ]; - USE my_graph = GD.Graph.points(); - my_graph.set( - x_label => 'X Label', - y_label => 'Y label', - title => 'A Points Graph', - y_max_value => 40, - y_tick_number => 8, - y_label_skip => 2, - legend_placement => 'RC', - long_ticks => 1, - marker_size => 6, - markers => [ 1, 7, 5 ], - - transparent => 0, - ); - my_graph.set_legend('one', 'two'); - my_graph.plot(data).png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Graph.points plugin provides an interface to the GD::Graph::points -class defined by the GD::Graph module. It allows one or more (x,y) data -sets to be plotted as points, in addition to axes and legends. - -See L<GD::Graph> for more details. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Graph module was written by Martien Verbruggen. - - -=head1 VERSION - -1.57, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Graph is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Graph::lines|Template::Plugin::GD::Graph::lines>, L<Template::Plugin::GD::Graph::lines3d|Template::Plugin::GD::Graph::lines3d>, L<Template::Plugin::GD::Graph::bars|Template::Plugin::GD::Graph::bars>, L<Template::Plugin::GD::Graph::bars3d|Template::Plugin::GD::Graph::bars3d>, L<Template::Plugin::GD::Graph::linespoints|Template::Plugin::GD::Graph::linespoints>, L<Template::Plugin::GD::Graph::area|Template::Plugin::GD::Graph::area>, L<Template::Plugin::GD::Graph::mixed|Template::Plugin::GD::Graph::mixed>, L<Template::Plugin::GD::Graph::pie|Template::Plugin::GD::Graph::pie>, L<Template::Plugin::GD::Graph::pie3d|Template::Plugin::GD::Graph::pie3d>, L<GD::Graph|GD::Graph> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Image.pm b/lib/Template/Plugin/GD/Image.pm deleted file mode 100644 index 46a06d7..0000000 --- a/lib/Template/Plugin/GD/Image.pm +++ /dev/null @@ -1,184 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Image -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Image -# class in the GD.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: Image.pm,v 1.55 2004/01/13 16:20:46 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Image; - -require 5.004; - -use strict; -use GD; -use Template::Plugin; -use base qw( GD Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.55 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return new GD::Image(@_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Image - Interface to GD Graphics Library - -=head1 SYNOPSIS - - [% USE im = GD.Image(x_size, y_size) %] - -=head1 EXAMPLES - - [% FILTER null; - USE gdc = GD.Constants; - USE im = GD.Image(200,100); - black = im.colorAllocate(0 ,0, 0); - red = im.colorAllocate(255,0, 0); - r = im.string(gdc.gdLargeFont, 10, 10, "Large Red Text", red); - im.png | stdout(1); - END; - -%] - - [% FILTER null; - USE im = GD.Image(100,100); - # allocate some colors - black = im.colorAllocate(0, 0, 0); - red = im.colorAllocate(255,0, 0); - blue = im.colorAllocate(0, 0, 255); - # Draw a blue oval - im.arc(50,50,95,75,0,360,blue); - # And fill it with red - im.fill(50,50,red); - # Output binary image in PNG format - im.png | stdout(1); - END; - -%] - - [% FILTER null; - USE im = GD.Image(100,100); - USE c = GD.Constants; - USE poly = GD.Polygon; - - # allocate some colors - white = im.colorAllocate(255,255,255); - black = im.colorAllocate(0, 0, 0); - red = im.colorAllocate(255,0, 0); - blue = im.colorAllocate(0, 0,255); - green = im.colorAllocate(0, 255,0); - - # make the background transparent and interlaced - im.transparent(white); - im.interlaced('true'); - - # Put a black frame around the picture - im.rectangle(0,0,99,99,black); - - # Draw a blue oval - im.arc(50,50,95,75,0,360,blue); - - # And fill it with red - im.fill(50,50,red); - - # Draw a blue triangle - poly.addPt(50,0); - poly.addPt(99,99); - poly.addPt(0,99); - im.filledPolygon(poly, blue); - - # Output binary image in PNG format - im.png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Image plugin provides an interface to GD.pm's GD::Image class. -The GD::Image class is the main interface to GD.pm. - -It is very important that no extraneous template output appear before or -after the image. Since some methods return values that would otherwise -appear in the output, it is recommended that GD.Image code be wrapped in -a null filter. The methods that produce the final output (eg, png, jpeg, -gd etc) can then explicitly make their output appear by using the -stdout filter, with a non-zero argument to force binary mode (required -for non-modern operating systems). - -See L<GD> for a complete description of the GD library and all the -methods that can be called via the GD.Image plugin. -See L<Template::Plugin::GD::Constants> for a plugin that allows you -access to GD.pm's constants. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -Lincoln D. Stein wrote the GD.pm interface to the GD library. - - -=head1 VERSION - -1.55, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -The GD.pm interface is copyright 1995-2000, Lincoln D. Stein. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Polygon|Template::Plugin::GD::Polygon>, L<Template::Plugin::GD::Constants|Template::Plugin::GD::Constants>, L<GD|GD> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Polygon.pm b/lib/Template/Plugin/GD/Polygon.pm deleted file mode 100644 index 0d1d5c6..0000000 --- a/lib/Template/Plugin/GD/Polygon.pm +++ /dev/null @@ -1,155 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Polygon -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Polygon -# class in the GD.pm module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: Polygon.pm,v 1.55 2004/01/13 16:20:46 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Polygon; - -require 5.004; - -use strict; -use GD; -use Template::Plugin; -use base qw( Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.55 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - return new GD::Polygon(@_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Polygon - Interface to GD module Polygon class - -=head1 SYNOPSIS - - [% USE poly = GD.Polygon; - poly.addPt(50,0); - poly.addPt(99,99); - %] - -=head1 EXAMPLES - - [% FILTER null; - USE im = GD.Image(100,100); - USE c = GD.Constants; - - # allocate some colors - white = im.colorAllocate(255,255,255); - black = im.colorAllocate(0, 0, 0); - red = im.colorAllocate(255,0, 0); - blue = im.colorAllocate(0, 0,255); - green = im.colorAllocate(0, 255,0); - - # make the background transparent and interlaced - im.transparent(white); - im.interlaced('true'); - - # Put a black frame around the picture - im.rectangle(0,0,99,99,black); - - # Draw a blue oval - im.arc(50,50,95,75,0,360,blue); - - # And fill it with red - im.fill(50,50,red); - - # Draw a blue triangle by defining a polygon - USE poly = GD.Polygon; - poly.addPt(50,0); - poly.addPt(99,99); - poly.addPt(0,99); - im.filledPolygon(poly, blue); - - # Output binary image in PNG format - im.png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Polygon plugin provides an interface to GD.pm's GD::Polygon class. - -See L<GD> for a complete description of the GD library and all the -methods that can be called via the GD.Polygon plugin. -See L<Template::Plugin::GD::Image> for the main interface to the -GD functions. -See L<Template::Plugin::GD::Constants> for a plugin that allows you -access to GD.pm's constants. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -Lincoln D. Stein wrote the GD.pm interface to the GD library. - - -=head1 VERSION - -1.55, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -The GD.pm interface is copyright 1995-2000, Lincoln D. Stein. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Image|Template::Plugin::GD::Image>, L<Template::Plugin::GD::Constants|Template::Plugin::GD::Constants>, L<GD|GD> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Text.pm b/lib/Template/Plugin/GD/Text.pm deleted file mode 100644 index f18b2e0..0000000 --- a/lib/Template/Plugin/GD/Text.pm +++ /dev/null @@ -1,140 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Text -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Text -# module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: Text.pm,v 1.55 2004/01/13 16:20:46 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Text; - -require 5.004; - -use strict; -use GD::Text; -use Template::Plugin; -use base qw( GD::Text Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.55 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - return new GD::Text(@_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Text - Text utilities for use with GD - -=head1 SYNOPSIS - - [% USE gd_text = GD.Text %] - -=head1 EXAMPLES - - [% - USE gd_c = GD.Constants; - USE t = GD.Text; - x = t.set_text('Some text'); - r = t.get('width', 'height', 'char_up', 'char_down'); - r.join(":"); "\n"; # returns 54:13:13:0. - -%] - - [% - USE gd_c = GD.Constants; - USE t = GD.Text(text => 'FooBar Banana', font => gd_c.gdGiantFont); - t.get('width'); "\n"; # returns 117. - -%] - -=head1 DESCRIPTION - -The GD.Text plugin provides an interface to the GD::Text module. -It allows attributes of strings such as width and height in pixels -to be computed. - -See L<GD::Text> for more details. See -L<Template::Plugin::GD::Text::Align> and -L<Template::Plugin::GD::Text::Wrap> for plugins that -allow you to render aligned or wrapped text in GD images. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Text module was written by Martien Verbruggen. - - -=head1 VERSION - -1.55, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Text is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Text::Wrap|Template::Plugin::GD::Text::Wrap>, L<Template::Plugin::GD::Text::Align|Template::Plugin::GD::Text::Align>, L<GD|GD>, L<GD::Text|GD::Text> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Text/Align.pm b/lib/Template/Plugin/GD/Text/Align.pm deleted file mode 100644 index 8b79069..0000000 --- a/lib/Template/Plugin/GD/Text/Align.pm +++ /dev/null @@ -1,147 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Text::Align -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Text::Align -# module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: Align.pm,v 1.55 2004/01/13 16:21:46 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Text::Align; - -require 5.004; - -use strict; -use GD::Text::Align; -use Template::Plugin; -use base qw( GD::Text::Align Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.55 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - my $gd = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - return $class->SUPER::new($gd, @_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Text::Align - Draw aligned strings in GD images - -=head1 SYNOPSIS - - [% USE align = GD.Text.Align(gd_image); %] - -=head1 EXAMPLES - - [% FILTER null; - USE im = GD.Image(100,100); - USE gdc = GD.Constants; - # allocate some colors - black = im.colorAllocate(0, 0, 0); - red = im.colorAllocate(255,0, 0); - blue = im.colorAllocate(0, 0, 255); - # Draw a blue oval - im.arc(50,50,95,75,0,360,blue); - - USE a = GD.Text.Align(im); - a.set_font(gdc.gdLargeFont); - a.set_text("Hello"); - a.set(colour => red, halign => "center"); - a.draw(50,70,0); - - # Output image in PNG format - im.png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Text.Align plugin provides an interface to the GD::Text::Align -module. It allows text to be drawn in GD images with various alignments -and orientations. - -See L<GD::Text::Align> for more details. See -L<Template::Plugin::GD::Text::Wrap> for a plugin -that allow you to render wrapped text in GD images. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Text module was written by Martien Verbruggen. - - -=head1 VERSION - -1.55, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Text is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Text|Template::Plugin::GD::Text>, L<Template::Plugin::GD::Text::Wrap|Template::Plugin::GD::Text::Wrap>, L<GD|GD>, L<GD::Text::Align|GD::Text::Align> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: diff --git a/lib/Template/Plugin/GD/Text/Wrap.pm b/lib/Template/Plugin/GD/Text/Wrap.pm deleted file mode 100644 index 0438599..0000000 --- a/lib/Template/Plugin/GD/Text/Wrap.pm +++ /dev/null @@ -1,183 +0,0 @@ -#============================================================= -*-Perl-*- -# -# Template::Plugin::GD::Text::Wrap -# -# DESCRIPTION -# -# Simple Template Toolkit plugin interfacing to the GD::Text::Wrap -# module. -# -# AUTHOR -# Craig Barratt <craig@arraycomm.com> -# -# COPYRIGHT -# Copyright (C) 2001 Craig Barratt. All Rights Reserved. -# -# This module is free software; you can redistribute it and/or -# modify it under the same terms as Perl itself. -# -#---------------------------------------------------------------------------- -# -# $Id: Wrap.pm,v 1.55 2004/01/13 16:21:46 abw Exp $ -# -#============================================================================ - -package Template::Plugin::GD::Text::Wrap; - -require 5.004; - -use strict; -use GD::Text::Wrap; -use Template::Plugin; -use base qw( GD::Text::Wrap Template::Plugin ); -use vars qw( $VERSION ); - -$VERSION = sprintf("%d.%02d", q$Revision: 1.55 $ =~ /(\d+)\.(\d+)/); - -sub new -{ - my $class = shift; - my $context = shift; - my $gd = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - return $class->SUPER::new($gd, @_); -} - -sub set -{ - my $self = shift; - - push(@_, %{pop(@_)}) if ( @_ & 1 && ref($_[@_-1]) eq "HASH" ); - $self->SUPER::set(@_); -} - -1; - -__END__ - - -#------------------------------------------------------------------------ -# IMPORTANT NOTE -# This documentation is generated automatically from source -# templates. Any changes you make here may be lost. -# -# The 'docsrc' documentation source bundle is available for download -# from http://www.template-toolkit.org/docs.html and contains all -# the source templates, XML files, scripts, etc., from which the -# documentation for the Template Toolkit is built. -#------------------------------------------------------------------------ - -=head1 NAME - -Template::Plugin::GD::Text::Wrap - Break and wrap strings in GD images - -=head1 SYNOPSIS - - [% USE align = GD.Text.Wrap(gd_image); %] - -=head1 EXAMPLES - - [% FILTER null; - USE gd = GD.Image(200,400); - USE gdc = GD.Constants; - black = gd.colorAllocate(0, 0, 0); - green = gd.colorAllocate(0, 255, 0); - txt = "This is some long text. " | repeat(10); - USE wrapbox = GD.Text.Wrap(gd, - line_space => 4, - color => green, - text => txt, - ); - wrapbox.set_font(gdc.gdMediumBoldFont); - wrapbox.set(align => 'center', width => 160); - wrapbox.draw(20, 20); - gd.png | stdout(1); - END; - -%] - - [% txt = BLOCK -%] - Lorem ipsum dolor sit amet, consectetuer adipiscing elit, - sed diam nonummy nibh euismod tincidunt ut laoreet dolore - magna aliquam erat volutpat. - [% END -%] - [% FILTER null; - # - # This example follows the example in GD::Text::Wrap, except - # we create a second image that is a copy just enough of the - # first image to hold the final text, plus a border. - # - USE gd = GD.Image(400,400); - USE gdc = GD.Constants; - green = gd.colorAllocate(0, 255, 0); - blue = gd.colorAllocate(0, 0, 255); - USE wrapbox = GD.Text.Wrap(gd, - line_space => 4, - color => green, - text => txt, - ); - wrapbox.set_font(gdc.gdMediumBoldFont); - wrapbox.set(align => 'center', width => 140); - rect = wrapbox.get_bounds(5, 5); - x0 = rect.0; - y0 = rect.1; - x1 = rect.2 + 9; - y1 = rect.3 + 9; - gd.filledRectangle(0, 0, x1, y1, blue); - gd.rectangle(0, 0, x1, y1, green); - wrapbox.draw(x0, y0); - nx = x1 + 1; - ny = y1 + 1; - USE gd2 = GD.Image(nx, ny); - gd2.copy(gd, 0, 0, 0, 0, x1, y1); - gd2.png | stdout(1); - END; - -%] - -=head1 DESCRIPTION - -The GD.Text.Wrap plugin provides an interface to the GD::Text::Wrap -module. It allows multiples line of text to be drawn in GD images with -various wrapping and alignment. - -See L<GD::Text::Wrap> for more details. See -L<Template::Plugin::GD::Text::Align> for a plugin -that allow you to draw text with various alignment -and orientation. - -=head1 AUTHOR - -Craig Barratt E<lt>craig@arraycomm.comE<gt> - - -The GD::Text module was written by Martien Verbruggen. - - -=head1 VERSION - -1.55, distributed as part of the -Template Toolkit version 2.13, released on 30 January 2004. - -=head1 COPYRIGHT - - -Copyright (C) 2001 Craig Barratt E<lt>craig@arraycomm.comE<gt> - -GD::Text is copyright 1999 Martien Verbruggen. - -This module is free software; you can redistribute it and/or -modify it under the same terms as Perl itself. - -=head1 SEE ALSO - -L<Template::Plugin|Template::Plugin>, L<Template::Plugin::GD|Template::Plugin::GD>, L<Template::Plugin::GD::Text::Align|Template::Plugin::GD::Text::Align>, L<GD|GD>, L<GD::Text::Wrap|GD::Text::Wrap> - -=cut - -# Local Variables: -# mode: perl -# perl-indent-level: 4 -# indent-tabs-mode: nil -# End: -# -# vim: expandtab shiftwidth=4: |
