diff options
| author | Alvin Penner <penner@vaxxine.com> | 2014-04-03 19:35:07 +0000 |
|---|---|---|
| committer | apenner <penner@vaxxine.com> | 2014-04-03 19:35:07 +0000 |
| commit | 91cd0ccc5198df06dcdda6512b9630bee800a835 (patch) | |
| tree | 208597b8863371a93807eb9189cbedeab9e8c5a6 | |
| parent | Move the new changelog back tot he old name for packagers. (diff) | |
| download | inkscape-91cd0ccc5198df06dcdda6512b9630bee800a835.tar.gz inkscape-91cd0ccc5198df06dcdda6512b9630bee800a835.zip | |
extensions. Measure Path. add center point, modify path id (Bug 171331)
Fixed bugs:
- https://launchpad.net/bugs/171331
(bzr r13259)
| -rwxr-xr-x | share/extensions/measure.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/share/extensions/measure.py b/share/extensions/measure.py index 5c709594f..edcd2e92f 100755 --- a/share/extensions/measure.py +++ b/share/extensions/measure.py @@ -203,6 +203,7 @@ class Length(inkex.Effect): else: xc, yc = cspcofm(p) self.group = inkex.etree.SubElement(node.getparent(),inkex.addNS('path','svg')) + self.group.set('id', 'MassCenter_' + node.get('id')) self.addCross(self.group, xc, yc, scale) continue # Format the length as string @@ -220,8 +221,8 @@ class Length(inkex.Effect): def addCross(self, node, x, y, scale): l = 3*scale # 3 pixels in document units - node.set('d', 'm %s,%s %s,0 m %s,%s 0,%s' % (str(x-l), str(y), str(2*l), str(-l), str(-l), str(2*l))) - node.set('style', 'stroke:#000000;stroke-width:%s' % str(0.5*scale)) + node.set('d', 'm %s,%s %s,0 %s,0 m %s,%s 0,%s 0,%s' % (str(x-l), str(y), str(l), str(l), str(-l), str(-l), str(l), str(l))) + node.set('style', 'stroke:#000000;fill:none;stroke-width:%s' % str(0.5*scale)) def addTextOnPath(self, node, x, y, text, id, anchor, startOffset, dy = 0): new = inkex.etree.SubElement(node,inkex.addNS('textPath','svg')) |
