diff options
| author | Aur??lio A. Heckert <aurium@gmail.com> | 2009-02-04 20:55:48 +0000 |
|---|---|---|
| committer | aurium <aurium@users.sourceforge.net> | 2009-02-04 20:55:48 +0000 |
| commit | 0372b2e7a2e3e0ef315005818b5696fe381bc104 (patch) | |
| tree | df5c7bba657d58e1602e3a2b05302c50e413f8e6 | |
| parent | Making the eraser more eraser-like (diff) | |
| download | inkscape-0372b2e7a2e3e0ef315005818b5696fe381bc104.tar.gz inkscape-0372b2e7a2e3e0ef315005818b5696fe381bc104.zip | |
Printing marks update from Nicolas Dufour - changeing positions: star_target and reg_marks
(bzr r7229)
| -rw-r--r-- | share/extensions/printing-marks.inx | 4 | ||||
| -rw-r--r-- | share/extensions/printing-marks.py | 20 |
2 files changed, 14 insertions, 10 deletions
diff --git a/share/extensions/printing-marks.inx b/share/extensions/printing-marks.inx index d8455165b..a893dedd6 100644 --- a/share/extensions/printing-marks.inx +++ b/share/extensions/printing-marks.inx @@ -16,8 +16,8 @@ </page>
<page name="tab" _gui-text="Positioning">
<param name="where" type="enum" _gui-text="Set crop marks to">
- <item>selection</item>
- <item>canvas</item>
+ <_item value="selection">Selection</_item>
+ <_item value="canvas">Canvas</_item>
</param>
<param name="unit" type="enum" _gui-text="Unit">
<item>px</item>
diff --git a/share/extensions/printing-marks.py b/share/extensions/printing-marks.py index 0a8d54abb..710b71b1c 100644 --- a/share/extensions/printing-marks.py +++ b/share/extensions/printing-marks.py @@ -93,14 +93,16 @@ class Printing_Marks (inkex.Effect): def draw_crop_line(self, x1, y1, x2, y2, name, parent):
- style = { 'stroke': '#000000', 'stroke-width': str(self.stroke_width), 'fill': 'none'}
+ style = { 'stroke': '#000000', 'stroke-width': str(self.stroke_width),
+ 'fill': 'none'}
line_attribs = {'style': simplestyle.formatStyle(style),
'id': name,
'd': 'M '+str(x1)+','+str(y1)+' L '+str(x2)+','+str(y2)}
inkex.etree.SubElement(parent, 'path', line_attribs)
def draw_bleed_line(self, x1, y1, x2, y2, name, parent):
- style = { 'stroke': '#000000', 'stroke-width': str(self.stroke_width), 'fill': 'none',
+ style = { 'stroke': '#000000', 'stroke-width': str(self.stroke_width),
+ 'fill': 'none',
'stroke-miterlimit': '4', 'stroke-dasharray': '4, 2, 1, 2',
'stroke-dashoffset': '0' }
line_attribs = {'style': simplestyle.formatStyle(style),
@@ -156,7 +158,8 @@ class Printing_Marks (inkex.Effect): inkex.addNS('label','inkscape'):name,
'transform':'translate('+str(cx)+','+str(cy)+')',
'd':d}
- inkex.etree.SubElement(parent, inkex.addNS('path','svg'), regmark_attribs)
+ inkex.etree.SubElement(parent, inkex.addNS('path','svg'),
+ regmark_attribs)
def draw_coluor_bars(self, cx, cy, rotate, name, parent):
g = inkex.etree.SubElement(parent, 'g', {
@@ -196,7 +199,8 @@ class Printing_Marks (inkex.Effect): self.height = height = inkex.unittouu(svg.attrib['height'])
# Convert parameters to user unit
- offset = inkex.unittouu(str(self.options.crop_offset) + self.options.unit)
+ offset = inkex.unittouu(str(self.options.crop_offset) + \
+ self.options.unit)
bt = inkex.unittouu(str(self.options.bleed_top) + self.options.unit)
bb = inkex.unittouu(str(self.options.bleed_bottom) + self.options.unit)
bl = inkex.unittouu(str(self.options.bleed_left) + self.options.unit)
@@ -328,13 +332,13 @@ class Printing_Marks (inkex.Effect): # Top Mark
cy = max( bmt + offset, self.min_mark_margin )
- self.draw_reg_marks((width/2) - self.mark_size*1.5,
+ self.draw_reg_marks((width/2),
-cy - (self.mark_size/2),
'90', 'regMarkT', g_center)
# Bottom Mark
cy = max( bmb + offset, self.min_mark_margin )
- self.draw_reg_marks((width/2) - self.mark_size*1.5,
+ self.draw_reg_marks((width/2),
height + cy + (self.mark_size/2),
'-90', 'regMarkB', g_center)
@@ -359,12 +363,12 @@ class Printing_Marks (inkex.Effect): else :
# Top Star
cy = max( bmt + offset, self.min_mark_margin )
- self.draw_star_target((width/2),
+ self.draw_star_target((width/2) - self.mark_size*1.5,
-cy - (self.mark_size/2),
'starTargetT', g_center)
# Bottom Star
cy = max( bmb + offset, self.min_mark_margin )
- self.draw_star_target((width/2),
+ self.draw_star_target((width/2) - self.mark_size*1.5,
height + cy + (self.mark_size/2),
'starTargetB', g_center)
|
