![](https://secure.gravatar.com/avatar/15f5e6abf26f57e1838c29a8356ce7f8.jpg?s=120&d=mm&r=g)
-----Original Message----- From: inkscape-devel-bounces@lists.sourceforge.net [mailto:inkscape-devel-bounces@lists.sourceforge.net] On Behalf Of Vangelis Katsikaros Sent: donderdag 20 maart 2008 19:10 To: inkscape-devel@lists.sourceforge.net Subject: [Inkscape-devel] SOC 2008 - project - Guidlines feature
Hello
I am interested in the Guidelines features proposed in the SOC 2008 ideas (http://wiki.inkscape.org/wiki/index.php/SpecGuidesImprovement) and I would like to discuss some aspects before submitting my proposal (if this is ok).
Cool!
I guess this feature fits in the category of projects that doesn't mess much with the base code, since it uses already existing features.
I think this is correct. The full spec mentions guides in sets, that would be a change with perhaps backwards compatability issues, beware!
Moreover, I tried to find info about the guidelines:
- From a quick search I did I saw that thre is no "guide
line" element in SVG 1.1 .
- I saw that in svg files the guides are defined as
sodipodi:guide element. So, guidelines are Inkscape specific.
- Guidelines are defined in src/sp-guide.cpp . SPGuide
handles the svg file info. (Does this mean reading and writing from the file and modifying the svg abstraction?)
- The rendering of the guidelines is handled in
src/display/guideline.cpp . SPGuideLine holds the guideline info The the sp_guideline_* functions are responsible to deliver to the renderer the correct into? (not sure about this last one).
All correct. About the last point: SPGuideLine is a 'canvasitem' and must define an update and render function (see guideline.cpp:65-66). It also defines a 'point' function so that Inkscape knows when the cursor is above it. Then an event is sent which is handled by 'sp_dt_guide_event' in desktop-events.cpp.
Seems you grasp the code fine!
- SnapManager manages the snapping. However, I haven't
figured out if snapping and guidelines are directly connected. (However. this isn't relevant with the UI feature)
They are not directly connected. SPNamedview holds a list of all guides, snapmanager polls spnamedview to see which guides are there. Indeed it does not matter for the UI thing. Basically we need a UI to write nicely to XML, than snapping will just work :)
This is an early search and I am just getting in touch with Inkscape internal. So, if I get something wrong or if you have any hints and directions they are welcome. (I've seen the dev docs you have on the wiki)
As far as the feature specification is concerned, I would like to ask about the Design -> On-canvas editing section. The first 3 actions are already implemented. The last 2 were not implemented for a reason or you simply didn't have the time?
It's just a full description of how the endresult should be. The functionality that is already present is apparantly meant to be maintained! :)
Please note that guides cannot be selected. Making them selectable is probably a big task involving changing lots of inkscape's internals, so stay away from it (the spec doesn't want selectable guides which is good :).
Cheers, Johan