in reply to Re^2: Simple Graphics::Primitive example?
in thread Simple Graphics::Primitive example?
So it seems that both $width and $height are not defined. I note that the example on the Graphics::Primitive page has:81 my $width = $self->width; 82 my $height = $self->height; 83 84 if(uc($self->format) eq 'PNG') { 85 $surface = Cairo::ImageSurface->create( 86 'argb32', $width, $height 87 );
Whereas the example on the Graphics::Primitive::Driver::Cairo page has:my $c = Graphics::Primitive::Component->new( width => 500, height => 350, );
I suggest you try adding the width and height parameters when creating the new Component object (or try just using Component instead of Container) and see if that makes a difference.my $c = Graphics::Primitive::Container->new( width => 500, height => 350, );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Simple Graphics::Primitive example?
by djzort (Sexton) on Feb 26, 2014 at 22:54 UTC |