W3C home > Mailing lists > Public > www-svg@w3.org > June 2006

Re: Animating length values on gradients

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 19 Jun 2006 22:36:01 +1000
To: www-svg@w3.org
Message-ID: <20060619123601.GA628@port.mcc.id.au>

Hi Doug.

Doug Schepers:
> Actually, in the case of percentages in the lexical space, there should
> always be a computed value in the value space, since there must be a
> percentage of some number, be it the viewport's dimensions or the bbox of an
> element. Therefore, the UA should interpolate between the computed values.

But that percentage→user unit value conversion can only be relevant for
each different element that references the linearGradient.  Since the
SVGLinearGradientElement interface has SVGAnimatedElement attributes on
it for the lengths that define the gradient space, there must be
single, interpolated values, independent of the referencing elements,
that will be stored as the current animated values.

For example:

  <svg width="1000" height="1000">
    <linearGradient id="g" gradientUnits="userSpaceOnUse">
      <animate attributeName="x1" begin="0s" dur="5s" from="50%" to="150"/>

    <rect id="r1" width="100" height=”100" fill="url(#g)"/>

    <svg width="200" height="200">
      <rect id="r2" width="100" height=”100" fill="url(#g)"/>

The gradient is referenced from two coordinate systems: the outer 'svg'
element, where percentages are proportions of 1000, and the inner 'svg'
element, where percentages are proportions of 200.  If the value of


were queried at 1s, what value would it have?

Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au
Received on Monday, 19 June 2006 12:36:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:08 UTC