On 2013-11-17 17:45 +0100, TimeWaster wrote:
i think with the change from inkex.unittouu to Effect.unittouu in inkex.py (r12722) was a bug introduced (regression).
The context of revision 12722 http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/12722
is this regression (still open): - Bug #1240455 “trunk: extensions not compatible with recent unit/viewbox changes (rev >= 12554)” https://bugs.launchpad.net/inkscape/+bug/1240455
am i right that a user unit is equivalent to a pixel?
if yes, the actual implementation is converting to *something* but not to user units.
i think the code should look like this (or the method should be renamed to something other than *touu):
if u: try: return retval * self.uuconv[u.string[u.start():u.end()]] except KeyError: pass else: # default take document unit return retval * self.uuconv[self.getDocumentUnit()]
can somebody confirm this?
its also the same with uutounit, it should be:
def uutounit(self, val, unit): return val / self.uuconv[unit]