Yes it works very well! I used 0.99 instead of 0.95, and it is what I was looking for.
Thank you again, Jo 2014-01-30 Chris Barker - NOAA Federal <[email protected]>: > On Jan 29, 2014, at 5:03 PM, Nouvelle Collection < > [email protected]> wrote: > > Thank you very much Chris. > > Is that working well for you? > > Chris > > > > > 2014-01-29 Chris Barker <[email protected]> > >> On Wed, Jan 29, 2014 at 8:21 AM, Chris Barker - NOAA Federal < >> [email protected]> wrote: >> >>> Just looked at the code, and no -- it turns out I hard-coded that in. >>> It should be a setable parameter, perhaps an optional argument. >>> >>> But you can specify the BB that you want to zoom to, rather than it >>> calculating it for you. It will still adjust the scale ( that wasn't >>> well thought out). Do you'll need to hand-adjust your provided BB by >>> 1/0.95 really kludge, I know. I'll see about a patch to fix this. >>> >> >> OK -- I added a parameter so you can set that: >> >> def ZoomToBB(self, NewBB=None, DrawFlag=True, margin_adjust=0.95): >> >> """ >> >> Zooms the image to the bounding box given, or to the bounding >> box of all the objects on the canvas, if none is given. >> >> :param NewBB=None: the bounding box you want to zoom in to. >> If None, it will be calcuated from all the >> objects on the Canvas. >> :type NewBB: floatcanvas.utilities.BBox.BBox object (or something >> compatible). >> >> :param DrawFlag=True: If True, will force a re-draw, regardless >> of whether >> anythign has changed on the Canvas >> >> :param margin_adjust=0.95: amount to adjust the scale so the BB >> will have a >> bit of margin in the Canvas. 1.0 shoud >> be a tight fit. >> >> :type margin_adjust: float >> >> """ >> >> It's in the code in SVN. I'm also enclosed the file here, you may be able >> to drop it right in. >> >> -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://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas >> >> > _______________________________________________ > FloatCanvas mailing list > [email protected] > http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas > > > _______________________________________________ > FloatCanvas mailing list > [email protected] > http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas > >
_______________________________________________ FloatCanvas mailing list [email protected] http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
