On Mon, 2007-08-27 at 09:42 -0700, Christopher Barker wrote: > Tim Ansell wrote: > > It seems to have some problems at very small zoom levels, IE around > > 10-15 pixel across (which is what I really need it for). > > That's a tiny pie chart!
See the other mail for the reason :) > When I make it that small, I do seem to get some issues with the > "slices" lining up -- it looks like a result of rounding to integer > pixels. Is that what you're seeing? Maybe you could post a sample of > your results, to make sure we're talking about the same thing. I've > enclosed a shot of what I'm seeing. Yes exactly the same problem. > > > (Is there anyway to turn on anti-aliasing?) > > Not at all easily. wx.DC does not support anti-aliasing. The new > wx.GraphicsContext does, but I haven't had the chance to convert to > that. There are a couple issues: > > 1) It's a fair bit of work > 2) Apparently, the performance is considerably slower, which would be a > problem for some uses. The is certainly true if you use the > wx.GraphicContextDC, which would be the easiest way to make the change. > You can improve performance by using the GraphicsContext more natively, > and caching paths, and all, but then, that's more work. Some day. > > That being said, you could probably hack together something that just > used GraphicsContext for your object. If nothing else, you could use > GraphicsContext to draw to a bitmap, then blit that to the FloatCanvas DC. Well, I would actually like anti-aliasing for the whole thing. Speed isn't that a huge issue as 90% of my things are static (and hence in the "background" which wouldn't need re-rendering often). I don't really have the time to do the port however. I'm in a little rush to try and get the client into a usable shape before I have to start a full time job. Is the DC stuff already using this stuff on Mac OS X? The lines looks "cleaner" but there seem some "movement" of the pixel aligned points. See this screen shot -> http://www.guitsaru.com/TP-OSX-Popup.png > > The name is a little bit of a misnomer, because unlike a "Point" object, > > the diameter of the object is changed by the zoom level. I really need a > > version where the diameter is not effected by the Zoom level (in the > > same way a Point works). > > So you want to be able to specify the diameter of your pie chart in > Pixel coords, and it's location in world coords, just like a point? > That's actually pretty easy, except for the BoundingBox. As the object > changes size in World Coords, it has no fixed BB in those coords. In the > Case of Point (and un-scaled text) I just set the BB to the center > point, and it then only gets drawn if that point is visible (so you > never get half a point -- if you can live that, then no problem. > > -Chris Yes, exactly. Thanks for your help. Tim Ansell _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
