List Info

Thread: radialGradient fx and fy




radialGradient fx and fy
user name
2006-03-15 16:18:47
Hi guys,

While testing how implementations inherit fx and fy I
discovered that Batik 
doesn't seem to render radialGradient elements with these
attributes correctly. 
It inherits them fine, but the mapping of stop locations
doesn't seem quite 
right. I've got a testcase at:

   http://jwatt.org/svg/tests/grad-radial-fx-cx-vs-i
nheritance.svg

if you care to take a look. The hole punched through the
gradient should line up 
directly with the green circle (with a little overlap to
make sure no red shows 
around the edge).

Regards,
Jonathan

------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-dev-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-dev-helpxmlgraphics.apache.org

radialGradient fx and fy
user name
2006-03-15 17:55:13
Hi Jonathan,

Jonathan Watt <jwattjwatt.org> wrote on 03/15/2006 11:18:47
AM:

> While testing how implementations inherit fx and fy I
discovered that 
Batik 
> doesn't seem to render radialGradient elements with
these attributes 
correctly. 
> It inherits them fine, but the mapping of stop
locations doesn't seem 
quite 
> right. I've got a testcase at:

   This is caused by the clamping of the fx/fy at the edge
of the circle.
We currently clam fx/fy at r*.97 In this case that is
several pixels
from the edge of the radial gradient circle.  You can't let
it get too
close to the edge or the math and gradients go all wonky. 
I've
modified the SCALEBACK coef to be .999 instead of .97 and it
"gets
the red out".

   I'll run a few examples and see if this causes any
problems (I
am a bit surprised the SCALEBACK was so far from 1).

>    http://jwatt.org/svg/tests/grad-radial-fx-cx-vs-i
nheritance.svg
> 
> if you care to take a look. The hole punched through
the gradient should 
line up 
> directly with the green circle (with a little overlap
to make sure no 
red shows 
> around the edge).


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-dev-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-dev-helpxmlgraphics.apache.org

radialGradient fx and fy
user name
2006-03-15 18:03:35
Hi Thomas,

thomas.deweesekodak.com wrote:
> Hi Jonathan,
> 
> Jonathan Watt <jwattjwatt.org> wrote on
03/15/2006 11:18:47 AM:
> 
>> While testing how implementations inherit fx and fy
I discovered that 
> Batik 
>> doesn't seem to render radialGradient elements
with these attributes 
> correctly. 
>> It inherits them fine, but the mapping of stop
locations doesn't seem 
> quite 
>> right. I've got a testcase at:
> 
>    This is caused by the clamping of the fx/fy at the
edge of the circle.
> We currently clam fx/fy at r*.97 In this case that is
several pixels
> from the edge of the radial gradient circle.  You
can't let it get too
> close to the edge or the math and gradients go all
wonky.  I've
> modified the SCALEBACK coef to be .999 instead of .97
and it "gets
> the red out".

ASV 6 seems to use a scaleback much closer to 1 than .97, so
hopefully that 
change won't cause any problems. I'm quite surprised by
the value too. It seems 
like a rather large margin.

Jonathan

------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-dev-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-dev-helpxmlgraphics.apache.org

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )