xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heiska Anssi" <Anssi.Hei...@insta.fi>
Subject RE: Rotating text
Date Wed, 26 Sep 2007 11:17:13 GMT

Cameron McCormack:

> Hi Heiska.
> 
> Heiska Anssi:
> > Library produces:
> > +--------+
> > |   AW   |
> > |        |
> > +--------+
> > 
> > And it needs to be converted to:
> > +--------+
> > |   VM   |    // V is A upside down and M is W upside down
> > |        |    // note that this is not rotated string, only each
letter
> > +--------+    // is rotated
> 
> Fortunately, getting that effect is quite easy in SVG.  You just need
to
> use the rotation="" attribute on the <text> elements.  Presumably you
> can modify the SVG document before you build the GVT tree.  Find all
of
> the elements that you need to rotate, then do a:
> 
>   elt.setAttributeNS(null, "rotate", "180");
> 
> on each one.  Since the rotation is about the point that each glyph is
> to be placed (i.e., the bottom left of each glyph) you may need to
move
> the <text> elements up and right a bit, too.

Thanks, this does exactly what I asked.

...but it seems that I couldn't describe my problem properly (and the
examample was bad). Actually, what I meant was I want to mirror letters
upside down (by x-axis). Using previous example:

+--------+
|  AWP   |
|        |
+--------+

Needs to be:

+--------+
|  VMb   |    // V is A, M is W and b is P upside down
|        |
+--------+


So the problem remains. Sorry for wasting bandwidth with first badly
formed question :). 

I still wonder why the first solution in earlier message didn't work.




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message