Replies: 1 comment 2 replies
-
It's possible to iterate over the control points of the underlying Here's some code to get you started: for obj in selected_shapes():
if not isinstance(obj, SimplePathObject):
continue
iobj = obj.get_inkex_object()
for i, ep in enumerate(iobj.get_path().end_points):
text(str(i + 1), ep, font_size='10pt')
text('C', iobj.bounding_box().center, font_size='10pt') |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I would like to numerate each shape of a selection.
I found a solution by exploring the parameters:
output:

My actual solution is to obtain the coordinates from ._transfrom.
My code is as follows:
In the example of a selected triangle, we have the following coordinates:

the result is shown in the following image:

I guess that the numering is done on the first node.
How can i get correctly the coordinates (in another way than .transform) and on the center of the shape ?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions