You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Nielsen, Clinton" <Cl...@Intuit.com> on 2003/07/02 21:25:11 UTC
RE: [Fwd: Re: exporting RadialGradientPaint to .SVG]
-----Original Message-----
From: Christophe Jolif [mailto:cjolif@ilog.fr]
Sent: Tuesday, July 01, 2003 1:05 AM
To: tinclon@mindless.com
Subject: [Fwd: Re: exporting RadialGradientPaint to .SVG]
Thank you, that should actually help. I've had no problem redefining the
handlePaint() method, but I'm still a little lost with the
SVGPaintDescriptor.
What exactly is the correct SVGPaintDescriptor for the
RadialGradientPaint???
When I set a SVGPaintDescriptor of any type, it automatically changes the
paint for the entire SVG file, rather than the paint for each object within
that file.
I tried some lines of code, such as the following (just for testing), always
with the same result.
return ((paint==null)?null:new SVGPaintDescriptor("none", "0.4"));
Any clues on what I'm doing wrong??
Thanks muchly
--Tinclon
-------- Original Message --------
Subject: Re: exporting RadialGradientPaint to .SVG
Date: Tue, 01 Jul 2003 09:04:40 +0200
From: Christophe Jolif <cj...@ilog.fr>
Reply-To: "Batik Users" <ba...@xml.apache.org>
Organization: ILOG S.A.
To: Batik Users <ba...@xml.apache.org>
References: <BF...@edex01.intuit.com>
Hi,
The SVGGraphics2D implementation only exports to SVG the regular Java 2D
Paint
object. The RadialGradientPaint is a Batik extension and unfortunately its
export has not be coded in the SVGGraphics2D. However it should be quite
simple to add such a support, you can even do it from the outside by
subclassing the DefaultExtensionHandler and redefining the handlePaint()
method such that it creates the right SVGPaintDescriptor for the
RadialGradientPaint.
Hope this helps.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: [Fwd: Re: exporting RadialGradientPaint to .SVG]
Posted by Christophe Jolif <cj...@ilog.fr>.
Nielsen,
See: http://xml.apache.org/batik/svggen.html ("extending Paint object to SVG
element translation" section) for an example of a SVGPaintDescriptor you
should build.
Hope this helps.
Nielsen, Clinton wrote:
>
> -----Original Message-----
> From: Christophe Jolif [mailto:cjolif@ilog.fr]
> Sent: Tuesday, July 01, 2003 1:05 AM
> To: tinclon@mindless.com
> Subject: [Fwd: Re: exporting RadialGradientPaint to .SVG]
>
> Thank you, that should actually help. I've had no problem redefining the
> handlePaint() method, but I'm still a little lost with the
> SVGPaintDescriptor.
>
> What exactly is the correct SVGPaintDescriptor for the
> RadialGradientPaint???
>
> When I set a SVGPaintDescriptor of any type, it automatically changes the
> paint for the entire SVG file, rather than the paint for each object within
> that file.
> I tried some lines of code, such as the following (just for testing), always
> with the same result.
> return ((paint==null)?null:new SVGPaintDescriptor("none", "0.4"));
>
> Any clues on what I'm doing wrong??
>
>
> Thanks muchly
>
> --Tinclon
>
> -------- Original Message --------
> Subject: Re: exporting RadialGradientPaint to .SVG
> Date: Tue, 01 Jul 2003 09:04:40 +0200
> From: Christophe Jolif <cj...@ilog.fr>
> Reply-To: "Batik Users" <ba...@xml.apache.org>
> Organization: ILOG S.A.
> To: Batik Users <ba...@xml.apache.org>
> References: <BF...@edex01.intuit.com>
>
> Hi,
>
> The SVGGraphics2D implementation only exports to SVG the regular Java 2D
> Paint
> object. The RadialGradientPaint is a Batik extension and unfortunately its
> export has not be coded in the SVGGraphics2D. However it should be quite
> simple to add such a support, you can even do it from the outside by
> subclassing the DefaultExtensionHandler and redefining the handlePaint()
> method such that it creates the right SVGPaintDescriptor for the
> RadialGradientPaint.
>
> Hope this helps.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>
>
--
Christophe
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org