On Tue, 6 Apr 2004, Carl Hetherington wrote:
Hi,
I'm having a hack at the code for arrow heads, but I've got myself properly confused.
It seems that we have the SPItem class hierarchy (which contains SPMarker) and the repr tree, and that these are kept in sync with each other. So in which tree should I create my new marker object? AFAICS my alternatives are:
- Do a sp_repr_new ("marker"), add it to the defs repr, set up the
attributes using sp_repr_set_attr () etc. etc.
- Create a SPMarker, and set up its struct with the required bits.
So which should it be? And how to I propagate my changes from one tree to the other?
Number 1. In fact, if you can get that to work, that should help us a lot in moving forward with the marker implementation work in general.
I've just tried the first approach above and it works fine, except that the arrow heads only appear when you re-load the file. I think this is because a SPMarker is never created / initialised.
I ran into this same issue when I was working on it. Obviously, somewhere there needs to be a command to force a redraw of the document; I don't know where that function would need to be placed, though. I suspect that tracing through one of the other defs features like gradients might help.
Any enlightenment would be greatly appreciated.
Carl
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel