Current State of Units

Inkscape’s main unit handling code is in helper/units.cpp and util/units.cpp. The code in helper is originally from libgnomeprint, and the code in util is the start of a rewrite; I plan on moving everything to util. In addition, there is separate code for handling units within an SVG file, for live effects, and for display, as well as a few other miscellaneous header files related to units. Based on these files, I have developed a list of major unit support requirements.

  • Listing units
  • Handling unit names and abbreviations
  • Unit conversion
  • Reading units from SVG files

To start, I plan on making the existing code more readable, then moving all unit handling into util/units.cpp, starting with the functions in helper/units.cpp.

This entry was posted in and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *