[webkit-dev] Antialiasing & GraphicsContext::drawLine

Dan Bernstein mitz at apple.com
Sat Mar 13 09:21:35 PST 2010


On Mar 13, 2010, at 9:06 AM, Sausset François wrote:

> I recently began to work on the square root implementation in MatML and I'm near to submit a patch.
> But as I'm new to WebKit development, I have a beginner question:
> 
> To draw the square root, the GraphicsContext::drawLine method is called but it is written (in comments) to use it only for borders.
> Moreover this method enforces to turn antialiasing off.
> I have two possibilities:
> - modify that method to allow (optional) antialising
> - use other methods. It should be better but I don't know which one is adapted.
> Ideally, a polyline method should be great. Is there such a method? Probably yes, as SVG & Canvas need advanced drawing.
> Any help is welcome!

You can construct a Path object, use the path methods to add a line (or lines) and then use GraphicsContext::beginPath(), GraphicsContext::addPath() and GraphicsContext::strokePath().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20100313/aab20e9d/attachment.html>


More information about the webkit-dev mailing list