I think a screenshot of the desired and wrong result would be helpful. I'm not sure why you're handcoding the SVG, either. As far as I know, relative positions are not part of the SVG specification, but you may want to double-check.
For pdf export, select to export the drawing, not the page. PDF export will otherwise always export the page area.
I'm not sure why you're handcoding the SVG, either. As far as I know, relative positions are not part of the SVG specification, but you may want to double-check.
I effectlively handcoded the SVG as Inkscape does not use relative coordinates.
For pdf export, select to export the drawing, not the page. PDF export will otherwise always export the page area.
The problem with my second approach is that apparently, the text is first rendered on 0,0 then moved to the center. The overflow propery being ignored, we can only see the chunk which is on the corner translated to the center.
which explains the differences between CSS and SVG transformations.
Your first example seems to mix SVG and CSS transforms, I think Inkscape is correct in not accepting the changed CSS transform origin for the SVG rotation. It also seems to ignore CSS transforms (at least in the 1.0 beta).
What I haven't tried is using a symbol, those can have an origin defined, and might work better with Inkscape than the svg-in-svg.
Dear all,
I want to have a text rotated at 45º, vertically and horizontally aligned on an SVG.Coordinates are relative.
Here are my attempts.
First :
Second :
Can somebody helps me to solve my problem?I am kind of stuck and would like to avoid to have to use a browser based exporter...
Thanks in advance,
https://stackoverflow.com/questions/6711610/how-to-set-transform-origin-in-svg
Dear Maren,
Thank you for your answer.
It does not seems to be possible to set cx/cy in the rotation in mm or %.
Or maybe I misunderstood what you wanted to point out!?
Regards,
I think a screenshot of the desired and wrong result would be helpful. I'm not sure why you're handcoding the SVG, either. As far as I know, relative positions are not part of the SVG specification, but you may want to double-check.
For pdf export, select to export the drawing, not the page. PDF export will otherwise always export the page area.
Dear Maren,
I effectlively handcoded the SVG as Inkscape does not use relative coordinates.
The problem with my second approach is that apparently, the text is first rendered on 0,0 then moved to the center. The overflow propery being ignored, we can only see the chunk which is on the corner translated to the center.
I attached the screenshots (For the second approach):
Many thanks,
Regards,
Mmh. The difference between the pdf export and the appearance on-canvas could be a bug.
For the other stuff, I guess you have already found https://css-tricks.com/transforms-on-svg-elements/
which explains the differences between CSS and SVG transformations.
Your first example seems to mix SVG and CSS transforms, I think Inkscape is correct in not accepting the changed CSS transform origin for the SVG rotation. It also seems to ignore CSS transforms (at least in the 1.0 beta).
What I haven't tried is using a symbol, those can have an origin defined, and might work better with Inkscape than the svg-in-svg.