On Thu, May 15, 2014 at 9:42 PM, Farrukh <[email protected]> wrote:

>  Thank you :)
>
> Height = self.bmp.GetHeight()
> BB =Utilities.BBox.asBBox( ((-790,Height/4), (790,Height/4)) )
> self.canvas.ZoomToBB(NewBB=BB)#bmp = wx.Bitmap(self.imgld,
> wx.BITMAP_TYPE_PNG)
>

note, I don't think you need to do the call to:

Utilities.BBox.asBBox -- I'm pretty sure ZoomToBB wll do that internally if
you pass in nested tuples.

this solved pretty much what i had in mind. there is another thing what
> wanted to ask you when i add object to canvas it's fill color is not semi
> transparent
>

Well.....

I started FloatCanvas a long time agin, when wx did not support
transparency. The entire thing is built on a wxDC, which does not support
transparency.

However: wx now has a wxGCDC, which provides the DC interface, backed by a
GraphicsContext, so it would not be too huge a job to add transparency
support -- but it would trickle through a lot of code.

In the meantime, you can hack it in to a particular object. See:

http://trac.paulmcnett.com/floatcanvas/wiki/AlphaCircle

For an example. That's pretty simple if  you just need a couple of object
types to support it.

If anyone wants to contribute full Alpha support, that would be great!

-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

Reply via email to