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 Sunita Kuna <sk...@SAVI.com> on 2001/02/27 01:14:01 UTC
Constructing SVG
Hi
I am new to both SVG and Java Graphics 2D programming.
I am trying generate a SVG document which consists of lines and text.
The text need to be rotated. If i apply rotation all lines and text added
later get effected as the effect is applied over the complete document. Is
there a way in which the font, rotation etc can be applied to each element
specifically....
TIA
sunita
Constructing SVG
Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "SK" == Sunita Kuna <sk...@savi.com> writes:
SK> I am new to both SVG and Java Graphics 2D programming. I am
SK> trying generate a SVG document which consists of lines and text.
SK> The text need to be rotated. If i apply rotation all lines and
SK> text added later get effected as the effect is applied over the
SK> complete document. Is there a way in which the font, rotation etc
SK> can be applied to each element specifically....
Well I'm sure others will probably chime in with better ideas
based on CSS style sheets but here is this one.
Why not set the rotation and the font on the text item:
<svg ...>
<path d="...">
<path d="...">
<path d="...">
<!-- Text rotated 90 deg -->
<text transform="rotate(90)" font-size="24" font-family="Times">
Hello World
</text>
<!-- Lines NOT rotated 90 deg -->
<path d="...">
<path d="...">
</svg>
If you have a group of text then you can do this on a <g> element
as well, but be aware that anything in the G will be affected.