Hi. I am trying to make a widget that draws a map of a hard drive. It's a huge map. I'm looking into using Floatcanvas but am also considering using a big bitmap or a widget that does custom drawing.
My question: If a widget is in a scroller, is there any way to find out what part is exposed and only redraw that part?
Thanks.
Simson Garfinkel wrote:
Hi. I am trying to make a widget that draws a map of a hard drive. It's a huge map. I'm looking into using Floatcanvas but am also considering using a big bitmap or a widget that does custom drawing.
if you want to be able to zoom and scroll/pan, then you really should,d use FloatCanvas or FloatCanvas2
a really big bitmap will work well if it's not too big -- it's easy to put it on wx.ScrolledWindow.
My question: If a widget is in a scroller, is there any way to find out what part is exposed and only redraw that part?
If you subclass wx.ScrolledWindow, it should take care of that for you. Also, FloatCanvas does all sorts of smart things along those lines.
-CHB
···
--
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
Chris.Barker@noaa.gov
Will FloatCanvas like handling a million individual objects?
···
On Jan 21, 2009, at 8:17 PM, Christopher Barker wrote:
Simson Garfinkel wrote:
Hi. I am trying to make a widget that draws a map of a hard drive. It's a huge map. I'm looking into using Floatcanvas but am also considering using a big bitmap or a widget that does custom drawing.
if you want to be able to zoom and scroll/pan, then you really should,d use FloatCanvas or FloatCanvas2
a really big bitmap will work well if it's not too big -- it's easy to put it on wx.ScrolledWindow.
My question: If a widget is in a scroller, is there any way to find out what part is exposed and only redraw that part?
If you subclass wx.ScrolledWindow, it should take care of that for you. Also, FloatCanvas does all sorts of smart things along those lines.
-CHB
--
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
Chris.Barker@noaa.gov
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Simson Garfinkel wrote:
Will FloatCanvas like handling a million individual objects?
it should -- you can't really display that many at once anyway, and it does cull. It also depends on how complex the objects are to draw -- if they are complex, it could take a while.
But give it a try.
I'd suggest you join the mailing list at:
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
and discuss further there.
-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
Chris.Barker@noaa.gov