[Mono-winforms-list] Help contributing to libgdiplus and Cairo integration

Jordi Mas jordi at ximian.com
Wed Oct 5 09:14:41 EDT 2005


Hi all!

As you probably know Cairo 1.0 includes antialiasing support. This is
something important for libgdiplus because all the drawing operations in
System.Windows.Forms are based on the old Windows GDI and they use no
antialiasing.

After turning antialiasing off in Cairo 1.0 we noticed that DrawLine and
other functions basic drawing functions started to work different that
expected. With antialiasing off in Cairo lines that are supposed to be a
single pixel width have various variations in width. 

This a well-know and documented issue. John Hobby did his PhD on the
solution to this problem. There is a shorten version of PhD findings on
the web:

[Hobby89] John D. Hobby, Rasterizing Curves of Constant Width, JACM
36(2), 1989.
http://cm.bell-labs.com/who/hobby/87_2-04.pdf

In order to fix this problem the best solution is to implement an
algorithm to generate Hobby's "Pen polygons". These respect the desired
width and will make us to look right when AA is off. According to Cairo
hacker's, a hack in cairo-pen.c:_cairo_pen_init with Hobby's algorithm
will fix the problem.

We are looking for someone that wants to contribute to the Mono project
in graphics area and help us implementing Hobby's Pen polygons in Cairo.

Thanks,

Jordi,
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas




More information about the Mono-winforms-list mailing list