Like you said, with all similar x or y coords the bounding box would be zero 
area and really just a line. Kind of a special case I guess.

Thanks for looking in to it.

~Angus

--- On Wed, 10/26/11, Chris.Barker <[email protected]> wrote:

> From: Chris.Barker <[email protected]>
> Subject: Re: [fc] ZoomToBB() and points in a row
> To: [email protected]
> Received: Wednesday, October 26, 2011, 2:02 PM
> On 10/26/11 12:38 PM, Angus Dickey
> wrote:
> > Hi,
> >
> > Just wanted to start out by saying I have been using
> floatcanvas for
> > a few months now in a project that required a drawing
> widget for
> > wxpython. Much better than doing it myself with a DC
> (or maybe a
> > graphics context now), so thanks for creating and
> maintaining it.
> 
> Thanks!
> 
> > I have noticed a small issue with floatcanvas points
> and bounding
> > boxes so I thought I would post it here.
> 
> >
> shape = FloatCanvas.Point((0, 250), Diameter=10,
> Color=(200, 0, 0))
> > self.floatcanvas_panel.AddObject(shape) shape =
> FloatCanvas.Point((0,
> > 500), Diameter=10, Color=(0, 200, 0))
> > self.floatcanvas_panel.AddObject(shape) shape =
> FloatCanvas.Point((0,
> > 750), Diameter=10, Color=(0, 0, 200))
> > self.floatcanvas_panel.AddObject(shape)
> floatcanvas_panel.ZoomToBB()
> >
> ----------------------------------------------------------------------
> 
> > Having a quick look at the floatcanvas code,
> specifically ZoomToBB(),
> > it looks like floatcanvas tries to set the bounding
> box but it is
> > null so the code skips to setting the shifting and
> scaling to the
> > defaults. So it looks like floatanvas might not be
> storing the
> > correct bbox in self.BoundingBox, but I don't know
> why.
> 
> well, with all the x coords the same, the you have a
> zero-area bounding 
> box. However, it does have a width, so what you want to do
> should be 
> able to work.
> 
> I suspect the BoundingBox class is returning a null box
> when either 
> dimension is zero -- it probably shouldn't do that. I'll
> take a look.
> 
> -Chris
> 
> 
> -- 
> Christopher Barker, Ph.D.
> Oceanographer
> 
> Emergency Response Division
> NOAA/NOS/OR&R           
> (206) 526-6959   voice
> 7600 Sand Point Way NE   (206)
> 526-6329   fax
> Seattle, WA  98115   
>    (206) 526-6317   main
> reception
> 
> [email protected]
> _______________________________________________
> FloatCanvas mailing list
> [email protected]
> http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
> 
_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to