unnatural y coordinates

Discuss SVG code, accessible via the XML Editor.
v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

unnatural y coordinates

Postby v1nce » Tue May 08, 2012 11:57 pm

Hi,

Does someone have a (better) trick to get natural y coordinates (=mathematical ones) with svg ?

I know I can invert a whole group with
<g id="axis" transform="translate(0 512) scale(1 -1)">
<rect x="0" y="0" width="100" height="100" >
</g>

but this does not work with text which then is written upside down

<g id="axis" transform="translate(0 512) scale(1 -1)">
<text x="0" y="0" font-size="20" >this text is written upside down</text>
</g>

User avatar
LiquidAsh
Posts: 71
Joined: Fri Apr 22, 2011 11:35 pm
Contact:

Re: unnatural y coordinates

Postby LiquidAsh » Thu May 24, 2012 12:22 am

I'm not sure what your goal is in this, but you could certainly use your group transform trick and then also apply a scale(1 -1) to the text element (or use the vertical flip icon) to make it right side up again.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: unnatural y coordinates

Postby v1nce » Thu May 24, 2012 4:14 am

> use the vertical flip icon

My question was not Inkscape related, it was about svg at large.

My goal is to draw a graph : collection of rect with text above each of them.

> apply a scale(1 -1) to the text element

Good idea. But it'll make the document quite verbose ("lots" of text)


Return to “SVG / XML Code”