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 pires7 <fo...@gmail.com> on 2006/12/27 12:22:35 UTC
'Reflection' of text
Hi all,
I managed to reflect a string of text 'SCOTTS ROAD' by rotating each
character in reverse order, by 180 degrees using the tspan element.
Is there a anyway to rotate the entire text instead of one character at a
time?
My codes are as follows:
<svg width='600' height='600' viewBox='0 0 230 230' xml:space='preserve'
version='1.1'
xmlns='http://www.w3.org/2000/svg'
xmlns:xlink='http://www.w3.org/1999/xlink'
xmlns:ev='http://www.w3.org/2001/xml-events'>
<rect width='230' height='190' fill='rgb(203,203,228)' stroke-width='0' />
<defs>
<clipPath id='clip1'>
<path d='M 0 0 L 0 300 L 300 300 L 300 0 Z' />
</clipPath>
</defs>
<defs>
<path id='scotts road2' altname='scotts road' d='
M3.4545454545454546,32.20000000000002
L21.636363636363637,56.80000000000001
L53.0,99.70000000000002
L72.54545454545455,125.8
L72.54545454545455,125.8 ' clip-path='url(#clip1)' />
</defs>
<use xlink:href='#scotts road2' altname='scotts road' fill='none'
stroke='rgb(252,233,3)' stroke-width='3.5'/>
<text font-family='Verdana' fill='black'>
<textPath xlink:href='#scotts road2' startOffset='34.39907702479869%'
clip-path='url(#clip1)' font-size='4'>
<tspan dy='1.5'>SCOTTS ROAD</tspan>
<tspan rotate="180">D</tspan>
<tspan rotate="180">A</tspan>
<tspan rotate="180">O</tspan>
<tspan rotate="180">R</tspan>
<tspan rotate="180">S</tspan>
<tspan rotate="180">T</tspan>
<tspan rotate="180">T</tspan>
<tspan rotate="180">O</tspan>
<tspan rotate="180">C</tspan>
<tspan rotate="180">S</tspan>
</textPath>
</svg>
--
View this message in context: http://www.nabble.com/%27Reflection%27-of-text-tf2885588.html#a8061692
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: 'Reflection' of text
Posted by "Andre M. Winter - Carto.net" <ml...@carto.net>.
hi pires7,
what about inverting the vertex order of your path?
andré
wrote:
> Hi all,
>
> I managed to reflect a string of text 'SCOTTS ROAD' by rotating each
> character in reverse order, by 180 degrees using the tspan element.
> Is there a anyway to rotate the entire text instead of one character at a
> time?
> My codes are as follows:
>
>
> <svg width='600' height='600' viewBox='0 0 230 230' xml:space='preserve'
> version='1.1'
> xmlns='http://www.w3.org/2000/svg'
> xmlns:xlink='http://www.w3.org/1999/xlink'
> xmlns:ev='http://www.w3.org/2001/xml-events'>
> <rect width='230' height='190' fill='rgb(203,203,228)' stroke-width='0' />
>
> <defs>
> <clipPath id='clip1'>
> <path d='M 0 0 L 0 300 L 300 300 L 300 0 Z' />
> </clipPath>
> </defs>
>
>
> <defs>
> <path id='scotts road2' altname='scotts road' d='
> M3.4545454545454546,32.20000000000002
> L21.636363636363637,56.80000000000001
> L53.0,99.70000000000002
> L72.54545454545455,125.8
> L72.54545454545455,125.8 ' clip-path='url(#clip1)' />
>
> </defs>
>
>
> <use xlink:href='#scotts road2' altname='scotts road' fill='none'
> stroke='rgb(252,233,3)' stroke-width='3.5'/>
>
>
> <text font-family='Verdana' fill='black'>
>
>
> <textPath xlink:href='#scotts road2' startOffset='34.39907702479869%'
> clip-path='url(#clip1)' font-size='4'>
> <tspan dy='1.5'>SCOTTS ROAD</tspan>
>
>
> <tspan rotate="180">D</tspan>
> <tspan rotate="180">A</tspan>
> <tspan rotate="180">O</tspan>
> <tspan rotate="180">R</tspan>
>
> <tspan rotate="180">S</tspan>
> <tspan rotate="180">T</tspan>
> <tspan rotate="180">T</tspan>
> <tspan rotate="180">O</tspan>
> <tspan rotate="180">C</tspan>
> <tspan rotate="180">S</tspan>
>
> </textPath>
>
>
> </svg>
>
>
>
>
--
___________________________________________________________________
andre m. winter,
cartography for internet and multimedia applications
schiessstand 4/1, a6091 goetzens, tyrol, austria
tel.: ++43.5234.32732
email: ml.winter@carto.net
new svg book with actual scripting samples out now!
check http://svg.carto.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org