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!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.
(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 work2) 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.
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 -- 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]
<<inline: PieSample.png>>
_______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
