Skip to content

Commit

Permalink
Added adjustable font size to options
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Grauwiler committed Oct 28, 2013
1 parent b44d8c1 commit 4f80952
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions extensions/paintbynumber.inx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<dependency type="executable" location="extensions">inkex.py</dependency>
<_param name="title" type="description">Generates a "Paint by Number" picture from the selected paths.</_param>
<param name="radius" type="string" _gui-text="Vertex Radius">5</param>
<param name="fontsize" type="string" _gui-text="Font Size">15</param>
<param name="hidepath" type="boolean" _gui-text="Hide path after completion">true</param>
<effect>
<object-type>all</object-type>
Expand Down
4 changes: 4 additions & 0 deletions extensions/paintbynumber.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def __init__(self):
self.OptionParser.add_option('-r', '--radius', action = 'store',
type = 'string', dest = 'radius', default = 10,
help = 'Radius of the dots at every vertex of the path')
self.OptionParser.add_option('-f', '--fontsize', action = 'store',
type = 'string', dest = 'fontsize', default = 10,
help = 'Font size of the numbers')


def effect(self):
Expand Down Expand Up @@ -141,6 +144,7 @@ def effect(self):
number.text = str(idx+1)
number.set('x', str(nx))
number.set('y', str(ny))
number.set('font-size', self.options.fontsize)

numberLayer.append(number)

Expand Down

0 comments on commit 4f80952

Please sign in to comment.