W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

[whatwg] <canvas> drawing with singular transforms and zero-sized gradients

From: Robert O'Callahan <robert@ocallahan.org>
Date: Sat, 25 Jun 2011 15:00:09 +1200
Message-ID: <BANLkTin4_FKbDyX-ZynyDfm2gPex363Jtg@mail.gmail.com>
On Sat, Jun 25, 2011 at 5:38 AM, Aryeh Gregor <Simetrical+w3c at gmail.com>wrote:

> If you define different behavior for solid colors or gradients,
> doesn't that mean that they'll behave differently from if you used an
> image that looked exactly the same?  That seems bad.

If you set up a path covering the entire canvas, call ctx.scale(e, e) for
infinitesimal e, and then fill with an image pattern, conceptually you're
scaling the image to be incredibly small and then repeating it a very large
number of times to fill the canvas. So I guess the logical behavior for e=0
would be to compute the average color of the image pixels and do a solid
fill with that color, which would give you that consistency you're asking
for. But is that worth implementing? No-one does that today.

"If we claim to be without sin, we deceive ourselves and the truth is not in
us. If we confess our sins, he is faithful and just and will forgive us our
sins and purify us from all unrighteousness. If we claim we have not sinned,
we make him out to be a liar and his word is not in us." [1 John 1:8-10]
Received on Friday, 24 June 2011 20:00:09 UTC

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