inkex.units module#
Convert to and from various units and find the closest matching unit.
- inkex.units.parse_unit(value, default_unit='px', default_value=None)[source]#
Takes a value such as 55.32px and returns (55.32, ‘px’) Returns default (None) if no match can be found
- inkex.units.are_near_relative(point_a, point_b, eps=0.01)[source]#
Return true if the points are near to eps
- inkex.units.discover_unit(value, viewbox, default='px')[source]#
Attempt to detect the unit being used based on the viewbox