simpletransform.py computeBBox function doesn't support images

Bug #813366 reported by Giacomo Mirabassi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Giacomo Mirabassi

Bug Description

I'm trying to write an extension that uses the computeBBox function present in simpletransform.py. Into the code is stated that the function doesn't support text, but it doesn't support images too.

to have images working it seems to be enoguh to change line 156 from

elif node.tag in [ inkex.addNS('rect','svg'), 'rect' ]:

to

elif node.tag in [ inkex.addNS('rect','svg'), 'rect' ] \
                            inkex.addNS('image','svg'), 'image' ]:

su_v (suv-lp)
tags: added: extensions-plugins
Revision history for this message
Alvin Penner (apenner) wrote :

confirmed on Inkscape rev 10450

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

- good catch, Giacomo, nice elegant solution! I've applied your change to the file simpletransform.py, and attach it here just for testing purposes.
- The effect of the patch can be seen on Inkscape 0.48.1 by using Extensions->Visualize Path->Dimensions on a bitmap. This would previously have failed.
- The effect can also be seen on recent Inkscape trunk if you use Dimensions and specify the Geometric option. This option uses the computeBBox function.

Revision history for this message
Alvin Penner (apenner) wrote :

committed to rev 10492

Changed in inkscape:
status: Confirmed → Fix Committed
jazzynico (jazzynico)
Changed in inkscape:
assignee: nobody → Giacomo Mirabassi (giacmir)
milestone: none → 0.49
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.