Comment 6 for bug 381871

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

In general Inkscape will use the bounding box of an object to create the guidelines, resulting in 4 guidelines. Only for some specific objects (3dboxes, paths, and rectangles) code has been implemented to (optionally) use the line segments which constitute that specific object. It should be quite simple to make sure that for svg:line only a single guide is created; Some questions immediately arise though:
1) what other objects should be taken into account too?
2) where in the preferences dialog are we going to place the checkbox to control whether the boundingbox is used or not (see for example tools -> shape -> rectangle. IMO we should have only one single checkbox, instead of one for each object individually.
3) wouldn't it make sense to put this guide creating code in the sp_shape class, which is the base class of many (or all?) of these objects. See for example sp_shape_snappoints, which does something similar. It can then still be overridden by a specific class if needed

In case any one is going to work on this, start digging in sp_item_convert_item_to_guides and in sp_rect_convert_to_guides.