xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas E Deweese <thomas.dewe...@kodak.com>
Subject Constructing SVG
Date Tue, 27 Feb 2001 12:35:25 GMT
>>>>> "SK" == Sunita Kuna <skuna@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.

Mime
View raw message