Hi all, I've just commited some code that makes inkscape retain the centre of rotations location after you move it so that next time you come back to it the centre is where you put it. Allows you to do things like this:
http://rapidshare.de/files/7501289/JCB_demo_XVID.avi
I'm looking at adding a way to make it return to being centred, Scislac suggested ctrl+click, which unless anyone has any other suggestions is the way I'm gonna go.
cheers
Sim
__________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com
On Sat, Nov 12, 2005 at 10:04:02AM -0800, John Cliff wrote:
I've just commited some code that makes inkscape retain the
centre of rotations location after you move it so that next time you come back to it the centre is where you put it.
I don't think this should extend even across different editing sessions: i.e. I don't think the rotation centre should be stored in the SVG file, so I suggest reverting the following lines from sp-item.cpp:
+ sp_object_read_attr(object, "inkscape:r_cx"); + sp_object_read_attr(object, "inkscape:r_cy");
+ sp_repr_set_attr(repr, "inkscape:r_cx", ( item->r_cx ? NULL : "true" )); + sp_repr_set_attr(repr, "inkscape:r_cy", ( item->r_cy ? NULL : "true" ));
while in seltrans.cpp, replace inkscape:r_cx/y accesses with item->r_cx/y accesses.
Also, decide what type r_cx/y should have. Currently sp-item.cpp:sp_item_init treats them as pointers (storing NULL there), while sp-item.h says that they're doubles. Those fields currently aren't used anywhere else. As for the inkscape:r_cx/y attributes, sp_item_write sets them to either "true" or unset, while other code assumes that the attributes specify a unitless coordinate.
Note that the NULL/double discrepancy causes a warning in g++. Please try to avoid committing code that introduces warnings. Also, as a rule of thumb, I'd suggest avoiding committing new fields (SPItem:r_cx/y) that essentially aren't used in the current code base.
If you look at your diffs (and it's a good idea to look at one's diffs before committing), then you'll notice a mixture of different indentation amounts even within a given block, mixing spaces with tabs, and assuming different tab stops in different places. Please try to use either the function or file's existing indentation method, or the standard described in our Coding Style guidelines http://inkscape.org/doc/coding_style.php.
pjrm.
On 11/14/05, Peter Moulder <Peter.Moulder@...38...> wrote:
I don't think this should extend even across different editing sessions:
On the contrary, I think it's a good idea to store them across sessions. More often than not rotation center is a meaningful property of an object. I also remember other people have made requests to this effect.
i.e. I don't think the rotation centre should be stored in the SVG file, so I suggest reverting the following lines from sp-item.cpp:
Actually this patch has many probelms, as I wrote to John, and he agreed to rework it. So for now, I think the best thing is to revert the entire patch, until we have the correct implementation.
Also, decide what type r_cx/y should have. Currently sp-item.cpp:sp_item_init treats them as pointers (storing NULL there), while sp-item.h says that they're doubles. Those fields currently aren't used anywhere else. As for the inkscape:r_cx/y attributes, sp_item_write sets them to either "true" or unset, while other code assumes that the attributes specify a unitless coordinate.
Yes, I wrote about that too. See my comments in
http://sourceforge.net/tracker/index.php?func=detail&aid=1355277&gro...
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org
On Mon, 2005-11-14 at 05:00 -0400, bulia byak wrote:
On 11/14/05, Peter Moulder <Peter.Moulder@...38...> wrote:
I don't think this should extend even across different editing sessions:
On the contrary, I think it's a good idea to store them across sessions. More often than not rotation center is a meaningful property of an object. I also remember other people have made requests to this effect.
I totally agree with Bulia! What should be implemented instead of moving it back after a session is that snapping to centre (plus the corners) when shift is pressed actually works :) (currently pressing shift causes the centre of rotation to move to the centre of the object, but on release of the mousebutton it's placed where the cursor is.
i.e. I don't think the rotation centre should be stored in the SVG file, so I suggest reverting the following lines from sp-item.cpp:
Actually this patch has many probelms, as I wrote to John, and he agreed to rework it. So for now, I think the best thing is to revert the entire patch, until we have the correct implementation.
Also, decide what type r_cx/y should have. Currently sp-item.cpp:sp_item_init treats them as pointers (storing NULL there), while sp-item.h says that they're doubles. Those fields currently aren't used anywhere else. As for the inkscape:r_cx/y attributes, sp_item_write sets them to either "true" or unset, while other code assumes that the attributes specify a unitless coordinate.
Yes, I wrote about that too. See my comments in
http://sourceforge.net/tracker/index.php?func=detail&aid=1355277&gro...
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org
SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Mon, 2005-11-14 at 15:51 +1100, Peter Moulder wrote:
If you look at your diffs (and it's a good idea to look at one's diffs before committing), then you'll notice a mixture of different indentation amounts even within a given block, mixing spaces with tabs, and assuming different tab stops in different places. Please try to use either the function or file's existing indentation method, or the standard described in our Coding Style guidelines http://inkscape.org/doc/coding_style.php.
A lot of this is my fault for not catching this; he took the patch to me to review before committing it, but I really wasn't very thorough.
I think I've been away too long and lost my edge. :/
-mental
participants (5)
-
bulia byak
-
David Christian Berg
-
John Cliff
-
MenTaLguY
-
Peter Moulder