diff options
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 } |
