X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExcel%2FTemplate%2FElement%2FImage.pm;fp=lib%2FExcel%2FTemplate%2FElement%2FImage.pm;h=dd9b9dd8af437d4921e83d6c7afab401470341c4;hb=cf663350e6c614cc3704206b1389f1215ce481f5;hp=2817ad4f24ea3add0d3faf811500b72d13d080b7;hpb=4f7357ffa6376529e9759fa250a728892ef2720e;p=p5sagit%2FExcel-Template.git diff --git a/lib/Excel/Template/Element/Image.pm b/lib/Excel/Template/Element/Image.pm index 2817ad4..dd9b9dd 100644 --- a/lib/Excel/Template/Element/Image.pm +++ b/lib/Excel/Template/Element/Image.pm @@ -13,10 +13,9 @@ sub render { my $self = shift; my ($context) = @_; - my $path = $context->get( $self, 'PATH' ); - my ($row, $col, $offset, $scale) = map { + my ($row, $col, $path, $offset, $scale) = map { $context->get($self, $_) - } qw( ROW COL OFFSET SCALE ); + } qw( ROW COL PATH OFFSET SCALE ); my @offsets = (0,0); if ( $offset =~ /^\s*([\d.]+)\s*,\s*([\d.]+)/ ) { @@ -28,7 +27,7 @@ sub render { @scales = ($1,$2); } - $context->active_worksheet->insert_image( + $context->active_worksheet->insert_bitmap( $row, $col, $path, @offsets, @scales, ); @@ -54,12 +53,16 @@ To insert an image into the worksheet =head1 NODE NAME -CELL +IMAGE =head1 INHERITANCE L +=head1 EFFECTS + +This will consume one column in the current row. + =head1 DEPENDENCIES None @@ -73,6 +76,8 @@ None Please see L for more information about the offset and scaling options as well as any other restrictions that might be in place. This node does B perform any sort of validation upon your parameters. You are assumed to know what you are doing. +Note that the offset and scaling values are "X,Y". You I provide both values, even if the Y value is 0. If you provide a 0 value for either scaling option, L will default that to 1. + =head1 AUTHOR Rob Kinyon (rob.kinyon@gmail.com)