Re: Goo::Canvas::Polyline acts not as expected
- From: Jeremy Volkening <volkening mailshack com>
- To: gtk-perl-list gnome org
- Subject: Re: Goo::Canvas::Polyline acts not as expected
- Date: Thu, 22 Apr 2010 10:46:10 -0400
On Thu, 2010-04-22 at 05:39 +0000, Xi Yang wrote:
Hi everyone:
I tried to use Polyline to make a part of another complexed widget.
However, it seems the Polyline object always use its north-west of
boundingbox as its (0,0) point. For instance:
###################################
my $sz = 10;
my $coll_anchor = Goo::Canvas::Polyline->new(
$self,
TRUE,
[0,$sz,$sz,0,0,-$sz,-$sz,0],
);
###################################
I expect this should draw a diamond, with its center on (0,0) point.
It works for me as expected. I don't suppose you've set these two
properties on your canvas at some point:
$canvas->set(
'automatic-bounds' => TRUE,
'bounds-from-origin' => FALSE,
)
This would cause the canvas to automatically adjust to fit your drawing.
Your diamond would still be centered at (0,0), but (0,0) would no longer
be in the top-left corner of the canvas.
Jeremy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]