Refactoring Progress

Based on suggestions on inkscape-devel, I took a look at Boost Units. At first it looked promising, but then I decided it’s more trouble than it’s worth as it’s aimed at compile time dimensional analysis, and Inkscape only deals with distance anyway. However, I did use Boost Units’ naming scheme of calling a measurement with its unit a “quantity” instead of a “length,” as Inkscape also uses angles, not just lengths.

In addition, I began porting the code base away from helper/units.cpp. In the process, I fixed a bug that appears to have been there for years; the CSE paper size didn’t have units displayed next to it in the page size selector dialog. There were if statements checking if each paper size unit was millimeters, inches, or pixels and adding the units on. As CSE paper is Inkscape’s only paper size defined in points, its units weren’t displayed as there wasn’t a specific check for points. Now the page size selector just displays the unit’s abbreviation, no individual checks required.

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

Leave a Reply

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