Hi Thorbjoern,
On 24.08.04, Thorbjoern M. Pedersen wrote:
> I want to ensure at certain space between figures when I combine several
> figures in canvases in one final canvas. For instance, I draw a number
> of circles upon a canvas from a list of coordinates and radii. Then I
> would like to calculate the bbox and subsequntly scale the canvas and
> add some margin according to some arbitrary wish (say I know the size of
> the resulting bbox). Finally I insert such a number of canvasses into
> one final all-containing canvas. My problem seems to be that I cannot
> modify (scale, clip, etc) the canvas once created before I insert it
> into another canvas.
Maybe I do not understand correctly what you want, but you can do the
following:
c = canvas.canvas()
sc = canvas.canvas()
# do whatever with sc
c.insert(sc, [trafo.scale(1, 2)])
Jörg

Hi Markus,
I want to ensure at certain space between figures when I combine several
figures in canvases in one final canvas. For instance, I draw a number
of circles upon a canvas from a list of coordinates and radii. Then I
would like to calculate the bbox and subsequntly scale the canvas and
add some margin according to some arbitrary wish (say I know the size of
the resulting bbox). Finally I insert such a number of canvasses into
one final all-containing canvas. My problem seems to be that I cannot
modify (scale, clip, etc) the canvas once created before I insert it
into another canvas.
I hope this a bit more clearer (although I fear it is not :-)
Best wishes
Thorbjoern
On Tue, Aug 24, 2004 at 09:14:07AM +0200, Markus Meyer wrote:
> Thorbjoern,
>
> do you want to change the bounding box (which IMHO is nonsense most of
> the time because the bbox is defined exactly by the appearance of the
> canvas) or do you rather want to modify the appearance (that is,
> rotate/scale/offset/clip the canvas)? What's your specific use case?
>
>
> Markus
>
> Am Mon, den 23.08.2004 schrieb Thorbjoern M. Pedersen um 13:20:
> > Dear list,
> >
> > I would like to manipulate the bbox of a allready defined canvas, but I don't
> > know how to do it. To be more explicit: I would like to combine several
> > canvases into one which bbox I subsequently modify.
> >
> > Best wishes
> >
> > Thorbjoern
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> > _______________________________________________
> > PyX-user mailing list
> > PyX-user@...
> > https://lists.sourceforge.net/lists/listinfo/pyx-user
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> PyX-user mailing list
> PyX-user@...
> https://lists.sourceforge.net/lists/listinfo/pyx-user

Thorbjoern,
do you want to change the bounding box (which IMHO is nonsense most of
the time because the bbox is defined exactly by the appearance of the
canvas) or do you rather want to modify the appearance (that is,
rotate/scale/offset/clip the canvas)? What's your specific use case?
Markus
Am Mon, den 23.08.2004 schrieb Thorbjoern M. Pedersen um 13:20:
> Dear list,
>
> I would like to manipulate the bbox of a allready defined canvas, but I don't
> know how to do it. To be more explicit: I would like to combine several
> canvases into one which bbox I subsequently modify.
>
> Best wishes
>
> Thorbjoern
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> PyX-user mailing list
> PyX-user@...
> https://lists.sourceforge.net/lists/listinfo/pyx-user

Hi,
On 23.08.04, Thorbjoern M. Pedersen wrote:
> I would like to manipulate the bbox of a allready defined canvas, but I don't
> know how to do it. To be more explicit: I would like to combine several
> canvases into one which bbox I subsequently modify.
One possibility is to overwrite the canvas bbox method to return
whatever *you* want:
class mycanvas(canvas.canvas):
def setbbox(self, bbox):
self.mybbox = bbox
def bbox(self):
return self.mybbox
I haven't tried this code right now, but I remember that I did a
similar trick myself before. Hope it helps for you as well ...
André
--
by _ _ _ Dr. André Wobst
/ \ \ / ) wobsta@..., http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX
(_/ \_)_/\_/ visit http://pyx.sourceforge.net/