I've tried to add a function to draw a shape with very similar extension like this:sub add_line { my ($self, $options) = @_; return unless $self->slide; $options = {} unless ref $options eq 'HASH'; my $new_line = $self->slide->Shapes->AddLine($options->{x1}, $option +s->{y1}, $options->{x2}, $options->{y2}); return $new_line; }
But it doesn't work.sub add_shape { my ($self, $shape, $options) = @_; return unless $self->slide; $options = {} unless ref $options eq 'HASH'; my $new_shape = $self->slide->Shapes->AddShape($shape, $options->{le +ft}, $options->{top}, $options->{width}, $options->{height}); return $new_shape; }
In the horrible MSDN documents on VBA there's discussion about encoded shape names like 'msoShapeRectangle' which is shape enumeration 1, and when I call this function it draws nothing. I've tried calling this new function both the following ways with no success:
Neither works.# Add the Rectangle $pp->add_shape('msoShapeRectangle', { left=>100, top=>100, width=>100, + height=>100}); # Add the Rectangle $pp->add_shape(1, { left=>100, top=>100, width=>100, height=>100});
Any help or guidance would be apprecaited. There's almost no help in the Win32::PowerPoint in CPAN.
Also, I've searched for hours for examples on even how to change the color of the line that I can successfully draw - to no avail.
Kind regards, nzsvz9
I'm not a coder, I just play one in my job
In reply to Win32::PowerPoint Extension for Lines and Shapes by nzsvz9
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |