| 1 | #! perl | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use v5.26; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use Object::Pad; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | class SVGPDF::Polyline :isa(SVGPDF::Element); | ||||||||||
| 9 | |||||||||||
| 10 | 5 | ▶ | method process () { | ||||||||
|
Subroutine
process: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 11 | 5 | $self->process_polyline(0); | |||||||||
| 12 | 2 | } | |||||||||
| 13 | |||||||||||
| 14 | 7 | ▶ | method process_polyline ( $close ) { | ||||||||
|
Subroutine
process_polyline: called CC=6 SCAR=18.0
Pod
undocumented
| |||||||||||
| 15 | 7 | my $atts = $self->atts; | |||||||||
| 16 | 7 | my $xo = $self->xo; | |||||||||
| 17 | 7 | ▶ | return if $atts->{omit}; # for testing/debugging. | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | |||||||||||
| 19 | 7 | my ( $points, $tf ) = $self->get_params( $atts, qw(points:s transform:s) ); | |||||||||
| 20 | |||||||||||
| 21 | 7 | my @d = $self-> getargs($points); | |||||||||
| 22 | |||||||||||
| 23 | 7 | my $t = $points; | |||||||||
| 24 | 7 | ▶ | $t = substr($t,0,20) . "..." if length($t) > 20; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 7 | $self->_dbg( $self->name, " points=\"$t\"" ); | |||||||||
| 26 | 7 | $self->_dbg( "+ xo save" ); | |||||||||
| 27 | 7 | $xo->save; | |||||||||
| 28 | |||||||||||
| 29 | 7 | $self->set_graphics; | |||||||||
| 30 | 7 | ▶ | $self->set_transform($tf) if $tf; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | |||||||||||
| 32 | 7 | ▶ | if ( @d ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 7 | $xo->move( $d[0], $d[1] ); | |||||||||
| 34 | 7 | $xo->polyline( @d[2 .. $#d] ); | |||||||||
| 35 | 7 | ▶ | $xo->close if $close; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | 7 | $self->_paintsub->(); | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 7 | $self->_dbg( "- xo restore" ); | |||||||||
| 40 | 7 | $xo->restore; | |||||||||
| 41 | 7 | $self->css_pop; | |||||||||
| 42 | 2 | } | |||||||||
| 43 | |||||||||||
| 44 | |||||||||||
| 45 | 2 | 1; | |||||||||