[Ipe-discuss] Finding size of an object?

Otfried Cheong ipe at otfried.org
Sat Mar 4 14:24:33 CET 2023


On Fri, Mar 3, 2023, at 21:15, Michael Kruger via Ipe-discuss wrote:
> I am trying to draw various objects to scale, and it would be useful to 
> be able to determine the height and width of an object in pixels, so 
> that I can compute a factor by which to scale it up or down relative to 
> other objects in my drawing.

One way to do this in Ipe:
1. Select the objects you want to measure
2. From the "Goodies" ipelet, pick "Insert bounding box"
3. Turn on vertex snapping (F4)
4. Go to the bottom left corner of the inserted box and press F1 to set the coordinate system
5. If you now move your mouse to the top right corner, its coordinates relative to the origin of the coordinate system are displayed in the mode display at the bottom right.

In the "Zoom" menu, under coordinates, you could even switch the display to mm or inches (the default is PDF points, 1/72 inch).

This having said, if you need this function often, the right thing to do(tm) is to write an ipelet.  I'm attaching one that measures width and height of a bounding box of all selected objects.

Cheers,
Otfried

-------------- next part --------------
A non-text attachment was scrubbed...
Name: measure.lua
Type: text/x-lua
Size: 700 bytes
Desc: not available
URL: <https://mailman.science.uu.nl/pipermail/ipe-discuss/attachments/20230304/20776e6d/attachment.bin>


More information about the Ipe-discuss mailing list