From 6d85f09d7bbba1f61710b0d365892608bbb52d15 Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan Date: Wed, 5 Feb 2014 18:42:44 +0100 Subject: typos in symbols (bzr r12998) --- share/symbols/AigaSymbols.svg | 16 ++++++++-------- share/symbols/MapSymbols.svg | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'share') diff --git a/share/symbols/AigaSymbols.svg b/share/symbols/AigaSymbols.svg index 946633315..3ac907e61 100644 --- a/share/symbols/AigaSymbols.svg +++ b/share/symbols/AigaSymbols.svg @@ -241,7 +241,7 @@ - Bagage Lockers + Baggage Lockers @@ -251,7 +251,7 @@ - Bagage Lockers + Baggage Lockers @@ -1241,7 +1241,7 @@ - NPS Wheelchair Accessable - 1996 + NPS Wheelchair Accessible - 1996 @@ -1250,7 +1250,7 @@ - NPS Wheelchair Accessable - 1996 + NPS Wheelchair Accessible - 1996 @@ -1260,7 +1260,7 @@ - NPS Wheelchair Accessable + NPS Wheelchair Accessible @@ -1269,7 +1269,7 @@ - NPS Wheelchair Accessable + NPS Wheelchair Accessible @@ -1279,7 +1279,7 @@ - New Wheelchair Accessable + New Wheelchair Accessible @@ -1288,7 +1288,7 @@ - New Wheelchair Accessable + New Wheelchair Accessible diff --git a/share/symbols/MapSymbols.svg b/share/symbols/MapSymbols.svg index 0d3e1b0fa..4fccc0492 100644 --- a/share/symbols/MapSymbols.svg +++ b/share/symbols/MapSymbols.svg @@ -1911,7 +1911,7 @@ -Leasure Center +Leisure Center @@ -2098,7 +2098,7 @@ -Park / Picnick Area +Park / Picnic Area @@ -2134,7 +2134,7 @@ -Intormation +Information -- cgit v1.2.3 From f08bd308b4c3a75bf770c01fb38cd02915d3aa19 Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Wed, 5 Feb 2014 20:01:41 -0500 Subject: Extensions->Render submenu. Scaling of input parameters into document units, Part 1 (Bug 1240455) Fixed bugs: - https://launchpad.net/bugs/1240455 (bzr r13001) --- share/extensions/draw_from_triangle.py | 10 ++++++---- share/extensions/foldablebox.py | 2 +- share/extensions/render_alphabetsoup.py | 2 +- share/extensions/render_gear_rack.py | 6 +++--- share/extensions/render_gears.py | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) (limited to 'share') diff --git a/share/extensions/draw_from_triangle.py b/share/extensions/draw_from_triangle.py index 414363e86..42cda7035 100755 --- a/share/extensions/draw_from_triangle.py +++ b/share/extensions/draw_from_triangle.py @@ -148,6 +148,8 @@ def get_n_points_from_path( node, n):#returns a list of first n points (x,y) in if len(xi) == n and len(yi) == n: points = [] # returned pairs of points for i in range(n): + xi[i] = Draw_From_Triangle.unittouu(e, str(xi[i]) + 'px') + yi[i] = Draw_From_Triangle.unittouu(e, str(yi[i]) + 'px') points.append( [ xi[i], yi[i] ] ) else: #inkex.errormsg(_('Error: Not enough nodes to gather coordinates.')) #fail silently and exit, rather than invoke an error console @@ -190,17 +192,17 @@ class Style(object): #container for style information def __init__(self, options): #dot markers self.d_rad = 4 #dot marker radius - self.d_th = 2 #stroke width + self.d_th = Draw_From_Triangle.unittouu(e, '2px') #stroke width self.d_fill= '#aaaaaa' #fill colour self.d_col = '#000000' #stroke colour #lines - self.l_th = 2 + self.l_th = Draw_From_Triangle.unittouu(e, '2px') self.l_fill= 'none' self.l_col = '#000000' #circles - self.c_th = 2 + self.c_th = Draw_From_Triangle.unittouu(e, '2px') self.c_fill= 'none' self.c_col = '#000000' @@ -314,7 +316,7 @@ class Draw_From_Triangle(inkex.Effect): if len(pts) == 3: #if we have right number of nodes, else skip and end program st = Style(so)#style for dots, lines and circles - + #CREATE A GROUP TO HOLD ALL GENERATED ELEMENTS IN #Hold relative to point A (pt[0]) group_translation = 'translate(' + str( pts[0][0] ) + ','+ str( pts[0][1] ) + ')' diff --git a/share/extensions/foldablebox.py b/share/extensions/foldablebox.py index 5d5945dd9..b504de89f 100755 --- a/share/extensions/foldablebox.py +++ b/share/extensions/foldablebox.py @@ -70,7 +70,7 @@ class FoldableBox(inkex.Effect): box_id = self.uniqueId('box') self.box = g = inkex.etree.SubElement(self.current_layer, 'g', {'id':box_id}) - line_style = simplestyle.formatStyle({ 'stroke': '#000000', 'fill': 'none' }) + line_style = simplestyle.formatStyle({ 'stroke': '#000000', 'fill': 'none', 'stroke-width': str(self.unittouu('1px')) }) #self.createGuide( 0, docH, 0 ); diff --git a/share/extensions/render_alphabetsoup.py b/share/extensions/render_alphabetsoup.py index ad43163e4..083f03af9 100755 --- a/share/extensions/render_alphabetsoup.py +++ b/share/extensions/render_alphabetsoup.py @@ -514,7 +514,7 @@ class AlphabetSoup(inkex.Effect): help="Generate random (unreadable) text") def effect(self): - zoom = self.options.zoom + zoom = self.unittouu( str(self.options.zoom) + 'px') if self.options.randomize: imagelist = generate_random_string(self.options.text, zoom) diff --git a/share/extensions/render_gear_rack.py b/share/extensions/render_gear_rack.py index 13eaf1017..68c5d050e 100644 --- a/share/extensions/render_gear_rack.py +++ b/share/extensions/render_gear_rack.py @@ -65,8 +65,8 @@ class RackGear(inkex.Effect): help="Contact Angle") def effect(self): - length = self.options.length - spacing = self.options.spacing + length = self.unittouu(str(self.options.length) + 'px') + spacing = self.unittouu(str(self.options.spacing) + 'px') angle = radians(self.options.angle) # generate points: list of (x, y) pairs @@ -93,7 +93,7 @@ class RackGear(inkex.Effect): g = inkex.etree.SubElement(self.current_layer, 'g', g_attribs) # Create SVG Path for gear - style = {'stroke': '#000000', 'fill': 'none'} + style = {'stroke': '#000000', 'fill': 'none', 'stroke-width': str(self.unittouu('1px'))} gear_attribs = { 'style': simplestyle.formatStyle(style), 'd': path} diff --git a/share/extensions/render_gears.py b/share/extensions/render_gears.py index 5201e553b..d5c8131a8 100644 --- a/share/extensions/render_gears.py +++ b/share/extensions/render_gears.py @@ -164,7 +164,7 @@ class Gears(inkex.Effect): g = inkex.etree.SubElement(self.current_layer, 'g', g_attribs) # Create SVG Path for gear - style = { 'stroke': '#000000', 'fill': 'none' } + style = { 'stroke': '#000000', 'fill': 'none', 'stroke-width': str(self.unittouu('1px')) } gear_attribs = {'style':simplestyle.formatStyle(style), 'd':path} gear = inkex.etree.SubElement(g, inkex.addNS('path','svg'), gear_attribs ) if(centerdiameter > 0.0): -- cgit v1.2.3 From 71cc176ac4cd1da4ef5ad3a5b50ddb8f71098695 Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Fri, 7 Feb 2014 19:16:27 -0500 Subject: Extensions->Render submenu. Scaling of input parameters into document units, Part 2 (Bug 1240455) Fixed bugs: - https://launchpad.net/bugs/1240455 (bzr r13007) --- share/extensions/grid_cartesian.py | 12 +++++++++++- share/extensions/grid_isometric.py | 6 ++++++ share/extensions/grid_polar.py | 11 ++++++++++- share/extensions/guides_creator.py | 4 ++-- share/extensions/lindenmayer.py | 3 ++- share/extensions/rtree.py | 4 +++- share/extensions/spirograph.py | 5 ++++- share/extensions/triangle.py | 7 +++++-- share/extensions/wireframe_sphere.py | 3 ++- 9 files changed, 45 insertions(+), 10 deletions(-) (limited to 'share') diff --git a/share/extensions/grid_cartesian.py b/share/extensions/grid_cartesian.py index 85716a6fd..23df0ff84 100755 --- a/share/extensions/grid_cartesian.py +++ b/share/extensions/grid_cartesian.py @@ -122,7 +122,17 @@ class Grid_Polar(inkex.Effect): def effect(self): - + + self.options.border_th = self.unittouu(str(self.options.border_th) + 'px') + self.options.dx = self.unittouu(str(self.options.dx) + 'px') + self.options.x_divs_th = self.unittouu(str(self.options.x_divs_th) + 'px') + self.options.x_subdivs_th = self.unittouu(str(self.options.x_subdivs_th) + 'px') + self.options.x_subsubdivs_th = self.unittouu(str(self.options.x_subsubdivs_th) + 'px') + self.options.dy = self.unittouu(str(self.options.dy) + 'px') + self.options.y_divs_th = self.unittouu(str(self.options.y_divs_th) + 'px') + self.options.y_subdivs_th = self.unittouu(str(self.options.y_subdivs_th) + 'px') + self.options.y_subsubdivs_th = self.unittouu(str(self.options.y_subsubdivs_th) + 'px') + #find the pixel dimensions of the overall grid ymax = self.options.dy * self.options.y_divs xmax = self.options.dx * self.options.x_divs diff --git a/share/extensions/grid_isometric.py b/share/extensions/grid_isometric.py index 27951a0a8..8ac407613 100755 --- a/share/extensions/grid_isometric.py +++ b/share/extensions/grid_isometric.py @@ -84,6 +84,12 @@ class Grid_Polar(inkex.Effect): def effect(self): + self.options.dx = self.unittouu(str(self.options.dx) + 'px') + self.options.divs_th = self.unittouu(str(self.options.divs_th) + 'px') + self.options.subdivs_th = self.unittouu(str(self.options.subdivs_th) + 'px') + self.options.subsubdivs_th = self.unittouu(str(self.options.subsubdivs_th) + 'px') + self.options.border_th = self.unittouu(str(self.options.border_th) + 'px') + #Can't generate a grid too flat #If the Y dimension is smallest than half the X dimension, fix it. if self.options.y_divs<((self.options.x_divs+1)/2): diff --git a/share/extensions/grid_polar.py b/share/extensions/grid_polar.py index 3ae3fac34..17c3499cb 100755 --- a/share/extensions/grid_polar.py +++ b/share/extensions/grid_polar.py @@ -119,7 +119,16 @@ class Grid_Polar(inkex.Effect): help="The radial outset of the circumferential labels") def effect(self): - + + self.options.dr = self.unittouu(str(self.options.dr) + 'px') + self.options.r_divs_th = self.unittouu(str(self.options.r_divs_th) + 'px') + self.options.r_subdivs_th = self.unittouu(str(self.options.r_subdivs_th) + 'px') + self.options.a_divs_th = self.unittouu(str(self.options.a_divs_th) + 'px') + self.options.a_subdivs_th = self.unittouu(str(self.options.a_subdivs_th) + 'px') + self.options.c_dot_dia = self.unittouu(str(self.options.c_dot_dia) + 'px') + self.options.a_label_size = self.unittouu(str(self.options.a_label_size) + 'px') + self.options.a_label_outset = self.unittouu(str(self.options.a_label_outset) + 'px') + # Embed grid in group #Put in in the centre of the current view t = 'translate(' + str( self.view_center[0] ) + ',' + str( self.view_center[1] ) + ')' diff --git a/share/extensions/guides_creator.py b/share/extensions/guides_creator.py index abd41c6fc..21df1cd50 100755 --- a/share/extensions/guides_creator.py +++ b/share/extensions/guides_creator.py @@ -297,8 +297,8 @@ class Guides_Creator(inkex.Effect): svg = self.document.getroot() # getting the width and height attributes of the canvas - width = self.unittouu(svg.get('width')) - height = self.unittouu(svg.attrib['height']) + width = float(svg.get('width')) + height = float(svg.get('height')) # getting edges coordinates h_orientation = '0,' + str(round(width,4)) diff --git a/share/extensions/lindenmayer.py b/share/extensions/lindenmayer.py index f9abce3ec..2e058f541 100755 --- a/share/extensions/lindenmayer.py +++ b/share/extensions/lindenmayer.py @@ -104,7 +104,8 @@ class LSystem(inkex.Effect): return level_string def effect(self): - s = {'stroke-linejoin': 'miter', 'stroke-width': '1.0px', + self.options.step = self.unittouu(str(self.options.step) + 'px') + s = {'stroke-linejoin': 'miter', 'stroke-width': str(self.unittouu('1px')), 'stroke-opacity': '1.0', 'fill-opacity': '1.0', 'stroke': '#000000', 'stroke-linecap': 'butt', 'fill': 'none'} diff --git a/share/extensions/rtree.py b/share/extensions/rtree.py index 3231d284e..db677d0d5 100755 --- a/share/extensions/rtree.py +++ b/share/extensions/rtree.py @@ -44,7 +44,9 @@ class RTreeTurtle(inkex.Effect): dest="minimum", default=4.0, help="minimum branch size") def effect(self): - s = {'stroke-linejoin': 'miter', 'stroke-width': '1.0px', + self.options.size = self.unittouu(str(self.options.size) + 'px') + self.options.minimum = self.unittouu(str(self.options.minimum) + 'px') + s = {'stroke-linejoin': 'miter', 'stroke-width': str(self.unittouu('1px')), 'stroke-opacity': '1.0', 'fill-opacity': '1.0', 'stroke': '#000000', 'stroke-linecap': 'butt', 'fill': 'none'} diff --git a/share/extensions/spirograph.py b/share/extensions/spirograph.py index cb9d1ac24..77a258d5f 100755 --- a/share/extensions/spirograph.py +++ b/share/extensions/spirograph.py @@ -47,6 +47,9 @@ class Spirograph(inkex.Effect): help="The quality of the calculated output") def effect(self): + self.options.primaryr = self.unittouu(str(self.options.primaryr) + 'px') + self.options.secondaryr = self.unittouu(str(self.options.secondaryr) + 'px') + self.options.penr = self.unittouu(str(self.options.penr) + 'px') if self.options.secondaryr == 0: return @@ -68,7 +71,7 @@ class Spirograph(inkex.Effect): rotation = - math.pi * self.options.rotation / 180; new = inkex.etree.Element(inkex.addNS('path','svg')) - s = { 'stroke': '#000000', 'fill': 'none' } + s = { 'stroke': '#000000', 'fill': 'none', 'stroke-width': str(self.unittouu('1px')) } new.set('style', simplestyle.formatStyle(s)) pathString = '' diff --git a/share/extensions/triangle.py b/share/extensions/triangle.py index 81945f370..ad26c6891 100755 --- a/share/extensions/triangle.py +++ b/share/extensions/triangle.py @@ -82,7 +82,7 @@ def draw_tri_from_3_sides(s_a, s_b, s_c, offset, parent): #draw a triangle from offy = c[1]/2 #c is the highest point offset = ( offset[0]-offx , offset[1]-offy ) #add the centre of the triangle to the offset - draw_SVG_tri(a, b, c , offset, 2, 'Triangle', parent) + draw_SVG_tri(a, b, c , offset, Grid_Polar.unittouu(e, '2px'), 'Triangle', parent) else: sys.stderr.write('Error:Invalid Triangle Specifications.\n') @@ -122,7 +122,10 @@ class Grid_Polar(inkex.Effect): tri = self.current_layer offset = (self.view_center[0],self.view_center[1]) #the offset require to centre the triangle - + self.options.s_a = self.unittouu(str(self.options.s_a) + 'px') + self.options.s_b = self.unittouu(str(self.options.s_b) + 'px') + self.options.s_c = self.unittouu(str(self.options.s_c) + 'px') + if self.options.mode == '3_sides': s_a = self.options.s_a s_b = self.options.s_b diff --git a/share/extensions/wireframe_sphere.py b/share/extensions/wireframe_sphere.py index 5804a1b45..b8947869c 100755 --- a/share/extensions/wireframe_sphere.py +++ b/share/extensions/wireframe_sphere.py @@ -66,7 +66,7 @@ inkex.localize() def draw_SVG_ellipse((rx, ry), (cx, cy), parent, start_end=(0,2*pi),transform='' ): style = { 'stroke' : '#000000', - 'stroke-width' : '1', + 'stroke-width' : str(Wireframe_Sphere.unittouu(e, '1px')), 'fill' : 'none' } circ_attribs = {'style':simplestyle.formatStyle(style), inkex.addNS('cx','sodipodi') :str(cx), @@ -120,6 +120,7 @@ class Wireframe_Sphere(inkex.Effect): else: flip = '' #no flip + so.RADIUS = self.unittouu(str(so.RADIUS) + 'px') so.TILT = abs(so.TILT)*(pi/180) #Convert to radians so.ROT_OFFSET = so.ROT_OFFSET*(pi/180) #Convert to radians -- cgit v1.2.3 From e099764f90ea719b1ba330581a080fd1b508cf2b Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Sat, 8 Feb 2014 08:00:21 -0500 Subject: reverting triangle.py and wireframe_sphere.py from rev 13007 (bzr r13010) --- share/extensions/triangle.py | 7 ++----- share/extensions/wireframe_sphere.py | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'share') diff --git a/share/extensions/triangle.py b/share/extensions/triangle.py index ad26c6891..81945f370 100755 --- a/share/extensions/triangle.py +++ b/share/extensions/triangle.py @@ -82,7 +82,7 @@ def draw_tri_from_3_sides(s_a, s_b, s_c, offset, parent): #draw a triangle from offy = c[1]/2 #c is the highest point offset = ( offset[0]-offx , offset[1]-offy ) #add the centre of the triangle to the offset - draw_SVG_tri(a, b, c , offset, Grid_Polar.unittouu(e, '2px'), 'Triangle', parent) + draw_SVG_tri(a, b, c , offset, 2, 'Triangle', parent) else: sys.stderr.write('Error:Invalid Triangle Specifications.\n') @@ -122,10 +122,7 @@ class Grid_Polar(inkex.Effect): tri = self.current_layer offset = (self.view_center[0],self.view_center[1]) #the offset require to centre the triangle - self.options.s_a = self.unittouu(str(self.options.s_a) + 'px') - self.options.s_b = self.unittouu(str(self.options.s_b) + 'px') - self.options.s_c = self.unittouu(str(self.options.s_c) + 'px') - + if self.options.mode == '3_sides': s_a = self.options.s_a s_b = self.options.s_b diff --git a/share/extensions/wireframe_sphere.py b/share/extensions/wireframe_sphere.py index b8947869c..5804a1b45 100755 --- a/share/extensions/wireframe_sphere.py +++ b/share/extensions/wireframe_sphere.py @@ -66,7 +66,7 @@ inkex.localize() def draw_SVG_ellipse((rx, ry), (cx, cy), parent, start_end=(0,2*pi),transform='' ): style = { 'stroke' : '#000000', - 'stroke-width' : str(Wireframe_Sphere.unittouu(e, '1px')), + 'stroke-width' : '1', 'fill' : 'none' } circ_attribs = {'style':simplestyle.formatStyle(style), inkex.addNS('cx','sodipodi') :str(cx), @@ -120,7 +120,6 @@ class Wireframe_Sphere(inkex.Effect): else: flip = '' #no flip - so.RADIUS = self.unittouu(str(so.RADIUS) + 'px') so.TILT = abs(so.TILT)*(pi/180) #Convert to radians so.ROT_OFFSET = so.ROT_OFFSET*(pi/180) #Convert to radians -- cgit v1.2.3