| 1 | package Excel::Template::Element::Image; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | BEGIN { | ||||||||||
| 6 | 1 | ▶ | use vars qw(@ISA); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | @ISA = qw(Excel::Template::Element); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use Excel::Template::Element; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | } | ||||||||||
| 11 | |||||||||||
| 12 | sub render { | ||||||||||
| 13 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
render: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 14 | 0 | my ($context) = @_; | |||||||||
| 15 | |||||||||||
| 16 | my ($row, $col, $path, $offset, $scale) = map { | ||||||||||
| 17 | 0 | $context->get($self, $_) | |||||||||
| 18 | } qw( ROW COL PATH OFFSET SCALE ); | ||||||||||
| 19 | |||||||||||
| 20 | 0 | my @offsets = (0,0); | |||||||||
| 21 | 0 | ▶ | if ( $offset =~ /^\s*([\d.]+)\s*,\s*([\d.]+)/ ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 0 | @offsets = ($1,$2); | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 0 | my @scales = (0,0); | |||||||||
| 26 | 0 | ▶ | if ( $scale =~ /^\s*([\d.]+)\s*,\s*([\d.]+)/ ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 0 | @scales = ($1,$2); | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | $context->active_worksheet->insert_bitmap( | ||||||||||
| 31 | 0 | $row, $col, $path, @offsets, @scales, | |||||||||
| 32 | ); | ||||||||||
| 33 | |||||||||||
| 34 | 0 | return 1; | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | sub deltas { | ||||||||||
| 38 | return { | ||||||||||
| 39 | 0 | ▶ | COL => +1, | ||||||||
|
Subroutine
deltas: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 40 | }; | ||||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | 1 | 1; | |||||||||
| 44 | __END__ | ||||||||||