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 Nelson Lourenço <lo...@maisis.pt> on 2003/03/13 11:59:45 UTC
Graphics2D to SVG problems
Hi,
i'm using SVGGraphics2D to make my SVG from Java2D,
but i have some problems when use it in background, like in server.
If i see first and then generet the SVG is ok,
if i d'ont see the java2D the SVG code heve some problems,
the first is whit scale and non-zero parameters(the is "scale(0,0)"),
after correct this error have more.
The next error is Bad (singular) matrix.
The difference of files size is 15K, the SVG have 214k.
TIA
Nelson
Re: Graphics2D to SVG problems
Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "VH" == Vincent Hardy <vi...@sun.com> writes:
VH> If you get scale(0,0) or a singular matrix it is because there is
VH> a call to Graphics2D with these parameters (e.g., a g2d.scale(0,0)
VH> and a g2d.transform(tfx) where txf is singular).
VH> Given that you see the difference between doing the export prior
VH> to rendering on screen or after rendering on screen, I suspect
VH> that you are using a component whose size is (0,0) when you try to
VH> do the SVG export which would yield to the zero conditions you
VH> see. I suggest setting the size of your component prior to
VH> painting it into the SVGGraphics2D.
I'll second that suspicion and I'll raise you the need to shut off
double buffering. :)
The likely reason for the 214K SVG is that it is embedding the
double buffer in the SVG as an image rather than the source vectors.
Search the list for how to shut this off.
VH> Vincent.
VH> Nelson Lourenço wrote:
>>
>>
>> Hi, i'm using SVGGraphics2D to make my SVG from Java2D, but i have
>> some problems when use it in background, like in server. If i see
>> first and then generet the SVG is ok, if i d'ont see the java2D the
>> SVG code heve some problems, the first is whit scale and non-zero
>> parameters(the is "scale(0,0)"), after correct this error have
>> more.
>>
>> The next error is Bad (singular) matrix.
>>
>> The difference of files size is 15K, the SVG have 214k.
>>
>> TIA
>>
>> Nelson
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
>> additional commands, e-mail: batik-users-help@xml.apache.org
VH> ---------------------------------------------------------------------
VH> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
VH> additional commands, e-mail: batik-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: Graphics2D to SVG problems
Posted by Vincent Hardy <vi...@sun.com>.
Hello Nelson,
If you get scale(0,0) or a singular matrix it is because there is a call
to Graphics2D with these parameters (e.g., a g2d.scale(0,0) and a
g2d.transform(tfx) where txf is singular).
Given that you see the difference between doing the export prior to
rendering on screen or after rendering on screen, I suspect that you are
using a component whose size is (0,0) when you try to do the SVG export
which would yield to the zero conditions you see. I suggest setting the
size of your component prior to painting it into the SVGGraphics2D.
Vincent.
Nelson Lourenço wrote:
>
>
> Hi,
> i'm using SVGGraphics2D to make my SVG from Java2D,
> but i have some problems when use it in background, like in server.
> If i see first and then generet the SVG is ok,
> if i d'ont see the java2D the SVG code heve some problems,
> the first is whit scale and non-zero parameters(the is "scale(0,0)"),
> after correct this error have more.
>
> The next error is Bad (singular) matrix.
>
> The difference of files size is 15K, the SVG have 214k.
>
> TIA
>
> Nelson
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org