kicad-developers team mailing list archive
Mailing list archive
Re: antialiased graphics
Dick Hollenbeck <dick@...>
Sun, 04 Jan 2009 21:06:27 -0600
Thunderbird 188.8.131.52 (X11/20081125)
Vesa Solonen wrote:
I made some very simple tests for antialiasing graphics on wxGTK. Mostly
I experimented with wxpython demo package to get a grip how stuff is
done. Attached is two line patch and results with wxGCDC wrapper. It
seems there is quite a work to do for proper future proof graphics
update. Currently there is no caching so it takes a long time to draw
all primitives and for high quality, drawing needs to be ported to some
path based api. From the screenshot it can be clearly seen that every
path style primitives (circles, boxes) draw nicely, but (font)
connections get messed because of rounding errors or something. Redraw
is not implemented, so to get antialiased display minimize–maximize
cycle or 'painting' with other window has to be done. Also dot grid is
messed like fonts.
Some links I used for inspiration:
The last one as an example of what caching gives and
http://www.cairographics.org/ capabilities demo, which is used on wxGTK.
Bug http://trac.wxwidgets.org/ticket/4187 almost got me – I saw what was
going on, but didn't know why.
I am excited about wxGraphicsContext class. I am not excited about the
wxGCDC class. I am not sure I understand the thinking behind wxGCDC.
It only exposes the wxDC API, which is not as rich as the
Without using wxGCDC, at any point in newly written code, a call can be
wxGraphicsContext* Create(const wxWindowDC& dc)
as part of the window's drawing function.
Then the returned wxGraphicsContext* can be used to draw into the
The path support brings irregular border capability to filled areas and
is a richer base to build on. However, it relies on "double" not
I am not excited about the patch. I would get excited about using the
wxGraphicsContext class after the February release.
It is not clear to me why the refresh is not working. But this is a
major new study that could probably be put off until after the release.
Just my 2 cents.
*Create*(*const wxWindowDC <cid:part2.04090502.04020009@...>& */dc/)