Lanier, Paul wrote:
> Hey Robin,
>
> I've finally got what I think is a good initial
version of the PseudoDC.
> Attached is the .cpp/.h/.i and PseudoDC.py which is a
demo that fits in
> the existing wxPython demo framework. In addition to
the demo, I've
> fiddled around with it some just to make sure that
every method actually
> works. Also, I've already using this in an
application of mine that is
> being used by several people where I work.
>
> I do already have a few things I plan to add in the
future:
> - Object level hit testing to easily match (x,y) with
an object id.
> - Methods to manipulate the Z order of objects
>
> Also, I didn't mirror every method from wx.DC because
not all the
> methods are useful in a recorded list. The attached
file diff.out is a
> list of all the methods not mirrored. If you think I
should add
> something then let me know. In addition to not
mirroring some methods,
> a few methods had return values that aren't supported
in PseudoDC since
> I won't know the return value until the list is played
back.
>
> Let me know if you need something else. I did all my
testing with
> 2.6.3.2 so the .i file I have is in that style.
Looks good. However I noticed that when the density of
visible objects
increases then so does the CPU overhead when drawing the
items. For
example, setting the demo parameters like this:
W = 1000
H = 1000
SHAPE_COUNT = 1000
will max out the CPU on my Linux box. So much so in fact
that all of
the time is spend servicing the timer and other events are
not being
sent. but if I increase the width and height to 10000 (thus
greatly
lowering the object density) then it does fine. So I wonder
if you can
think of any additional strategies for optimizations that
would fit in
with what you have so far?
--
Robin Dunn
Software Craftsman
http://wxPython.org Java
give you jitters? Relax with wxPython!
------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-dev-unsubscribe lists.wxwidgets.org
For additional commands, e-mail: wxPython-dev-help lists.wxwidgets.org
|