Hello, everyone.
I’m Yuan Chen, a college student from China. I will have plenty of time to join GSoC 2015 and I have send two patches about mshtml.dll before and now I study gdi32 module and the Computer Graphics.
Here is my idea for GSoC 2015.
Improve the basic drawing functions and add GM_ADVANCED mode support ===================================== I found several bugs which show many basic curve and fonts drawing functions don’t support the GM_ADVANCED mode[1][2][3]. And the curve will become odd under this mode. I have written a test case to show these problems[9].
1.add GM_ADVANCED mode support When I find that wine use polygon to fit the rect in GM_ADVANCED mode(polygon function is not good enough according to [4]). So I think we can use bezier spline or B spline to fit the curve like ellipse or arc in GM_ADVANCED mode[5][6]. There is also a paper about fonts capturing[7]. So the driver functions of curve and fonts like draw_arc, draw_glyph will be improved and added the GM_ADVANCED support.
2.improve the basic drawing functions In order to fix those above, we need to improve and add some basic helper functions in dlls/gdi32/dibdrv/graphics.c. get_arc_points will be improved and some helper functions will be added which help to calculate the coordinate of points of the curves in GM_ADVANCED mode.This part will take about three weeks. The bezier function need to be improved to n points instead of 3n+1 points according to Bresenham’s Algorithm[8]. This function will take less than one week. And I also try to improve the ellipse_first_quadrant functions using the Bresenham’s Algorithm.[10]
Perhaps my idea is not mature enough, I will be appreciate it very much if anyone give me some advice! Thanks!
[1]https://bugs.winehq.org/show_bug.cgi?id=33190 [2]https://bugs.winehq.org/show_bug.cgi?id=35333 [3]https://bugs.winehq.org/show_bug.cgi?id=35169 [4]https://bugs.winehq.org/show_bug.cgi?id=36891 [5]http://sarahfrisken.com/efficientCurveFitting.pdf [6]http://www.dtic.mil/dtic/tr/fulltext/u2/a350611.pdf [7]http://www.cs.uml.edu/~wanthony/91.427_f2008/cglr1/reference.pdf [8]http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm [9]see the attachment “testforadvanced.txt" [10]see the attachment "0001-gdi32-Improve-the-algorithm-of-ellipse_first_quadrant.txt"
---------------------------------------- Best Regards , Yuan Chen