Fix view center for Render extensions applied in transformed layers or groups
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Wishlist
|
su_v |
Bug Description
Several 'Render' extensions use self.view_center to place new objects into the current layer (or group). None of them take parent transforms on layers (e.g. after a change of the page height/orientation or a resize of the page to drawing/selection) into account.
The proposed patch adds a new function to simpletransform.py, computePointInN
Affected extensions (using self.view_center):
grid_cartesian.py
grid_isometric.py
grid_polar.py
hershey.py
lindenmayer.py
polyhedron_3d.py
render_barcode.py
render_
render_
render_
render_gears.py
rtree.py
spirograph.py
triangle.py
whirl.py
wireframe_
Changes to simpletransform.py
1) the function invertTransform() is copied from voronoi2svg.py (a later commit could remove the original version in voronoi2svg to avoid two copies).
2) a new function computePointInN
=====
Patch was tested with Inkscape 0.91+devel r14397 on OS X 10.7.5.
Related branches
- jazzynico (community): Approve
-
Diff: 541 lines (+86/-45)22 files modifiedshare/extensions/foldablebox.py (+7/-0)
share/extensions/grid_cartesian.py (+4/-2)
share/extensions/grid_isometric.py (+4/-2)
share/extensions/grid_polar.py (+3/-1)
share/extensions/hershey.py (+3/-1)
share/extensions/lindenmayer.py (+2/-1)
share/extensions/perspective.py (+1/-2)
share/extensions/polyhedron_3d.py (+3/-1)
share/extensions/render_alphabetsoup.py (+7/-0)
share/extensions/render_barcode.py (+2/-1)
share/extensions/render_barcode_datamatrix.py (+2/-1)
share/extensions/render_barcode_qrcode.py (+2/-1)
share/extensions/render_gear_rack.py (+4/-2)
share/extensions/render_gears.py (+3/-1)
share/extensions/rtree.py (+2/-1)
share/extensions/simpletransform.py (+21/-0)
share/extensions/spirograph.py (+4/-2)
share/extensions/summersnight.py (+1/-2)
share/extensions/triangle.py (+2/-1)
share/extensions/voronoi2svg.py (+1/-18)
share/extensions/whirl.py (+6/-4)
share/extensions/wireframe_sphere.py (+2/-1)
description: | updated |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
Second version of patch includes these changes:
- no transform needed if current layer is 'root'
- fix qrcode and datamatrix barcode (require center point as tuple, not as list)