Canvas and anti-aliasing

323 views
Skip to first unread message

Christopher Piggott

unread,
Sep 9, 2011, 11:54:26 AM9/9/11
to Google Web Toolkit
Hi,

I made an analog gauge using GWT Canvas but the needle isn't anti-
aliased so it doesn't look so hot. Is there a way to draw
using .lineTo() and get a nice anti-aliased line?

--Chris

Jamie

unread,
Sep 9, 2011, 2:57:16 PM9/9/11
to Google Web Toolkit
I do not believe you can control this, but rather, it is left up to
the browser / OS.
I have done some html5 drawings that are anti-aliased, with FF on
Windows and Linux.

What browser and OS are you using?

Also, you can just try adjusting the line width.

David Chandler

unread,
Sep 9, 2011, 3:06:03 PM9/9/11
to google-we...@googlegroups.com
According to http://www.html5rocks.com/en/tutorials/canvas/performance/, if you draw with sub-pixel coordinates, Canvas will automatically do anti-aliasing.

HTH,
/dmc


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
Reply all
Reply to author
Forward
0 new messages