[Bug 14562] New: According to the website, Canvas2D is one of the specifications that are on "last call", so here's what I'd still like to see (one graphics, two typographical, all three known irks for many people who actually use canvas): - an elliptical arc command in a

http://www.w3.org/Bugs/Public/show_bug.cgi?id=14562

           Summary: According to the website, Canvas2D is one of the
                    specifications that are on "last call", so here's what
                    I'd still like to see (one graphics, two
                    typographical, all three known irks for many people
                    who actually use canvas): - an elliptical arc command
                    in a
           Product: HTML WG
           Version: unspecified
          Platform: Other
               URL: http://www.whatwg.org/specs/web-apps/current-work/#top
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML Canvas 2D Context (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: contributor@whatwg.org
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Specification: http://www.w3.org/TR/2dcontext/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
According to the website, Canvas2D is one of the specifications that are on
"last call", so here's what I'd still like to see (one graphics, two
typographical, all three known irks for many people who actually use canvas):

- an elliptical arc command in addition to the circular arc command. For nice
graphics, you need the elliptical arc, and a separate circular arc is a bonus
because you can perfectly reproduce a circle with an ellipse. As such, please
add an elliptical arc command to the API. It won't break work already done by
people so far, it's not a lot of work to implement for browser makers, and for
the end user it will offer a fast and correct arcing command, unlike
artificial solutions involving rolling your own approximation using bezier
curves or implementing the midpoint algorithm every time you need an
elliptical arc.

- a more elaborate font metrics object such as currently shimmer on
https://github.com/Pomax/fontmetrics.js so that graphics involving text that
has to interact with the canvas graphics (like every game that uses canvas2d,
for instance) stops being a headache. This also won't break work already done
by people so far, and will make life a lot easier for people who actually use
canvas. More importantly, it makes canvas more interesting for people who
currently forego canvas for things like flash because just text width is not
enough to work with text-as-graphics (something very different from working
with text).

- support for multiline text. more people than you think want to use
graphics-manipulable text on their canvas. As the graphics contact for
canvas2D is expressly not a text element, please undo the decision to treat
text rasterised onto it the same as text intended for page placing, and treat
whitespace characters such as spaces and newlines as distinct instructions.
This will still not break work already done by people so far because they will
have implemented their workarounds to do exactly what a proper implementation
would do anyway.

Yes, there are ways around all these limitations (obviously. any competent
HTML programmer can spend a day writing code that circumvent these gaps in the
Canvas2D API and end up with something that'll do the job, "until they add it
to the API"), but all of these involve highly artificial solutions that only
approximate the desired result, requiring lots of code to get to a result that
should only take a fraction of the time required if it were in API. Life can
still be made (lots) better for people who actually use Canvas2D.

Regards,

- Mike "Pomax" Kamermans
processing.js


N.B.: I am well aware of the difference between "text" and "text in a graphics
context". No, using overlay divs for text does not make sense, because you
can't blend that text into the graphics context. The intent is not to "place
text on the page", on top of a canvas, it's to use text as another graphics
primitive in a graphics context, giving us pixels that can be manipulated,
with corresponding metrics. Not "letters". Turning that text from "what we
specify" into "a completely different string" is not understanding the
difference between the page, and the graphics context. I am also well aware
that elliptical arcs can be approximated, which is nonsense when there is
already an API, and code in place in browsers, for circular arcs. The
extension to also having an elliptical arc is trivial, while offering a
essential graphics primitive.

Posted from: 205.250.164.138
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like
Gecko) Chrome/14.0.835.202 Safari/535.1

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 25 October 2011 18:04:36 UTC