Re: svg2: Add CSS gradient as paint server for 'fill' and 'stroke'. Fixed...

On Tue, Sep 4, 2012 at 10:08 AM, Dirk Schulze <dschulze@adobe.com> wrote:
> On Sep 4, 2012, at 10:02 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> On Tue, Sep 4, 2012 at 9:23 AM, Dirk Schulze <dschulze@adobe.com> wrote:
>>> Sadly you did not call in. The concerns were not the support of CSS. The main concerns were if an <image> does not fit in the boundaries of an element. What should happen? Do we repeat? Do we just repeat horizontal? Vertical? Do we stretch? Note that we don't have the same control as background has on full and stroke. This needs to be clarified first. The usage of <gradient> at the beginning was less controversial and interacts like a paint server in SVG which is not necessarily the case for the other image types.
>>
>> Note that there is *literally zero difference* between <gradient> and
>> the more general <image> in these questions.  Limiting to just
>> <gradient> for now saves you zero work, and just makes things less
>> convenient for authors.
>>
> I gave you the exact problems for <image>. Can you point out where you see the problems for <gradient>? I might have missed some points, but currently I don't see the comparison of <gradient> to the other <image> types.

I just said.  Every question you bring up, applies *exactly* to
<gradient>.  If you think they don't, you don't understand how CSS
gradients work. :/

A <gradient> needs a gradient box to draw in (in CSS, it uses the
concrete object size; in general, it should be the size of the
painting area).  It fills said box.  If the box itself isn't as large
as the painting area, the gradient doesn't stretch or repeat - it's
drawn once, into the size provided, and that's it.

The only additional issue that some <image> subtypes have is that they
may have an intrinsic size different from the size of the painting
area.  In my response (which was below the part you quoted, so I've
trimmed it out), I stated how to resolve that - it just depends on
whether the "painting area" is similar to 'background-size' or the
"background positioning area".  If the former, the image is stretch to
fill it.  If the latter, it just paints at its intrinsic size in the
top-left corner.  This is the sole question that is different between
<gradient> and general <image>s, and is just because <gradient> has no
intrinsic size (like an <svg> without 'width', 'height', or
'viewBox').

~TJ

Received on Tuesday, 4 September 2012 17:19:06 UTC