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

[whatwg] Canvas context.drawImage clarification

From: Gregg Tavares <gman@google.com>
Date: Wed, 29 Jul 2009 23:26:31 -0700
Message-ID: <de4bd3190907292326j20e7fe8fmb62c79de29cfd21b@mail.gmail.com>
On Tue, Jul 28, 2009 at 4:07 AM, Aryeh Gregor
<Simetrical+w3c at gmail.com<Simetrical%2Bw3c at gmail.com>
> wrote:

> 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.


If it's so clear, why do you think 2 of the 4 browsers that implemented it
apparently got it wrong?

Would making the spec more explicit have avoided their mis-intepretation?




>
>
> 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).
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090729/398fa17d/attachment.htm>
Received on Wednesday, 29 July 2009 23:26:31 UTC

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