W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2009

[whatwg] Canvas context.drawImage clarification

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Tue, 28 Jul 2009 07:07:41 -0400
Message-ID: <7c2a12e20907280407m40de909fl77f2f3ae96e79888@mail.gmail.com>
On Tue, Jul 28, 2009 at 1:41 AM, Gregg Tavares<gman at google.com> wrote:
> It's ambiguous because images have a direction.? An image that starts at 10
> with a width of -5 is not the same as an image that starts at 6 with a width
> of +5 any more than starting in SF and driving 5 miles south is not the same
> as starting in Brisbane and driving 5 miles north.
>
> The spec doesn't say which interpretation is correct.

I think it's extremely clear.  The spec gives four points which
determine a rectangle, which are in no particular order.  The image is
rectangular, and is mapped into that rectangle.  Rectangles have no
orientation, and the operation "paint the source region onto the
destination region" couldn't possibly be interpreted as requiring
reorientation of any kind.

I think you got misled by the diagram, and now aren't reading the
normative text of the spec carefully enough -- it's *very* specific
(like most of HTML 5).
Received on Tuesday, 28 July 2009 04:07:41 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:14 UTC