[whatwg] Canvas context.drawImage clarification
oliver at apple.com
Thu Jul 9 16:28:16 PDT 2009
On Jul 9, 2009, at 4:19 PM, Gregg Tavares wrote:
> On Thu, Jul 9, 2009 at 4:11 PM, Oliver Hunt <oliver at apple.com> wrote:
> I'd like to make a passionate plea that the spec say
> "implementations must
> support negative widths and negative heights and draw the image
> effectively flipping the result".
> We'd need to be fairly sure that such a change would not break
> existing content -- this is a change that would result in
> substantially different rendering in some scenarios.
> Given that it's inconsistent in the various browsers it's hard to
> see how this would break something since it's broken in 2 browsers
> one way or the other currently.
Inconsistency doesn't lead to no one depending on a behaviour, it just
means sites only work in one browser. Your suggesting would result in
sites being broken in all browsers -- the only options from here on
out are either nothing gets drawn (as in gecko and presto), or the
destination is normalised (as in webkit)
> Image scaling is implementation dependent everywhere else, why would
> it be spec defined in the case of canvas?
> There are 2 issues here I brought up
> 1) What happens at the edges.
> The results are VASTLY different now. Unless this works consistently
> it would be hard to make canvas graphics work across browsers and
> expect get reproducible results. The 2x2 pixel example I gave, one
> browser ends up scaling with translucency even though there is no
> translucent pixels in the source image.
This is just an artifact of scaling, and you agree below that scaling
is implementation dependent.
> 2) How it does the scaling.
> I agree that it being implementation dependent is probably fine.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg