[whatwg] Canvas context.drawImage clarification

Gregg Tavares gman at google.com
Wed Jul 29 23:26:31 PDT 2009


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


More information about the whatwg mailing list