NAME
PeGS::PDF - Draw simple Perl Graphical Structures
SYNOPSIS
use
PeGS::PDF;
my
= PeGS::PDF->new(
{
file
=>
"array.pdf"
,
'x'
=> 1.50 * 72,
'y'
=> 2.25 * 72,
}
);
die
"Could not create object!"
unless
ref
;
->make_array(
'@cats'
, [
qw(Buster Mimi Ginger Ella)
], 10, 120 );
->
close
;
DESCRIPTION
- padding_factor
-
my
@points
=
map
[
$xc
+
$r
*
cos
(
$arc
*
$_
/ 2 ),
$yc
+
$r
*
sin
(
$arc
*
$_
/ 2 ) ],
0 ..
$points
- 1;
$c .= sprintf(' %.2f %.2f %.2f %.2f %.2f %.2f c', $x + $b, $y, $x + $r, $y - $r + $b, $x + $r, $y - $r); /* Set x/y to the final point. */ $x = $x + $r; $y = $y - $r; /* Third circle quarter. */ $c .= sprintf(' %.2f %.2f %.2f %.2f %.2f %.2f c', $x, $y - $b, $x - $r + $b, $y - $r, $x - $r, $y - $r); /* Set x/y to the final point. */ $x = $x - $r; $y = $y - $r; /* Fourth circle quarter. */ $c .= sprintf(' %.2f %.2f %.2f %.2f %.2f %.2f c %s', $x - $b, $y, $x - $r, $y + $r - $b, $x - $r, $y + $r, $op);
- arrowhead_length
- arrowhead_width
-
http://www.adobe.com/devnet/acrobat/pdfs/PDF32000_2008.pdf
sub make_circle { my( $pdf, $x, $y, $radius, $start_angle, $end_angle ) = @_;
# theta is sweep, which is 360
my
$Pi2
= 3.1415926 * 2;
my
(
$x0
,
$y0
) = (
cos
( 180 /
$Pi2
),
sin
( 180 /
$Pi2
) );
my
(
$x1
,
$y1
) = ( (4 -
$x0
) / 3, (1-
$x0
)*(3-
$x0
)/(3
*$y0
) )
my
(
$x2
,
$y2
) = (
$x1
, -
$y0
);
my
(
$x3
,
$y3
) = (
$x1
, -
$y1
);
$pdf
->{stream} .= <<
"PDF"
;
$x
$y
m
$x1
$y1
$x2
$y2
$x3
$y3
c
PDF
}
TO DO
Everything.
SEE ALSO
SOURCE AVAILABILITY
This source is in Github:
AUTHOR
brian d foy, <briandfoy@pobox.com>
COPYRIGHT AND LICENSE
Copyright © 2009-2025, brian d foy <briandfoy@pobox.com>. All rights reserved.
You may redistribute this under the terms of the Artistic License 2.0.