Is there any way to anchor images and rects by the centre, as you can with text?
ie. text-anchor:middle;
SVG <image, <rect anchor?
-
- Posts: 96
- Joined: Tue Oct 21, 2014 1:40 pm
- Location: Australia
Re: SVG <image, <rect anchor?
I probably shouldn't even try to answer, since I'm not very familiar with SVG/XML code. But my simple answer might lead you to discover the answer.
On the canvas, objects can be aligned in many different ways. They don't have anchors like text does. Have you looked at any tutorials? I was just helping to create the new page on the website About SVG and found quite a few tutorials on SVG/XML code -- many more than we could list there! (I found them by using "learn" and "SVG", together (without any boolean) in a search engine )
On the canvas, objects can be aligned in many different ways. They don't have anchors like text does. Have you looked at any tutorials? I was just helping to create the new page on the website About SVG and found quite a few tutorials on SVG/XML code -- many more than we could list there! (I found them by using "learn" and "SVG", together (without any boolean) in a search engine )
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
- Posts: 96
- Joined: Tue Oct 21, 2014 1:40 pm
- Location: Australia
Re: SVG <image, <rect anchor?
Hello,
Yes I have read tutorials and couldn't find anything.
Although this answer seems to confirm that there isn't anything unfortunately.
http://stackoverflow.com/questions/1972 ... -attribute
Yes I have read tutorials and couldn't find anything.
Although this answer seems to confirm that there isn't anything unfortunately.
http://stackoverflow.com/questions/1972 ... -attribute
Re: SVG <image, <rect anchor?
You can enable snapping to bounding boxes, and to their centres.
But to preserve the position in the codes, is a different problem.
Paths are described by node positions, related to a coordinate system.
By that, the origo could be considered as an anchor (?).
Thus you would need to preserve transformation values that would shift the origo to the objects bounding box centres?
It could be done I guess, though it would lead to a more complicated structure.
An ugly solution would be converting the objects to markers and assigning them to path starting nodes in position.
But to preserve the position in the codes, is a different problem.
Paths are described by node positions, related to a coordinate system.
By that, the origo could be considered as an anchor (?).
Thus you would need to preserve transformation values that would shift the origo to the objects bounding box centres?
It could be done I guess, though it would lead to a more complicated structure.
An ugly solution would be converting the objects to markers and assigning them to path starting nodes in position.