It is customary to divide inches in halves, fourths, eighths and sixteenths, right? In Inkscape dark grid lines (love that feature by the way) and ruler marks appear in halves, fifths and tenths.
sp_ruler_metrics in sp-metrics.h has it all right. But sp_ruler_set_metric is only called in desktop.cpp and SP_PT is hardcoded as the metric. To make the divisions follow the document preferences the call to sp_ruler_set_metric would probably have to be moved farther down the line into sp_desktop_widget_update_rulers and some math would need to be changed. I don't know if Inkscape would want to do this. A really feature bloated app might even let you work in your prefered unit and configure you own arbitrary divisions. Then I could divide inches in thirds. I tried hacking out a change for this a while back and started to get the idea that messing with units probably wasn't appropriate for a newbie with now knowledge of C++. It seems messing with units actually means messing with the fundamental assumptions on how Inkscape should deal with units.
So I don't have a question, as such, I would just like to see what others think.
Aaron Spike
On Fri, 31 Dec 2004 15:52:18 -0600, Aaron Spike <fretfind@...540...> wrote:
sp_ruler_metrics in sp-metrics.h has it all right. But sp_ruler_set_metric is only called in desktop.cpp and SP_PT is hardcoded as the metric.
Are you looking at the CVS version? In CVS it is also called sp_desktop_widget_namedview_modified which is called when you set new document units. And yes, I just checked that with inches, every inch on the ruler is divided into halves, 1/4s, and 1/8s as you requested. Please test the latest CVS version.
participants (2)
-
Aaron Spike
-
bulia byak