[webkit-dev] Antialiasing & GraphicsContext::drawLine

Sausset François sausset at gmail.com
Sat Mar 13 09:06:08 PST 2010


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!

Thanks in advance,

François Sausset


Le 18 févr. 2010 à 19:38, Alexey Proskuryakov a écrit :

> 
> Your question is not about WebKit development, so it should be directed to webkit-help mailing list. I've answered below, but please choose a correct e-mail list in the future.
> 
> Please note that linking directly to WebCore is most definitely unsupported and extremely fragile. One should always be using platform-specific WebKit APIs.
> 
> On 17.02.2010, at 18:27, Steve Hanna wrote:
> 
>> 136     WebCore::XPathResult* xpr = doc->evaluate(query,
>> dynamic_cast<WebCore::Node*>(doc), NULL,
> 
> 
> The XPathResult object is destroyed at this point, so the rest of the code operates on freed memory. One needs to keep the reference in RefPtr. Also, you don't need dynamic_cast when downcasting - and we build WebCore with RTTI disabled anyway.
> 
> RefPtr<WebCore::XPathResult> xpr = doc->evaluate(query, doc, 0, WebCore::XPathResult::UNORDERED_NODE_ITERATOR_TYPE, NULL, ec);
> 
> - WBR, Alexey Proskuryakov
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



More information about the webkit-dev mailing list