diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-03-15 21:57:03 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2016-03-15 21:57:03 +0000 |
| commit | 6bd1c2a30b66e15fe055b22bd47dadb771f7fae2 (patch) | |
| tree | 1b991cc2736f84fb069666802d485bd29cff6394 /share/extensions/grid_cartesian.py | |
| parent | Update to limit options to radius = 0, radious > 0 or both (diff) | |
| parent | fix-bug-1557192. paint-order crash with multiple items (diff) | |
| download | inkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.tar.gz inkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.zip | |
Update to trunk
(bzr r13645.1.119)
Diffstat (limited to 'share/extensions/grid_cartesian.py')
| -rwxr-xr-x | share/extensions/grid_cartesian.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/share/extensions/grid_cartesian.py b/share/extensions/grid_cartesian.py index 23df0ff84..ae4c6b6b4 100755 --- a/share/extensions/grid_cartesian.py +++ b/share/extensions/grid_cartesian.py @@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import inkex import simplestyle, sys from math import * +from simpletransform import computePointInNode def draw_SVG_line(x1, y1, x2, y2, width, name, parent): style = { 'stroke': '#000000', 'stroke-width':str(width), 'fill': 'none' } @@ -139,8 +140,9 @@ class Grid_Polar(inkex.Effect): # Embed grid in group #Put in in the centre of the current view - t = 'translate(' + str( self.view_center[0]- xmax/2.0) + ',' + \ - str( self.view_center[1]- ymax/2.0) + ')' + view_center = computePointInNode(list(self.view_center), self.current_layer) + t = 'translate(' + str( view_center[0]- xmax/2.0) + ',' + \ + str( view_center[1]- ymax/2.0) + ')' g_attribs = {inkex.addNS('label','inkscape'):'Grid_Polar:X' + \ str( self.options.x_divs )+':Y'+str( self.options.y_divs ), 'transform':t } |
