Any extension for getting an object's x y position?

Post questions on how to use or achieve an effect in Inkscape.
Argitoth
Posts: 21
Joined: Tue Dec 13, 2011 4:02 am

Any extension for getting an object's x y position?

Postby Argitoth » Mon Jun 24, 2013 10:33 am

I'm trying to create a GUI for Native Instruments Kontakt sampler and it would be a big help if there was some way to get the TOP LEFT x y pixel position with the x y origin being the TOP LEFT of the page. Even better is if I could specify a pixel offset for the pixel readout.

Is there any extension for this?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Any extension for getting an object's x y position?

Postby Lazur » Mon Jun 24, 2013 5:39 pm

I don't know any of such, but
what if you flip all the drawing elements you designed vertically?
That way the top left would turn to bottom left, which is the default origin of the objects in inkscape.
For the offsetting part, I would draw a rectangle the size of the offset,
and use the align and distribute panel with that rectangle as a "spacer".
Last edited by Lazur URH on Mon Jun 24, 2013 7:17 pm, edited 1 time in total.

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Any extension for getting an object's x y position?

Postby hulf2012 » Tue Jun 25, 2013 2:14 am

Hello:

About extensions:

I see that in the simpletransform.py there are functions to get the bounding box of paths. I don't know if there is possible use it for other objects like text,etc
The file is in :/share/extensions/ in the installed inkscape directory

Other option is find the DOM javascript method
http://www.w3.org/TR/SVG/coords.html
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

Argitoth
Posts: 21
Joined: Tue Dec 13, 2011 4:02 am

Re: Any extension for getting an object's x y position?

Postby Argitoth » Tue Jun 25, 2013 2:56 am

Lazur URH wrote:I don't know any of such, but
what if you flip all the drawing elements you designed vertically?
That way the top left would turn to bottom left, which is the default origin of the objects in inkscape.
For the offsetting part, I would draw a rectangle the size of the offset,
and use the align and distribute panel with that rectangle as a "spacer".


yeah im just going to do this. :)

Step 1: Create a new layer
Step 2: Ctrl + A (select all), Ctrl + C (copy), select the new layer, Ctrl + Alt + V (paste to original position
Step 3: press v (vertical flip)
Step 4: Shift + Ctrl + M to open move dialogue, nudge everthing by pixels until you have the correct x,y offset.

So basically I just create a new layer with everything in it and make sure the inkscape xy readout is accurate.


Return to “Help with using Inkscape”