
I think just going on nodes is wrong. A centroid would make more sense. However, this is not a simple calculation, you'd need to include the lines because it may only be lines, and do you weight differently if the centre fill is empty. And what is empty, is partial transparency partially empty? And if you fill in white when the background is white does this have weight? Visually it might not but computationally it would have to, otherwise it would be wrong when you changed the background colour.
And after all that I bet I'd move it again anyway because of the form and flow of the items I was aligning.
http://www.efunda.com/math/areas/Centroid.cfm
Cheers Jamie
-----Original Message----- From: inkscape-user-admin@lists.sourceforge.net [mailto:inkscape-user-admin@lists.sourceforge.net]On Behalf Of bulia byak Sent: Wednesday, 8 December 2004 9:32 a.m. To: inkscape-user@lists.sourceforge.net Subject: Re: [Inkscape-user] Centering odd shapes
AFAIK, you can't use the gravitic center (my terminology), only the bounding-box center. If there's already an RFE, submit one. It sounds a useful feature.
Will it be useful not only for triangles? If you use a gravity center for an arbitrary path, its curved parts with many nodes will be heavier than smooth parts. Is this what you want? Also not all objects have nodes (e.g. <image> has no nodes), and a line of text has so many scattered nodes that this metric becomes useless IMHO.
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user