summaryrefslogtreecommitdiffstats
path: root/share/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'share/extensions')
-rw-r--r--share/extensions/Barcode/Base.py140
-rw-r--r--share/extensions/Barcode/BaseEan.py107
-rw-r--r--share/extensions/Barcode/Code128.py130
-rw-r--r--share/extensions/Barcode/Code25i.py57
-rw-r--r--share/extensions/Barcode/Code39.py116
-rw-r--r--share/extensions/Barcode/Code39Ext.py2
-rw-r--r--share/extensions/Barcode/Code93.py120
-rw-r--r--share/extensions/Barcode/Ean13.py13
-rw-r--r--share/extensions/Barcode/Ean2.py38
-rw-r--r--share/extensions/Barcode/Ean5.py37
-rw-r--r--share/extensions/Barcode/Ean8.py14
-rw-r--r--share/extensions/Barcode/Makefile.am1
-rw-r--r--share/extensions/Barcode/Rm4scc.py9
-rw-r--r--share/extensions/Barcode/Upca.py16
-rw-r--r--share/extensions/Barcode/Upce.py66
-rw-r--r--share/extensions/Barcode/__init__.py18
-rwxr-xr-xshare/extensions/addnodes.py2
-rwxr-xr-xshare/extensions/bezmisc.py2
-rwxr-xr-xshare/extensions/chardataeffect.py2
-rw-r--r--share/extensions/color_randomize.inx9
-rwxr-xr-xshare/extensions/color_randomize.py87
-rwxr-xr-xshare/extensions/coloreffect.py36
-rwxr-xr-xshare/extensions/convert2dashes.py2
-rwxr-xr-xshare/extensions/cubicsuperpath.py2
-rwxr-xr-xshare/extensions/dimension.py2
-rwxr-xr-xshare/extensions/dm2svg.py2
-rwxr-xr-xshare/extensions/dots.py2
-rwxr-xr-xshare/extensions/draw_from_triangle.py2
-rwxr-xr-xshare/extensions/dxf_input.py2
-rwxr-xr-xshare/extensions/dxf_outlines.py2
-rwxr-xr-xshare/extensions/edge3d.py2
-rwxr-xr-xshare/extensions/embedimage.py2
-rwxr-xr-xshare/extensions/extractimage.py2
-rwxr-xr-xshare/extensions/extrude.py2
-rwxr-xr-xshare/extensions/ffgeom.py2
-rwxr-xr-xshare/extensions/flatten.py2
-rwxr-xr-xshare/extensions/foldablebox.py2
-rwxr-xr-xshare/extensions/fractalize.py2
-rwxr-xr-xshare/extensions/funcplot.py2
-rwxr-xr-xshare/extensions/gcodetools.py2
-rwxr-xr-xshare/extensions/generate_voronoi.py2
-rwxr-xr-xshare/extensions/gimp_xcf.py2
-rwxr-xr-xshare/extensions/grid_cartesian.py2
-rwxr-xr-xshare/extensions/grid_isometric.py2
-rwxr-xr-xshare/extensions/grid_polar.py2
-rwxr-xr-xshare/extensions/guides_creator.py2
-rwxr-xr-xshare/extensions/handles.py2
-rwxr-xr-xshare/extensions/hershey.py2
-rw-r--r--share/extensions/hpgl_decoder.py2
-rw-r--r--share/extensions/hpgl_encoder.py2
-rwxr-xr-xshare/extensions/hpgl_input.py2
-rwxr-xr-xshare/extensions/hpgl_output.py2
-rwxr-xr-xshare/extensions/image_attributes.py2
-rwxr-xr-xshare/extensions/ink2canvas.py2
-rw-r--r--share/extensions/ink2canvas/canvas.py2
-rw-r--r--share/extensions/ink2canvas/svg.py2
-rwxr-xr-xshare/extensions/inkex.py135
-rwxr-xr-xshare/extensions/inkwebeffect.py2
-rwxr-xr-xshare/extensions/interp.py2
-rwxr-xr-xshare/extensions/interp_att_g.py2
-rwxr-xr-xshare/extensions/layers2svgfont.py2
-rwxr-xr-xshare/extensions/layout_nup.py2
-rwxr-xr-xshare/extensions/lindenmayer.py2
-rwxr-xr-xshare/extensions/lorem_ipsum.py2
-rwxr-xr-xshare/extensions/markers_strokepaint.py2
-rwxr-xr-xshare/extensions/measure.py2
-rwxr-xr-xshare/extensions/merge_styles.py2
-rwxr-xr-xshare/extensions/motion.py2
-rwxr-xr-xshare/extensions/new_glyph_layer.py11
-rwxr-xr-xshare/extensions/next_glyph_layer.py2
-rw-r--r--share/extensions/nicechart.inx103
-rwxr-xr-xshare/extensions/nicechart.py718
-rwxr-xr-xshare/extensions/param_curves.py2
-rwxr-xr-xshare/extensions/pathalongpath.py2
-rwxr-xr-xshare/extensions/pathmodifier.py2
-rwxr-xr-xshare/extensions/pathscatter.py2
-rwxr-xr-xshare/extensions/perfectboundcover.py2
-rwxr-xr-xshare/extensions/perspective.py2
-rwxr-xr-xshare/extensions/plotter.py12
-rwxr-xr-xshare/extensions/polyhedron_3d.py2
-rwxr-xr-xshare/extensions/previous_glyph_layer.py2
-rwxr-xr-xshare/extensions/print_win32_vector.py2
-rwxr-xr-xshare/extensions/printing_marks.py2
-rwxr-xr-xshare/extensions/pturtle.py2
-rwxr-xr-xshare/extensions/radiusrand.py2
-rwxr-xr-xshare/extensions/render_alphabetsoup.py2
-rw-r--r--share/extensions/render_barcode.inx5
-rwxr-xr-xshare/extensions/render_barcode.py57
-rwxr-xr-xshare/extensions/render_barcode_datamatrix.py2
-rwxr-xr-xshare/extensions/render_gear_rack.py2
-rwxr-xr-xshare/extensions/render_gears.py2
-rwxr-xr-xshare/extensions/rtree.py2
-rwxr-xr-xshare/extensions/rubberstretch.py2
-rwxr-xr-xshare/extensions/seamless_pattern.py7
-rw-r--r--share/extensions/seamless_pattern.svg85
-rwxr-xr-xshare/extensions/setup_typography_canvas.py2
-rw-r--r--share/extensions/simplepath.py2
-rw-r--r--share/extensions/simplestyle.py2
-rw-r--r--share/extensions/simpletransform.py2
-rwxr-xr-xshare/extensions/spirograph.py2
-rwxr-xr-xshare/extensions/split.py2
-rwxr-xr-xshare/extensions/straightseg.py2
-rwxr-xr-xshare/extensions/summersnight.py2
-rwxr-xr-xshare/extensions/svg_and_media_zip_output.py2
-rwxr-xr-xshare/extensions/svgcalendar.py2
-rwxr-xr-xshare/extensions/svgfont2layers.py2
-rwxr-xr-xshare/extensions/tar_layers.py2
-rw-r--r--share/extensions/test/Makefile.am1
-rwxr-xr-xshare/extensions/test/color_randomize.test.py123
-rwxr-xr-xshare/extensions/test/run-all-extension-tests20
-rwxr-xr-xshare/extensions/triangle.py2
-rw-r--r--[-rwxr-xr-x]share/extensions/voronoi.py2
-rw-r--r--share/extensions/voronoi2svg.inx6
-rw-r--r--[-rwxr-xr-x]share/extensions/voronoi2svg.py59
-rwxr-xr-xshare/extensions/web-set-att.py2
-rwxr-xr-xshare/extensions/web-transmit-att.py2
-rwxr-xr-xshare/extensions/webslicer_create_group.py2
-rwxr-xr-xshare/extensions/webslicer_create_rect.py2
-rwxr-xr-xshare/extensions/webslicer_effect.py2
-rwxr-xr-xshare/extensions/webslicer_export.py2
-rwxr-xr-xshare/extensions/whirl.py2
-rwxr-xr-xshare/extensions/wireframe_sphere.py2
122 files changed, 1847 insertions, 689 deletions
diff --git a/share/extensions/Barcode/Base.py b/share/extensions/Barcode/Base.py
index b7429f84f..bfa0a774f 100644
--- a/share/extensions/Barcode/Base.py
+++ b/share/extensions/Barcode/Base.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Base module for rendering barcodes for Inkscape.
@@ -23,114 +23,140 @@ import itertools
import sys
from lxml import etree
+(TEXT_POS_BOTTOM, TEXT_POS_TOP) = range(2)
(WHITE_BAR, BLACK_BAR, TALL_BAR) = range(3)
TEXT_TEMPLATE = 'font-size:%dpx;text-align:center;text-anchor:middle;'
+SVG_URI = u'http://www.w3.org/2000/svg'
+# pylint: disable=abstract-class-not-used
class Barcode(object):
"""Provide a base class for all barcode renderers"""
+ default_height = 30
+ font_size = 9
name = None
- def error(self, bar, msg):
+ def error(self, text, msg):
"""Cause an error to be reported"""
sys.stderr.write(
- "Error encoding '%s' as %s barcode: %s\n" % (bar, self.name, msg))
+ "Error encoding '%s' as %s barcode: %s\n" % (text, self.name, msg))
return "ERROR"
- def __init__(self, param={}):
+ def encode(self, text):
+ """
+ Replace this with the encoding function, it should return
+ a string of ones and zeros
+ """
+ raise NotImplementedError("You need to write an encode() function.")
+
+ def __init__(self, param):
+ param = param or {}
self.document = param.get('document', None)
- self.x = int(param.get('x', 0))
- self.y = int(param.get('y', 0))
- self.scale = param.get('scale', 1)
- self.height = param.get('height', 30)
- self.label = param.get('text', None)
- self.string = self.encode( self.label )
-
- if not self.string:
- return
+ self.known_ids = []
+ self._extra = []
- self.width = len(self.string)
- self.data = self.graphicalArray(self.string)
+ self.pos_x = int(param.get('x', 0))
+ self.pos_y = int(param.get('y', 0))
+ self.text = param.get('text', None)
+ self.scale = param.get('scale', 1)
+ self.height = param.get('height', self.default_height)
+ self.pos_text = param.get('text_pos', TEXT_POS_BOTTOM)
- def get_id(self):
- """Get the next useful id"""
- if not self.document:
- return "barcode"
- doc_ids = {}
- docIdNodes = self.document.xpath('//@id')
- for m in docIdNodes:
- doc_ids[m] = 1
+ if self.document:
+ self.known_ids = list(self.document.xpath('//@id'))
- name = 'barcode'
+ if not self.text:
+ raise ValueError("No string specified for barcode.")
+ def get_id(self, name='element'):
+ """Get the next useful id (and claim it)"""
index = 0
- while (doc_ids.has_key(name)):
+ while name in self.known_ids:
index += 1
name = 'barcode%d' % index
+ self.known_ids.append(name)
return name
+ def add_extra_barcode(self, barcode, **kw):
+ """Add an extra barcode along side this one, used for ean13 extras"""
+ from . import getBarcode
+ kw['height'] = self.height
+ kw['document'] = self.document
+ kw['scale'] = None
+ self._extra.append(getBarcode(barcode, **kw).generate())
+
def generate(self):
"""Generate the actual svg from the coding"""
- svg_uri = u'http://www.w3.org/2000/svg'
- if self.string == 'ERROR':
+ string = self.encode(self.text)
+
+ if string == 'ERROR':
return
- if not self.string or not self.data:
- raise ValueError("No string specified for barcode.")
- data = self.data
- name = self.get_id()
+ name = self.get_id('barcode')
# use an svg group element to contain the barcode
- barcode = etree.Element('{%s}%s' % (svg_uri,'g'))
+ barcode = etree.Element('{%s}g' % SVG_URI)
barcode.set('id', name)
barcode.set('style', 'fill: black;')
- barcode.set('transform', 'translate(%d,%d) scale(%f)' % (self.x, self.y, self.scale))
-
+ if self.scale:
+ barcode.set('transform', 'translate(%d,%d) scale(%f)' % (
+ self.pos_x, self.pos_y, self.scale))
+ else:
+ barcode.set('transform', 'translate(%d,%d)' % (
+ self.pos_x, self.pos_y))
+
+ bar_id = 1
bar_offset = 0
- bar_id = 1
+ tops = set()
- for datum in data:
+ for datum in self.graphical_array(string):
# Datum 0 tells us what style of bar is to come next
- style = self.getStyle(int(datum[0]))
+ style = self.get_style(int(datum[0]))
# Datum 1 tells us what width in units,
# style tells us how wide a unit is
width = int(datum[1]) * int(style['width'])
if style['write']:
- rect = etree.SubElement(barcode,'{%s}%s' % (svg_uri,'rect'))
- rect.set('x', str(bar_offset))
- rect.set('y', str(style['top']))
- rect.set('width', str(width))
+ tops.add(style['top'])
+ rect = etree.SubElement(barcode, '{%s}rect' % SVG_URI)
+ rect.set('x', str(bar_offset))
+ rect.set('y', str(style['top']))
+ if self.pos_text == TEXT_POS_TOP:
+ rect.set('y', str(style['top'] + self.font_size))
+ rect.set('id', "%s_bar%d" % (name, bar_id))
+ rect.set('width', str(width))
rect.set('height', str(style['height']))
- rect.set('id', "%s_bar%d" % (name, bar_id))
bar_offset += width
bar_id += 1
+ for extra in self._extra:
+ if extra is not None:
+ barcode.append(extra)
+
bar_width = bar_offset
# Add text at the bottom of the barcode
- text = etree.SubElement(barcode,'{%s}%s' % (svg_uri,'text'))
- text.set( 'x', str(int(bar_width / 2)))
- text.set( 'y', str(self.height + self.fontSize() ))
- text.set( 'style', TEXT_TEMPLATE % self.fontSize() )
- text.set( '{http://www.w3.org/XML/1998/namespace}space', 'preserve' )
- text.set( 'id', '%s_text' % name )
- text.text = str(self.label)
+ text = etree.SubElement(barcode, '{%s}text' % SVG_URI)
+ text.set('x', str(int(bar_width / 2)))
+ text.set('y', str(min(tops) + self.font_size - 1))
+ if self.pos_text == TEXT_POS_BOTTOM:
+ text.set('y', str(self.height + max(tops) + self.font_size))
+ text.set('style', TEXT_TEMPLATE % self.font_size)
+ text.set('{http://www.w3.org/XML/1998/namespace}space', 'preserve')
+ text.set('id', '%s_text' % name)
+ text.text = str(self.text)
return barcode
- def graphicalArray(self, code):
+ def graphical_array(self, code):
"""Converts black and white markets into a space array"""
- return [(x,len(list(y))) for x, y in itertools.groupby(code)]
+ return [(x, len(list(y))) for x, y in itertools.groupby(code)]
- def getStyle(self, index):
+ def get_style(self, index):
"""Returns the styles that should be applied to each bar"""
- result = { 'width' : 1, 'top' : 0, 'write' : True }
+ result = {'width' : 1, 'top' : 0, 'write' : True}
if index == BLACK_BAR:
result['height'] = int(self.height)
if index == TALL_BAR:
- result['height'] = int(self.height) + int(self.fontSize() / 2)
+ result['height'] = int(self.height) + int(self.font_size / 2)
if index == WHITE_BAR:
result['write'] = False
return result
- def fontSize(self):
- """Return the ideal font size, defaults to 9px"""
- return 9
diff --git a/share/extensions/Barcode/BaseEan.py b/share/extensions/Barcode/BaseEan.py
index 05c9b1c39..2c3ab0c09 100644
--- a/share/extensions/Barcode/BaseEan.py
+++ b/share/extensions/Barcode/BaseEan.py
@@ -13,40 +13,39 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Some basic common code shared between EAN and UCP generators.
"""
-from Base import Barcode
-import sys
+from .Base import Barcode, TEXT_POS_TOP
MAPPING = [
# Left side of barcode Family '0'
- [ "0001101", "0011001", "0010011", "0111101", "0100011",
- "0110001", "0101111", "0111011", "0110111", "0001011" ],
+ ["0001101", "0011001", "0010011", "0111101", "0100011",
+ "0110001", "0101111", "0111011", "0110111", "0001011"],
# Left side of barcode Family '1' and flipped to right side.
- [ "0100111", "0110011", "0011011", "0100001", "0011101",
- "0111001", "0000101", "0010001", "0001001", "0010111" ],
+ ["0100111", "0110011", "0011011", "0100001", "0011101",
+ "0111001", "0000101", "0010001", "0001001", "0010111"],
]
# This chooses which of the two encodings above to use.
-FAMILIES = [ '000000', '001011', '001101', '001110', '010011',
- '011001', '011100', '010101', '010110', '011010' ]
-
-GUARD_BAR = '202'
-CENTER_BAR = '02020'
+FAMILIES = ('000000', '001011', '001101', '001110', '010011',
+ '011001', '011100', '010101', '010110', '011010')
class EanBarcode(Barcode):
"""Simple base class for all EAN type barcodes"""
- length = None
lengths = None
- checks = []
+ length = None
+ checks = []
+ extras = {}
+ magic = 10
+ guard_bar = '202'
+ center_bar = '02020'
def intarray(self, number):
"""Convert a string of digits into an array of ints"""
- return [ int(i) for i in number ]
-
+ return [int(i) for i in number]
def encode_interleaved(self, family, number, fams=FAMILIES):
"""Encode any side of the barcode, interleaved"""
@@ -54,27 +53,24 @@ class EanBarcode(Barcode):
encset = self.intarray(fams[family])
for i in range(len(number)):
thismap = MAPPING[encset[i]]
- result.append( thismap[number[i]] )
+ result.append(thismap[number[i]])
return result
-
def encode_right(self, number):
"""Encode the right side of the barcode, non-interleaved"""
result = []
- for n in number:
+ for num in number:
# The right side is always the reverse of the left's family '1'
- result.append( MAPPING[1][n][::-1] )
+ result.append(MAPPING[1][num][::-1])
return result
-
def encode_left(self, number):
"""Encode the left side of the barcode, non-interleaved"""
result = []
- for n in number:
- result.append( MAPPING[0][n] )
+ for num in number:
+ result.append(MAPPING[0][num])
return result
-
def space(self, *spacing):
"""Space out an array of numbers"""
result = ''
@@ -86,60 +82,75 @@ class EanBarcode(Barcode):
result += ' ' * space
return result
-
- def getLengths(self):
+ def get_lengths(self):
"""Return a list of acceptable lengths"""
if self.length:
- return [ self.length ]
+ return [self.length]
return self.lengths[:]
-
def encode(self, code):
"""Encode any EAN barcode"""
+ code = code.replace(' ', '').strip()
+
if not code.isdigit():
return self.error(code, 'Not a Number, must be digits 0-9 only')
- lengths = self.getLengths() + self.checks
+ lengths = self.get_lengths() + self.checks
+ # Allow extra barcodes after the first one
if len(code) not in lengths:
- return self.error(code, 'Wrong size, must be %s digits' %
- (', '.join(self.space(lengths))))
+ for extra in self.extras:
+ sep = len(code) - extra
+ if sep in lengths:
+ # Generate a barcode along side this one.
+ self.add_extra_barcode(self.extras[extra], text=code[sep:],
+ x=self.pos_x + 400 * self.scale, text_pos=TEXT_POS_TOP)
+ code = code[:sep]
+
+ if len(code) not in lengths:
+ return self.error(code, 'Wrong size %d, must be %s digits' %
+ (len(code), ', '.join([str(length) for length in lengths])))
if self.checks:
if len(code) not in self.checks:
- code = self.appendChecksum(code)
- elif not self.verifyChecksum(code):
+ code = self.append_checksum(code)
+ elif not self.verify_checksum(code):
return self.error(code, 'Checksum failed, omit for new sum')
return self._encode(self.intarray(code))
-
- def _encode(self, n):
+ def _encode(self, num):
+ """
+ Write your EAN encoding function, it's passed in an array of int and
+ it should return a string on 1 and 0 for black and white parts
+ """
raise NotImplementedError("_encode should be provided by parent EAN")
- def enclose(self, left, right=[], guard=GUARD_BAR, center=CENTER_BAR):
+ def enclose(self, left, right=()):
"""Standard Enclosure"""
- parts = [ guard ] + left + [ center ] + right + [ guard ]
- return ''.join( parts )
+ parts = [self.guard_bar] + left
+ parts.append(self.center_bar)
+ parts += list(right) + [self.guard_bar]
+ return ''.join(parts)
- def getChecksum(self, number, magic=10):
+ def get_checksum(self, number):
"""Generate a UPCA/EAN13/EAN8 Checksum"""
- weight = [3,1] * len(number)
+ weight = [3, 1] * len(number)
result = 0
# We need to work from left to right so reverse
number = number[::-1]
# checksum based on first digits.
for i in range(len(number)):
- result += int(number[i]) * weight[i]
+ result += int(number[i]) * weight[i]
# Modulous result to a single digit checksum
- checksum = magic - (result % magic)
- if checksum < 0 or checksum >= magic:
- return '0'
+ checksum = self.magic - (result % self.magic)
+ if checksum < 0 or checksum >= self.magic:
+ return '0'
return str(checksum)
- def appendChecksum(self, number):
+ def append_checksum(self, number):
"""Apply the checksum to a short number"""
- return number + self.getChecksum(number)
+ return number + self.get_checksum(number)
- def verifyChecksum(self, number):
+ def verify_checksum(self, number):
"""Verify any checksum"""
- return self.getChecksum(number[:-1]) == number[-1]
+ return self.get_checksum(number[:-1]) == number[-1]
diff --git a/share/extensions/Barcode/Code128.py b/share/extensions/Barcode/Code128.py
index 618ce7817..b90e3bcf6 100644
--- a/share/extensions/Barcode/Code128.py
+++ b/share/extensions/Barcode/Code128.py
@@ -17,42 +17,42 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
-Python barcode renderer for Code128/EAN128 barcodes. Designed for use with Inkscape.
+Renderer for Code128/EAN128 codes. Designed for use with Inkscape.
"""
-from Base import Barcode
-import math
+from .Base import Barcode
import re
-codeMap = [
- '11011001100','11001101100','11001100110','10010011000','10010001100',
- '10001001100','10011001000','10011000100','10001100100','11001001000',
- '11001000100','11000100100','10110011100','10011011100','10011001110',
- '10111001100','10011101100','10011100110','11001110010','11001011100',
- '11001001110','11011100100','11001110100','11101101110','11101001100',
- '11100101100','11100100110','11101100100','11100110100','11100110010',
- '11011011000','11011000110','11000110110','10100011000','10001011000',
- '10001000110','10110001000','10001101000','10001100010','11010001000',
- '11000101000','11000100010','10110111000','10110001110','10001101110',
- '10111011000','10111000110','10001110110','11101110110','11010001110',
- '11000101110','11011101000','11011100010','11011101110','11101011000',
- '11101000110','11100010110','11101101000','11101100010','11100011010',
- '11101111010','11001000010','11110001010','10100110000','10100001100',
- '10010110000','10010000110','10000101100','10000100110','10110010000',
- '10110000100','10011010000','10011000010','10000110100','10000110010',
- '11000010010','11001010000','11110111010','11000010100','10001111010',
- '10100111100','10010111100','10010011110','10111100100','10011110100',
- '10011110010','11110100100','11110010100','11110010010','11011011110',
- '11011110110','11110110110','10101111000','10100011110','10001011110',
- '10111101000','10111100010','11110101000','11110100010','10111011110',
- '10111101110','11101011110','11110101110','11010000100','11010010000',
- '11010011100','11000111010','11' ]
-
-def mapExtra(sd, chars):
- result = list(sd)
+CODE_MAP = [
+ '11011001100', '11001101100', '11001100110', '10010011000', '10010001100',
+ '10001001100', '10011001000', '10011000100', '10001100100', '11001001000',
+ '11001000100', '11000100100', '10110011100', '10011011100', '10011001110',
+ '10111001100', '10011101100', '10011100110', '11001110010', '11001011100',
+ '11001001110', '11011100100', '11001110100', '11101101110', '11101001100',
+ '11100101100', '11100100110', '11101100100', '11100110100', '11100110010',
+ '11011011000', '11011000110', '11000110110', '10100011000', '10001011000',
+ '10001000110', '10110001000', '10001101000', '10001100010', '11010001000',
+ '11000101000', '11000100010', '10110111000', '10110001110', '10001101110',
+ '10111011000', '10111000110', '10001110110', '11101110110', '11010001110',
+ '11000101110', '11011101000', '11011100010', '11011101110', '11101011000',
+ '11101000110', '11100010110', '11101101000', '11101100010', '11100011010',
+ '11101111010', '11001000010', '11110001010', '10100110000', '10100001100',
+ '10010110000', '10010000110', '10000101100', '10000100110', '10110010000',
+ '10110000100', '10011010000', '10011000010', '10000110100', '10000110010',
+ '11000010010', '11001010000', '11110111010', '11000010100', '10001111010',
+ '10100111100', '10010111100', '10010011110', '10111100100', '10011110100',
+ '10011110010', '11110100100', '11110010100', '11110010010', '11011011110',
+ '11011110110', '11110110110', '10101111000', '10100011110', '10001011110',
+ '10111101000', '10111100010', '11110101000', '11110100010', '10111011110',
+ '10111101110', '11101011110', '11110101110', '11010000100', '11010010000',
+ '11010011100', '11000111010', '11']
+
+def map_extra(data, chars):
+ """Maps the data into the chars"""
+ result = list(data)
for char in chars:
result.append(chr(char))
result.append('FNC3')
@@ -60,18 +60,18 @@ def mapExtra(sd, chars):
result.append('SHIFT')
return result
-# The mapExtra method is used to slim down the amount
+# The map_extra method is used to slim down the amount
# of pre code and instead we generate the lists
-charAB = list(' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_')
-charA = mapExtra(charAB, range(0, 31)) # Offset 64
-charB = mapExtra(charAB, range(96, 125)) # Offset -32
+CHAR_AB = list(" !\"#$%&\'()*+,-./0123456789:;<=>?@"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_")
+CHAR_A = map_extra(CHAR_AB, range(0, 31)) # Offset 64
+CHAR_B = map_extra(CHAR_AB, range(96, 125)) # Offset -32
class Code128(Barcode):
"""Main barcode object, generates the encoding bits here"""
def encode(self, text):
- result = ''
blocks = []
- block = ''
+ block = ''
# Split up into sections of numbers, or charicters
# This makes sure that all the charicters are encoded
@@ -81,42 +81,42 @@ class Code128(Barcode):
block = block + datum
else:
if block:
- blocks.append(self.bestBlock(block))
+ blocks.append(self.best_block(block))
block = ''
- blocks.append( [ 'C', datum ] )
+ blocks.append(['C', datum])
if block:
- blocks.append(self.bestBlock(block))
- block = '';
+ blocks.append(self.best_block(block))
+ block = ''
- self.inclabel = text
- return self.encodeBlocks(blocks)
+ return self.encode_blocks(blocks)
- def bestBlock(self, block):
- # If this has lower case then select B over A
+ def best_block(self, block):
+ """If this has lower case then select B over A"""
if block.upper() == block:
- return [ 'A', block ]
- return [ 'B', block ]
+ return ['A', block]
+ return ['B', block]
- def encodeBlocks(self, blocks):
- total = 0
- pos = 0
- encode = '';
+ def encode_blocks(self, blocks):
+ """Encode the given blocks into A, B or C codes"""
+ encode = ''
+ total = 0
+ pos = 0
for block in blocks:
- set = block[0]
+ b_set = block[0]
datum = block[1]
# POS : 0, 1
# A : 101, 103
# B : 100, 104
# C : 99, 105
- num = 0;
- if set == 'A':
+ num = 0
+ if b_set == 'A':
num = 103
- elif set == 'B':
+ elif b_set == 'B':
num = 104
- elif set == 'C':
+ elif b_set == 'C':
num = 105
i = pos
@@ -126,28 +126,28 @@ class Code128(Barcode):
i = 1
total = total + num * i
- encode = encode + codeMap[num]
+ encode = encode + CODE_MAP[num]
pos = pos + 1
- if set == 'A' or set == 'B':
- chars = charB
- if set == 'A':
- chars = charA
+ if b_set == 'A' or b_set == 'B':
+ chars = CHAR_B
+ if b_set == 'A':
+ chars = CHAR_A
for char in datum:
total = total + (chars.index(char) * pos)
- encode = encode + codeMap[chars.index(char)]
+ encode = encode + CODE_MAP[chars.index(char)]
pos = pos + 1
else:
for char in (datum[i:i+2] for i in range(0, len(datum), 2)):
total = total + (int(char) * pos)
- encode = encode + codeMap[int(char)]
+ encode = encode + CODE_MAP[int(char)]
pos = pos + 1
checksum = total % 103
- encode = encode + codeMap[checksum]
- encode = encode + codeMap[106]
- encode = encode + codeMap[107]
+ encode = encode + CODE_MAP[checksum]
+ encode = encode + CODE_MAP[106]
+ encode = encode + CODE_MAP[107]
return encode
diff --git a/share/extensions/Barcode/Code25i.py b/share/extensions/Barcode/Code25i.py
index 51346be60..2c751559c 100644
--- a/share/extensions/Barcode/Code25i.py
+++ b/share/extensions/Barcode/Code25i.py
@@ -13,53 +13,48 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Generate barcodes for Code25-interleaved 2 of 5, for Inkscape.
"""
-from Base import Barcode
-import sys
+from .Base import Barcode
# 1 means thick, 0 means thin
-encoding = {
- '0' : '00110',
- '1' : '10001',
- '2' : '01001',
- '3' : '11000',
- '4' : '00101',
- '5' : '10100',
- '6' : '01100',
- '7' : '00011',
- '8' : '10010',
- '9' : '01010',
+ENCODE = {
+ '0': '00110',
+ '1': '10001',
+ '2': '01001',
+ '3': '11000',
+ '4': '00101',
+ '5': '10100',
+ '6': '01100',
+ '7': '00011',
+ '8': '10010',
+ '9': '01010',
}
-# Start and stop code are already encoded into white (0) and black(1) bars
-start_code = '1010'
-stop_code = '1101'
class Code25i(Barcode):
- # Convert a text into string binary of black and white markers
+ """Convert a text into string binary of black and white markers"""
+ # Start and stop code are already encoded into white (0) and black(1) bars
def encode(self, number):
- self.label = number
-
if not number.isdigit():
- sys.stderr.write("CODE25 can only encode numbers.\n")
- return
+ return self.error(number, "CODE25 can only encode numbers.")
- # Number of figures to encode must be even, a 0 is added to the left in case it's odd.
- if len(number) % 2 > 0 :
+ # Number of figures to encode must be even,
+ # a 0 is added to the left in case it's odd.
+ if len(number) % 2 > 0:
number = '0' + number
# Number is encoded by pairs of 2 figures
- size = len(number) / 2;
- encoded = start_code;
+ size = len(number) / 2
+ encoded = '1010'
for i in range(size):
# First in the pair is encoded in black (1), second in white (0)
- black = encoding[number[i*2]]
- white = encoding[number[i*2+1]]
+ black = ENCODE[number[i*2]]
+ white = ENCODE[number[i*2+1]]
for j in range(5):
if black[j] == '1':
encoded += '11'
@@ -69,9 +64,5 @@ class Code25i(Barcode):
encoded += '00'
else:
encoded += '0'
-
- encoded += stop_code
-
- self.inclabel = number
- return encoded;
+ return encoded + '1101'
diff --git a/share/extensions/Barcode/Code39.py b/share/extensions/Barcode/Code39.py
index ade397463..0d4d445b1 100644
--- a/share/extensions/Barcode/Code39.py
+++ b/share/extensions/Barcode/Code39.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Python barcode renderer for Code39 barcodes. Designed for use with Inkscape.
@@ -21,73 +21,70 @@ Python barcode renderer for Code39 barcodes. Designed for use with Inkscape.
from Base import Barcode
-encoding = {
- '0' : '000110100',
- '1' : '100100001',
- '2' : '001100001',
- '3' : '101100000',
- '4' : '000110001',
- '5' : '100110000',
- '6' : '001110000',
- '7' : '000100101',
- '8' : '100100100',
- '9' : '001100100',
- 'A' : '100001001',
- 'B' : '001001001',
- 'C' : '101001000',
- 'D' : '000011001',
- 'E' : '100011000',
- 'F' : '001011000',
- 'G' : '000001101',
- 'H' : '100001100',
- 'I' : '001001100',
- 'J' : '000011100',
- 'K' : '100000011',
- 'L' : '001000011',
- 'M' : '101000010',
- 'N' : '000010011',
- 'O' : '100010010',
- 'P' : '001010010',
- 'Q' : '000000111',
- 'R' : '100000110',
- 'S' : '001000110',
- 'T' : '000010110',
- 'U' : '110000001',
- 'V' : '011000001',
- 'W' : '111000000',
- 'X' : '010010001',
- 'Y' : '110010000',
- 'Z' : '011010000',
- '-' : '010000101',
- '*' : '010010100',
- '+' : '010001010',
- '$' : '010101000',
- '%' : '000101010',
- '/' : '010100010',
- '.' : '110000100',
- ' ' : '011000100',
+ENCODE = {
+ '0': '000110100',
+ '1': '100100001',
+ '2': '001100001',
+ '3': '101100000',
+ '4': '000110001',
+ '5': '100110000',
+ '6': '001110000',
+ '7': '000100101',
+ '8': '100100100',
+ '9': '001100100',
+ 'A': '100001001',
+ 'B': '001001001',
+ 'C': '101001000',
+ 'D': '000011001',
+ 'E': '100011000',
+ 'F': '001011000',
+ 'G': '000001101',
+ 'H': '100001100',
+ 'I': '001001100',
+ 'J': '000011100',
+ 'K': '100000011',
+ 'L': '001000011',
+ 'M': '101000010',
+ 'N': '000010011',
+ 'O': '100010010',
+ 'P': '001010010',
+ 'Q': '000000111',
+ 'R': '100000110',
+ 'S': '001000110',
+ 'T': '000010110',
+ 'U': '110000001',
+ 'V': '011000001',
+ 'W': '111000000',
+ 'X': '010010001',
+ 'Y': '110010000',
+ 'Z': '011010000',
+ '-': '010000101',
+ '*': '010010100',
+ '+': '010001010',
+ '$': '010101000',
+ '%': '000101010',
+ '/': '010100010',
+ '.': '110000100',
+ ' ': '011000100',
}
class Code39(Barcode):
- # Convert a text into string binary of black and white markers
+ """Convert a text into string binary of black and white markers"""
def encode(self, text):
- text = text.upper()
- self.label = text
- text = '*' + text + '*'
- result = ''
+ self.text = text.upper()
+ result = ''
# It isposible for us to encode code39
# into full ascii, but this feature is
# not enabled here
- for char in text:
- if not encoding.has_key(char):
- char = '-';
-
- result = result + encoding[char] + '0';
+ for char in '*' + self.text + '*':
+ if not ENCODE.has_key(char):
+ char = '-'
+ result = result + ENCODE[char] + '0'
# Now we need to encode the code39, best read
# the code to understand what it's up to:
- encoded = '';
- colour = '1'; # 1 = Black, 0 = White
+ encoded = ''
+ colour = '1' # 1 = Black, 0 = White
for data in result:
if data == '1':
encoded = encoded + colour + colour
@@ -95,6 +92,5 @@ class Code39(Barcode):
encoded = encoded + colour
colour = colour == '1' and '0' or '1'
- self.inclabel = text
- return encoded;
+ return encoded
diff --git a/share/extensions/Barcode/Code39Ext.py b/share/extensions/Barcode/Code39Ext.py
index b6df47de2..3edf82d2e 100644
--- a/share/extensions/Barcode/Code39Ext.py
+++ b/share/extensions/Barcode/Code39Ext.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
"""
Python barcode renderer for Code39 Extended barcodes. Designed for Inkscape.
diff --git a/share/extensions/Barcode/Code93.py b/share/extensions/Barcode/Code93.py
index 866ec6036..939a739dd 100644
--- a/share/extensions/Barcode/Code93.py
+++ b/share/extensions/Barcode/Code93.py
@@ -13,109 +13,101 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Python barcode renderer for Code93 barcodes. Designed for use with Inkscape.
"""
-from Base import Barcode
+from .Base import Barcode
-chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%'
-encode = list(chars)
-encode.append('($)')
-encode.append('(/)')
-encode.append('(+)')
-encode.append('(%)')
-encode.append('MARKER')
+PALLET = list('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%')
+PALLET.append('($)')
+PALLET.append('(/)')
+PALLET.append('(+)')
+PALLET.append('(%)')
+PALLET.append('MARKER')
-map = {}
-
-i = 0
-for char in encode:
- map[char] = i
- i = i + 1
-
-# Extended encoding maps for full ASCII Code93
-def getMap(array):
+MAP = dict((PALLET[i], i) for i in range(len(PALLET)))
+def get_map(array):
+ """Extended ENCODE maps for full ASCII Code93"""
result = {}
- y = 10
-
- for x in array:
- result[chr(x)] = encode[y]
- y = y + 1
-
- return result;
+ pos = 10
+ for char in array:
+ result[chr(char)] = PALLET[pos]
+ pos = pos + 1
+ return result
# MapA is eclectic, but B, C, D are all ASCII ranges
-mapA = getMap([27,28,29,30,31,59,60,61,62,63,91,92,93,94,95,123,124,125,126,127,0,64,96,127,127,127]) # %
-mapB = getMap(range(1, 26)) # $
-mapC = getMap(range(33, 58)) # /
-mapD = getMap(range(97, 122)) # +
-
-encoding = '100010100 101001000 101000100 101000010 100101000 100100100 100100010 101010000 100010010 100001010 110101000 110100100 110100010 110010100 110010010 110001010 101101000 101100100 101100010 100110100 100011010 101011000 101001100 101000110 100101100 100010110 110110100 110110010 110101100 110100110 110010110 110011010 101101100 101100110 100110110 100111010 100101110 111010100 111010010 111001010 101101110 101110110 110101110 100100110 111011010 111010110 100110010 101011110'.split()
+MAP_A = get_map([27, 28, 29, 30, 31, 59, 60, 61, 62, 63, 91, 92, 93, 94, 95,
+ 123, 124, 125, 126, 127, 0, 64, 96, 127, 127, 127]) # %
+MAP_B = get_map(range(1, 26)) # $
+MAP_C = get_map(range(33, 58)) # /
+MAP_D = get_map(range(97, 122)) # +
+
+ENCODE = [
+ '100010100', '101001000', '101000100', '101000010', '100101000',
+ '100100100', '100100010', '101010000', '100010010', '100001010',
+ '110101000', '110100100', '110100010', '110010100', '110010010',
+ '110001010', '101101000', '101100100', '101100010', '100110100',
+ '100011010', '101011000', '101001100', '101000110', '100101100',
+ '100010110', '110110100', '110110010', '110101100', '110100110',
+ '110010110', '110011010', '101101100', '101100110', '100110110',
+ '100111010', '100101110', '111010100', '111010010', '111001010',
+ '101101110', '101110110', '110101110', '100100110', '111011010',
+ '111010110', '100110010', '101011110', ''
+]
class Code93(Barcode):
def encode(self, text):
- # start marker
- bits = self.encode93('MARKER')
+ # start marker
+ bits = ENCODE[MAP.get('MARKER', -1)]
# Extend to ASCII charset ( return Array )
- text = self.encodeAscii(text)
+ text = self.encode_ascii(text)
# Calculate the checksums
text.append(self.checksum(text, 20)) # C
text.append(self.checksum(text, 15)) # K
- # Now convert text into the encoding bits (black and white stripes)
+ # Now convert text into the ENCODE bits (black and white stripes)
for char in text:
- bits = bits + self.encode93(char)
-
- # end marker
- bits = bits + self.encode93('MARKER')
+ bits = bits + ENCODE[MAP.get(char, -1)]
- # termination bar
- bits = bits + '1'
-
- self.inclabel = text
- return bits
+ # end marker and termination bar
+ return bits + ENCODE[MAP.get('MARKER', -1)] + '1'
def checksum(self, text, mod):
+ """Generate a code 93 checksum"""
weight = len(text) % mod
- check = 0
+ check = 0
for char in text:
- check = check + (map[char] * weight)
+ check = check + (MAP[char] * weight)
# Reset the weight is required
weight = weight - 1
if weight == 0:
weight = mod
- return encode[check % 47]
+ return PALLET[check % 47]
- # Some charicters need re-encoding into the code93 specification
- def encodeAscii(self, text):
+ # Some charicters need re-ENCODE into the code93 specification
+ def encode_ascii(self, text):
result = []
for char in text:
- if map.has_key(char):
+ if MAP.has_key(char):
result.append(char)
- elif mapA.has_key(char):
+ elif MAP_A.has_key(char):
result.append('(%)')
- result.append(mapA[char])
- elif mapB.has_key(char):
+ result.append(MAP_A[char])
+ elif MAP_B.has_key(char):
result.append('($)')
- result.append(mapB[char])
- elif mapC.has_key(char):
+ result.append(MAP_B[char])
+ elif MAP_C.has_key(char):
result.append('(/)')
- result.append(mapC[char])
- elif mapD.has_key(char):
+ result.append(MAP_C[char])
+ elif MAP_D.has_key(char):
result.append('(+)')
- result.append(mapD[char])
-
+ result.append(MAP_D[char])
return result
- def encode93(self, char):
- if map.has_key(char):
- return encoding[map[char]]
- return ''
-
diff --git a/share/extensions/Barcode/Ean13.py b/share/extensions/Barcode/Ean13.py
index 3bad5d6e5..41f4df826 100644
--- a/share/extensions/Barcode/Ean13.py
+++ b/share/extensions/Barcode/Ean13.py
@@ -15,24 +15,25 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Python barcode renderer for EAN13 barcodes. Designed for use with Inkscape.
"""
-from BaseEan import EanBarcode
+from .BaseEan import EanBarcode
class Ean13(EanBarcode):
"""Provide an Ean13 barcode generator"""
name = 'ean13'
- lengths = [ 12 ]
- checks = [ 13 ]
+ extras = {2: 'Ean2', 5: 'Ean5'}
+ checks = [13]
+ lengths = [12]
def _encode(self, n):
"""Encode an ean13 barcode"""
- self.label = self.space(n[0:1], 4, n[1:7], 5, n[7:], 7)
+ self.text = self.space(n[0:1], 4, n[1:7], 5, n[7:], 7)
return self.enclose(
- self.encode_interleaved(n[0], n[1:7]), self.encode_right(n[7:]) )
+ self.encode_interleaved(n[0], n[1:7]), self.encode_right(n[7:]))
diff --git a/share/extensions/Barcode/Ean2.py b/share/extensions/Barcode/Ean2.py
new file mode 100644
index 000000000..9aec06a27
--- /dev/null
+++ b/share/extensions/Barcode/Ean2.py
@@ -0,0 +1,38 @@
+#
+# Copyright (C) 2016 Martin Owens
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
+#
+"""
+Python barcode renderer for EAN2 barcodes. Designed for use with Inkscape.
+"""
+
+from .BaseEan import EanBarcode
+
+FAMS = ['00', '01', '10', '11']
+START = '01011'
+
+class Ean2(EanBarcode):
+ """Provide an Ean5 barcode generator"""
+ length = 2
+ name = 'ean5'
+
+ def _encode(self, number):
+ if len(number) != 2:
+ number = ([0, 0] + number)[-2:]
+ self.text = ' '.join(self.space(number))
+ family = ((number[0] * 10) + number[1]) % 4
+ return START + '01'.join(self.encode_interleaved(family, number, FAMS))
+
diff --git a/share/extensions/Barcode/Ean5.py b/share/extensions/Barcode/Ean5.py
index 1bd26a4bd..c6f8555fb 100644
--- a/share/extensions/Barcode/Ean5.py
+++ b/share/extensions/Barcode/Ean5.py
@@ -1,39 +1,38 @@
-#
+#
# Copyright (C) 2009 Aaron C Spike
# 2010 Martin Owens
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Python barcode renderer for EAN5 barcodes. Designed for use with Inkscape.
"""
-from BaseEan import EanBarcode
+from .BaseEan import EanBarcode
-FAMS = [ '11000','10100','10010','10001','01100','00110','00011','01010','01001','00101' ]
+FAMS = ['11000', '10100', '10010', '10001', '01100',
+ '00110', '00011', '01010', '01001', '00101']
START = '01011'
class Ean5(EanBarcode):
"""Provide an Ean5 barcode generator"""
- name = 'ean5'
+ name = 'ean5'
length = 5
def _encode(self, number):
- self.x += 110.0*self.scale # horiz offset so it does not overlap EAN13
- self.y -= (self.height + 5)*self.scale # move the text to the top
- self.label = ' '.join(self.space(number))
- family = sum([int(n)*int(m) for n,m in zip(number, '39393')]) % 10
+ self.text = ' '.join(self.space(number))
+ family = sum([int(n)*int(m) for n, m in zip(number, '39393')]) % 10
return START + '01'.join(self.encode_interleaved(family, number, FAMS))
diff --git a/share/extensions/Barcode/Ean8.py b/share/extensions/Barcode/Ean8.py
index 83e82814a..562952e42 100644
--- a/share/extensions/Barcode/Ean8.py
+++ b/share/extensions/Barcode/Ean8.py
@@ -13,22 +13,22 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Python barcode renderer for EAN8 barcodes. Designed for use with Inkscape.
"""
-from BaseEan import EanBarcode
+from .BaseEan import EanBarcode
class Ean8(EanBarcode):
"""Provide an EAN8 barcode generator"""
- name = 'ean8'
- lengths = [ 7 ]
- checks = [ 8 ]
+ name = 'ean8'
+ checks = [8]
+ lengths = [7]
def _encode(self, n):
"""Encode an ean8 barcode"""
- self.label = self.space(n[:4], 3, n[4:])
- return self.enclose( self.encode_left(n[:4]), self.encode_right(n[4:]) )
+ self.text = self.space(n[:4], 3, n[4:])
+ return self.enclose(self.encode_left(n[:4]), self.encode_right(n[4:]))
diff --git a/share/extensions/Barcode/Makefile.am b/share/extensions/Barcode/Makefile.am
index 7a1e889c0..08e2f58b4 100644
--- a/share/extensions/Barcode/Makefile.am
+++ b/share/extensions/Barcode/Makefile.am
@@ -12,6 +12,7 @@ barcode_DATA = \
Ean13.py \
Ean8.py \
Ean5.py \
+ Ean2.py \
__init__.py \
Rm4scc.py \
Upca.py \
diff --git a/share/extensions/Barcode/Rm4scc.py b/share/extensions/Barcode/Rm4scc.py
index 0fb154280..7c36f26ee 100644
--- a/share/extensions/Barcode/Rm4scc.py
+++ b/share/extensions/Barcode/Rm4scc.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
"""
Python barcode renderer for RM4CC barcodes. Designed for use with Inkscape.
@@ -66,10 +66,11 @@ check = ['ZUVWXY','501234','B6789A','HCDEFG','NIJKLM','TOPQRS']
(BAR_TRACK, BAR_DOWN, BAR_UP, BAR_FULL, BAR_NONE, WHITE_SPACE) = range(6)
class Rm4scc(Barcode):
+ default_height = 18
+
def encode(self, text):
result = ''
- self.height = 18
text = text.upper()
text.replace('(', '')
text.replace(')', '')
@@ -80,10 +81,8 @@ class Rm4scc(Barcode):
for char in text:
if map.has_key(char):
result = result + map[char]
-
i = i + 1
- self.inclabel = text
return result;
# given a string of data, return the check character
@@ -117,7 +116,7 @@ class Rm4scc(Barcode):
checkchar = check[total_upper][total_lower]
return checkchar
- def getStyle(self, index):
+ def get_style(self, index):
"""Royal Mail Barcodes use a completely different style"""
result = { 'width' : 2, 'write' : True, 'top' : 0 }
if index == BAR_TRACK: # Track Bar
diff --git a/share/extensions/Barcode/Upca.py b/share/extensions/Barcode/Upca.py
index d69ed11e6..32ecc0aa6 100644
--- a/share/extensions/Barcode/Upca.py
+++ b/share/extensions/Barcode/Upca.py
@@ -13,25 +13,23 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Python barcode renderer for UPCA barcodes. Designed for use with Inkscape.
"""
-from BaseEan import EanBarcode
+from .BaseEan import EanBarcode
class Upca(EanBarcode):
"""Provides a renderer for EAN12 aka UPC-A Barcodes"""
- name = 'upca'
- lengths = [ 11 ]
- checks = [ 12 ]
+ name = 'upca'
+ font_size = 10
+ lengths = [11]
+ checks = [12]
def _encode(self, n):
"""Encode for a UPC-A Barcode"""
- self.label = self.space(n[0:1], 3, n[1:6], 4, n[6:11], 3, n[11:])
+ self.text = self.space(n[0:1], 3, n[1:6], 4, n[6:11], 3, n[11:])
return self.enclose(self.encode_left(n[0:6]), self.encode_right(n[6:12]))
- def fontSize(self):
- """We need a bigger barcode"""
- return 10
diff --git a/share/extensions/Barcode/Upce.py b/share/extensions/Barcode/Upce.py
index eee2a739c..193d605a0 100644
--- a/share/extensions/Barcode/Upce.py
+++ b/share/extensions/Barcode/Upce.py
@@ -13,79 +13,75 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Python barcode renderer for UPCE barcodes. Designed for use with Inkscape.
"""
-from BaseEan import EanBarcode
-import sys
+from .BaseEan import EanBarcode
# This is almost exactly the same as the standard FAMILIES
# But flipped around and with the first 111000 instead of 000000.
-FAMS = [ '111000', '110100', '110010', '110001', '101100',
- '100110', '100011', '101010', '101001', '100101' ]
+FAMS = ['111000', '110100', '110010', '110001', '101100',
+ '100110', '100011', '101010', '101001', '100101']
class Upce(EanBarcode):
"""Generate EAN6/UPC-E barcode generator"""
- name = 'upce'
- lengths = [ 6, 11 ]
- checks = [ 7, 12 ]
+ name = 'upce'
+ font_size = 10
+ lengths = [6, 11]
+ checks = [7, 12]
+ center_bar = '020'
def _encode(self, n):
"""Generate a UPC-E Barcode"""
- self.label = self.space(['0'], 2, n[:6], 2, n[-1])
+ self.text = self.space(['0'], 2, n[:6], 2, n[-1])
code = self.encode_interleaved(n[-1], n[:6], FAMS)
- # 202(guard) + code + 020(center) + 202(guard)
- return self.enclose(code, center='020')
+ return self.enclose(code)
- def appendChecksum(self, number):
+ def append_checksum(self, number):
"""Generate a UPCE Checksum"""
if len(number) == 6:
- number = self.ConvertEtoA(number)
- result = self.getChecksum(number)
- return self.ConvertAtoE(number) + result
+ number = self.convert_e2a(number)
+ result = self.get_checksum(number)
+ return self.convert_a2e(number) + result
- def fontSize(self):
- """We need a font size of 10"""
- return 10
-
- def ConvertAtoE(self, number):
+ def convert_a2e(self, number):
"""Converting UPC-A to UPC-E, may cause errors."""
# All UPC-E Numbers use number system 0
- if number[0] != '0' or len(number)!=11:
+ if number[0] != '0' or len(number) != 11:
# If not then the code is invalid
raise ValueError("Invalid UPC Number")
# Most of the conversions deal
# with the specific code parts
- manufacturer = number[1:6]
+ maker = number[1:6]
product = number[6:11]
# There are 4 cases to convert:
- if manufacturer[2:] == '000' or manufacturer[2:] == '100' or manufacturer[2:] == '200':
+ if maker[2:] == '000' or maker[2:] == '100' or maker[2:] == '200':
# Maxium number product code digits can be encoded
- if product[:2]=='00':
- return manufacturer[:2] + product[2:] + manufacturer[2]
- elif manufacturer[3:5] == '00':
+ if product[:2] == '00':
+ return maker[:2] + product[2:] + maker[2]
+ elif maker[3:5] == '00':
# Now only 2 product code digits can be used
- if product[:3]=='000':
- return manufacturer[:3] + product[3:] + '3'
- elif manufacturer[4] == '0':
- # With even more manufacturer code we have less room for product code
- if product[:4]=='0000':
- return manufacturer[0:4] + product[4] + '4'
- elif product[:4]=='0000' and int(product[4]) > 4:
+ if product[:3] == '000':
+ return maker[:3] + product[3:] + '3'
+ elif maker[4] == '0':
+ # With even more maker code we have less room for product code
+ if product[:4] == '0000':
+ return maker[0:4] + product[4] + '4'
+ elif product[:4] == '0000' and int(product[4]) > 4:
# The last recorse is to try and squeeze it in the last 5 numbers
# so long as the product is 00005-00009 so as not to conflict with
# the 0-4 used above.
- return manufacturer + product[4]
+ return maker + product[4]
else:
# Invalid UPC-A Numbe
raise ValueError("Invalid UPC Number")
- def ConvertEtoA(self, number):
+ def convert_e2a(self, number):
"""Convert UPC-E to UPC-A by padding with zeros"""
# It's more likly to convert this without fault
# But we still must be mindful of the 4 conversions
diff --git a/share/extensions/Barcode/__init__.py b/share/extensions/Barcode/__init__.py
index e4e328ae3..fcfcfdbad 100644
--- a/share/extensions/Barcode/__init__.py
+++ b/share/extensions/Barcode/__init__.py
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
"""
Renderer for barcodes, SVG extention for Inkscape.
@@ -39,19 +39,23 @@ For supported barcodes see Barcode module directory.
import sys
-def getBarcode(code, **kwargs):
+class NoBarcode(object):
+ """Simple class for no barcode"""
+ def generate(self):
+ return None
+
+def getBarcode(code, **kw):
"""Gets a barcode from a list of available barcode formats"""
if not code:
return sys.stderr.write("No barcode format given!\n")
-
code = str(code).replace('-', '').strip()
+ mod = 'Barcode'
try:
- barcode = getattr(__import__('Barcode.'+code, fromlist=['Barcode']), code)
- return barcode(kwargs)
+ return getattr(__import__(mod+'.'+code, fromlist=[mod]), code)(kw)
except ImportError:
sys.stderr.write("Invalid type of barcode: %s\n" % code)
except AttributeError:
- raise
- sys.stderr.write("Barcode module is missing the barcode class: %s\n" % code)
+ sys.stderr.write("Barcode module is missing barcode class: %s\n" % code)
+ return NoBarcode()
diff --git a/share/extensions/addnodes.py b/share/extensions/addnodes.py
index d78ab55e7..4e57f0185 100755
--- a/share/extensions/addnodes.py
+++ b/share/extensions/addnodes.py
@@ -19,7 +19,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/bezmisc.py b/share/extensions/bezmisc.py
index 0c7ad4957..c36e8e1b4 100755
--- a/share/extensions/bezmisc.py
+++ b/share/extensions/bezmisc.py
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import math, cmath
diff --git a/share/extensions/chardataeffect.py b/share/extensions/chardataeffect.py
index a1758c890..f81de6b80 100755
--- a/share/extensions/chardataeffect.py
+++ b/share/extensions/chardataeffect.py
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import sys, optparse, inkex
diff --git a/share/extensions/color_randomize.inx b/share/extensions/color_randomize.inx
index 82691f0f4..c0c0d9ea2 100644
--- a/share/extensions/color_randomize.inx
+++ b/share/extensions/color_randomize.inx
@@ -7,12 +7,13 @@
<dependency type="executable" location="extensions">simplestyle.py</dependency>
<param name="tab" type="notebook">
<page name="Options" _gui-text="Options">
- <param name="hue" type="boolean" _gui-text="Hue">true</param>
- <param name="saturation" type="boolean" _gui-text="Saturation">true</param>
- <param name="lightness" type="boolean" _gui-text="Lightness">true</param>
+ <param name="hue_range" type="int" appearance="full" min="0" max="100" indent="0" _gui-text="Hue range (%)">100</param>
+ <param name="saturation_range" type="int" appearance="full" min="0" max="100" indent="0" _gui-text="Saturation range (%)">100</param>
+ <param name="lightness_range" type="int" appearance="full" min="0" max="100" indent="0" _gui-text="Lightness range (%)">100</param>
+ <param name="opacity_range" type="int" appearance="full" min="0" max="100" indent="0" _gui-text="Opacity range (%)">0</param>
</page>
<page name="Help" _gui-text="Help">
- <_param name="instructions" type="description" xml:space="preserve">Converts to HSL, randomizes hue and/or saturation and/or lightness and converts it back to RGB.</_param>
+ <_param name="instructions" type="description" xml:space="preserve">Randomizes hue, saturation, lightness and/or opacity (opacity randomization only for objects and groups). Change the range values to limit the distance between the original color and the randomized one.</_param>
</page>
</param>
<effect>
diff --git a/share/extensions/color_randomize.py b/share/extensions/color_randomize.py
index e939b7b6d..93abcf174 100755
--- a/share/extensions/color_randomize.py
+++ b/share/extensions/color_randomize.py
@@ -1,39 +1,84 @@
#!/usr/bin/env python
-import coloreffect,random,inkex
+
+import random
+
+import coloreffect
+import inkex
class C(coloreffect.ColorEffect):
def __init__(self):
coloreffect.ColorEffect.__init__(self)
- self.OptionParser.add_option("-x", "--hue",
- action="store", type="inkbool",
- dest="hue", default=True,
- help="randomize hue")
- self.OptionParser.add_option("-s", "--saturation",
- action="store", type="inkbool",
- dest="saturation", default=True,
- help="randomize saturation")
- self.OptionParser.add_option("-l", "--lightness",
- action="store", type="inkbool",
- dest="lightness", default=True,
- help="randomize lightness")
+ self.OptionParser.add_option("-y", "--hue_range",
+ action="store", type="int",
+ dest="hue_range", default=0,
+ help="Hue range")
+ self.OptionParser.add_option("-t", "--saturation_range",
+ action="store", type="int",
+ dest="saturation_range", default=0,
+ help="Saturation range")
+ self.OptionParser.add_option("-m", "--lightness_range",
+ action="store", type="int",
+ dest="lightness_range", default=0,
+ help="Lightness range")
+ self.OptionParser.add_option("-o", "--opacity_range",
+ action="store", type="int",
+ dest="opacity_range", default=0,
+ help="Opacity range")
self.OptionParser.add_option("--tab",
action="store", type="string",
dest="tab",
help="The selected UI-tab when OK was pressed")
+ def randomize_hsl(self, limit, current_value):
+ limit = 255.0 * limit / 100.0
+ limit /= 2
+ max = int((current_value * 255.0) + limit)
+ min = int((current_value * 255.0) - limit)
+ if max > 255:
+ min = min - (max - 255)
+ max = 255
+ if min < 0:
+ max = max - min
+ min = 0
+ return random.randrange(min, max) / 255.0
+
def colmod(self,r,g,b):
hsl = self.rgb_to_hsl(r/255.0, g/255.0, b/255.0)
- if(self.options.hue):
- hsl[0]=random.random()
- if(self.options.saturation):
- hsl[1]=random.random()
- if(self.options.lightness):
- hsl[2]=random.random()
+ if self.options.hue_range > 0:
+ hsl[0] = self.randomize_hsl(self.options.hue_range, hsl[0])
+ if self.options.saturation_range > 0:
+ hsl[1] = self.randomize_hsl(self.options.saturation_range, hsl[1])
+ if self.options.lightness_range > 0:
+ hsl[2] = self.randomize_hsl(self.options.lightness_range, hsl[2])
rgb = self.hsl_to_rgb(hsl[0], hsl[1], hsl[2])
return '%02x%02x%02x' % (rgb[0]*255, rgb[1]*255, rgb[2]*255)
-c = C()
-c.affect()
+ def opacmod(self, opacity):
+ if self.options.opacity_range > 0:
+ # maybe not necessary, but better not change things that shouldn't change
+ try:
+ opacity = float(opacity)
+ except ValueError:
+ return opacity
+
+ limit = self.options.opacity_range
+ limit /= 2
+ max = opacity*100 + limit
+ min = opacity*100 - limit
+ if max > 100:
+ min = min - (max - 100)
+ max = 100
+ if min < 0:
+ max = max - min
+ min = 0
+ ret = str(random.uniform(min,max)/100)
+ return ret
+ return opacity
+
+
+if __name__ == '__main__':
+ c = C()
+ c.affect()
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 fileencoding=utf-8 textwidth=99
diff --git a/share/extensions/coloreffect.py b/share/extensions/coloreffect.py
index 8f67c6090..d33ac41fe 100755
--- a/share/extensions/coloreffect.py
+++ b/share/extensions/coloreffect.py
@@ -16,13 +16,14 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import sys, copy, simplestyle, inkex
import random
-color_props_fill = ('fill', 'stop-color', 'flood-color', 'lighting-color')
+color_props_fill = ('fill', 'stop-color', 'flood-color', 'lighting-color')
color_props_stroke = ('stroke',)
+opacity_props = ('opacity',) #'stop-opacity', 'fill-opacity', 'stroke-opacity' don't work with clones
color_props = color_props_fill + color_props_stroke
@@ -63,13 +64,14 @@ class ColorEffect(inkex.Effect):
#
# The processing here is just something simple that should usually work,
# without trying too hard to get everything right.
- # (Won't work for the pathalogical case that someone escapes a property
+ # (Won't work for the pathological case that someone escapes a property
# name, probably does the wrong thing if colon or semicolon is used inside
# a comment or string value.)
style = node.get('style') # fixme: this will break for presentation attributes!
if style:
#inkex.debug('old style:'+style)
declarations = style.split(';')
+ opacity_in_style = False
for i,decl in enumerate(declarations):
parts = decl.split(':', 2)
if len(parts) == 2:
@@ -80,16 +82,25 @@ class ColorEffect(inkex.Effect):
new_val = self.process_prop(val)
if new_val != val:
declarations[i] = prop + ':' + new_val
+ elif prop in opacity_props:
+ opacity_in_style = True
+ val = val.strip()
+ new_val = self.process_prop(val)
+ if new_val != val:
+ declarations[i] = prop + ':' + new_val
+ if not opacity_in_style:
+ new_val = self.process_prop("1")
+ declarations.append('opacity' + ':' + new_val)
#inkex.debug('new style:'+';'.join(declarations))
node.set('style', ';'.join(declarations))
- def process_prop(self,col):
- #debug('got:'+col)
+ def process_prop(self, col):
+ #inkex.debug('got:'+col+str(type(col)))
if simplestyle.isColor(col):
c=simplestyle.parseColor(col)
- col='#'+self.colmod(c[0],c[1],c[2])
- #debug('made:'+col)
- if col.startswith('url(#'):
+ col='#'+self.colmod(c[0], c[1], c[2])
+ #inkex.debug('made:'+col)
+ elif col.startswith('url(#'):
id = col[len('url(#'):col.find(')')]
newid = '%s-%d' % (id, int(random.random() * 1000))
#inkex.debug('ID:' + id )
@@ -97,6 +108,11 @@ class ColorEffect(inkex.Effect):
for node in self.document.xpath(path, namespaces=inkex.NSS):
self.process_gradient(node, newid)
col = 'url(#%s)' % newid
+ # what remains should be opacity
+ else:
+ col = self.opacmod(col)
+
+ #inkex.debug('col:'+str(col))
return col
def process_gradient(self, node, newid):
@@ -128,6 +144,9 @@ class ColorEffect(inkex.Effect):
def colmod(self,r,g,b):
pass
+
+ def opacmod(self, opacity):
+ return opacity
def rgb_to_hsl(self,r, g, b):
rgb_max = max (max (r, g), b)
@@ -188,4 +207,5 @@ class ColorEffect(inkex.Effect):
rgb[2] = self.hue_2_rgb (v1, v2, h*6 - 2.0)
return rgb
+
# vi: set autoindent shiftwidth=2 tabstop=8 expandtab softtabstop=2 :
diff --git a/share/extensions/convert2dashes.py b/share/extensions/convert2dashes.py
index 1228b247c..3910d8e82 100755
--- a/share/extensions/convert2dashes.py
+++ b/share/extensions/convert2dashes.py
@@ -18,7 +18,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# local library
import inkex
diff --git a/share/extensions/cubicsuperpath.py b/share/extensions/cubicsuperpath.py
index 925efdb04..b505e8c4f 100755
--- a/share/extensions/cubicsuperpath.py
+++ b/share/extensions/cubicsuperpath.py
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
import simplepath
diff --git a/share/extensions/dimension.py b/share/extensions/dimension.py
index 30b674201..462a05bae 100755
--- a/share/extensions/dimension.py
+++ b/share/extensions/dimension.py
@@ -29,7 +29,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
diff --git a/share/extensions/dm2svg.py b/share/extensions/dm2svg.py
index 908fedbad..74afe6adf 100755
--- a/share/extensions/dm2svg.py
+++ b/share/extensions/dm2svg.py
@@ -18,7 +18,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import struct
diff --git a/share/extensions/dots.py b/share/extensions/dots.py
index dc533ffb6..296a56dfc 100755
--- a/share/extensions/dots.py
+++ b/share/extensions/dots.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex, simplestyle, simplepath, math
diff --git a/share/extensions/draw_from_triangle.py b/share/extensions/draw_from_triangle.py
index 42cda7035..5efabfbba 100755
--- a/share/extensions/draw_from_triangle.py
+++ b/share/extensions/draw_from_triangle.py
@@ -28,7 +28,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
import sys
diff --git a/share/extensions/dxf_input.py b/share/extensions/dxf_input.py
index acfed0921..30adb73f9 100755
--- a/share/extensions/dxf_input.py
+++ b/share/extensions/dxf_input.py
@@ -19,7 +19,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex, simplestyle, math
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py
index b7ae0ef14..0e8cb7f62 100755
--- a/share/extensions/dxf_outlines.py
+++ b/share/extensions/dxf_outlines.py
@@ -28,7 +28,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
import math
diff --git a/share/extensions/edge3d.py b/share/extensions/edge3d.py
index d2d8ead5c..86df52908 100755
--- a/share/extensions/edge3d.py
+++ b/share/extensions/edge3d.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex, simplepath, sys, copy
from math import degrees, atan2
diff --git a/share/extensions/embedimage.py b/share/extensions/embedimage.py
index bdc15bde2..136c20f98 100755
--- a/share/extensions/embedimage.py
+++ b/share/extensions/embedimage.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
import base64
diff --git a/share/extensions/extractimage.py b/share/extensions/extractimage.py
index 62dc83c87..aae7bd062 100755
--- a/share/extensions/extractimage.py
+++ b/share/extensions/extractimage.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
import base64
diff --git a/share/extensions/extrude.py b/share/extensions/extrude.py
index c91ea645e..8db6b1512 100755
--- a/share/extensions/extrude.py
+++ b/share/extensions/extrude.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# local library
import inkex
diff --git a/share/extensions/ffgeom.py b/share/extensions/ffgeom.py
index ef8799b97..a6d268239 100755
--- a/share/extensions/ffgeom.py
+++ b/share/extensions/ffgeom.py
@@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with FretFind 2-D; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
import math
try:
diff --git a/share/extensions/flatten.py b/share/extensions/flatten.py
index f5add5fc5..7b4d2a7d6 100755
--- a/share/extensions/flatten.py
+++ b/share/extensions/flatten.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex, cubicsuperpath, simplepath, cspsubdiv
diff --git a/share/extensions/foldablebox.py b/share/extensions/foldablebox.py
index 9d58974c5..772083094 100755
--- a/share/extensions/foldablebox.py
+++ b/share/extensions/foldablebox.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
__version__ = "0.2"
diff --git a/share/extensions/fractalize.py b/share/extensions/fractalize.py
index 901a8f761..c6bbe397a 100755
--- a/share/extensions/fractalize.py
+++ b/share/extensions/fractalize.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import random, math, inkex, simplepath
diff --git a/share/extensions/funcplot.py b/share/extensions/funcplot.py
index f37bf335e..c0fb3e525 100755
--- a/share/extensions/funcplot.py
+++ b/share/extensions/funcplot.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Changes:
* This program is a modified version of wavy.py by Aaron Spike.
diff --git a/share/extensions/gcodetools.py b/share/extensions/gcodetools.py
index 12f438cca..4cb5b2696 100755
--- a/share/extensions/gcodetools.py
+++ b/share/extensions/gcodetools.py
@@ -59,7 +59,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
###
diff --git a/share/extensions/generate_voronoi.py b/share/extensions/generate_voronoi.py
index 7acd1be5f..8907db493 100755
--- a/share/extensions/generate_voronoi.py
+++ b/share/extensions/generate_voronoi.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
# standard library
diff --git a/share/extensions/gimp_xcf.py b/share/extensions/gimp_xcf.py
index bdb0d1e4c..39dec8c13 100755
--- a/share/extensions/gimp_xcf.py
+++ b/share/extensions/gimp_xcf.py
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
import os
diff --git a/share/extensions/grid_cartesian.py b/share/extensions/grid_cartesian.py
index ae4c6b6b4..26270002d 100755
--- a/share/extensions/grid_cartesian.py
+++ b/share/extensions/grid_cartesian.py
@@ -19,7 +19,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/grid_isometric.py b/share/extensions/grid_isometric.py
index 6202fd9e2..d80be6c4d 100755
--- a/share/extensions/grid_isometric.py
+++ b/share/extensions/grid_isometric.py
@@ -20,7 +20,7 @@
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import inkex
diff --git a/share/extensions/grid_polar.py b/share/extensions/grid_polar.py
index 350b21195..f3d5dbf41 100755
--- a/share/extensions/grid_polar.py
+++ b/share/extensions/grid_polar.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/guides_creator.py b/share/extensions/guides_creator.py
index a8c7bb18a..e0aa6cadf 100755
--- a/share/extensions/guides_creator.py
+++ b/share/extensions/guides_creator.py
@@ -25,7 +25,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# Inspired by hello_world turorial by Blackhex and Rubikcube
diff --git a/share/extensions/handles.py b/share/extensions/handles.py
index 0cbdef44c..6987a3bb2 100755
--- a/share/extensions/handles.py
+++ b/share/extensions/handles.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex, simplepath, simplestyle
diff --git a/share/extensions/hershey.py b/share/extensions/hershey.py
index d0b27b129..471959b10 100755
--- a/share/extensions/hershey.py
+++ b/share/extensions/hershey.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
import hersheydata #data file w/ Hershey font data
import inkex
diff --git a/share/extensions/hpgl_decoder.py b/share/extensions/hpgl_decoder.py
index a54a81e81..8f3c18e42 100644
--- a/share/extensions/hpgl_decoder.py
+++ b/share/extensions/hpgl_decoder.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard libraries
diff --git a/share/extensions/hpgl_encoder.py b/share/extensions/hpgl_encoder.py
index 0e4158725..b9975215f 100644
--- a/share/extensions/hpgl_encoder.py
+++ b/share/extensions/hpgl_encoder.py
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard libraries
diff --git a/share/extensions/hpgl_input.py b/share/extensions/hpgl_input.py
index a85c32b34..8cc7edaaf 100755
--- a/share/extensions/hpgl_input.py
+++ b/share/extensions/hpgl_input.py
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard libraries
diff --git a/share/extensions/hpgl_output.py b/share/extensions/hpgl_output.py
index 78edba53b..477db40e7 100755
--- a/share/extensions/hpgl_output.py
+++ b/share/extensions/hpgl_output.py
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
diff --git a/share/extensions/image_attributes.py b/share/extensions/image_attributes.py
index ddd5a8b87..80ad62c26 100755
--- a/share/extensions/image_attributes.py
+++ b/share/extensions/image_attributes.py
@@ -21,7 +21,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# local library
diff --git a/share/extensions/ink2canvas.py b/share/extensions/ink2canvas.py
index b5c0fbb7b..f44c3e48f 100755
--- a/share/extensions/ink2canvas.py
+++ b/share/extensions/ink2canvas.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/ink2canvas/canvas.py b/share/extensions/ink2canvas/canvas.py
index 139835f0e..a88d368d3 100644
--- a/share/extensions/ink2canvas/canvas.py
+++ b/share/extensions/ink2canvas/canvas.py
@@ -13,7 +13,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/ink2canvas/svg.py b/share/extensions/ink2canvas/svg.py
index b60b2ca9f..f4dca8279 100644
--- a/share/extensions/ink2canvas/svg.py
+++ b/share/extensions/ink2canvas/svg.py
@@ -13,7 +13,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/inkex.py b/share/extensions/inkex.py
index 0fdaeea75..264ae0ff4 100755
--- a/share/extensions/inkex.py
+++ b/share/extensions/inkex.py
@@ -24,7 +24,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
import copy
import gettext
@@ -35,7 +35,7 @@ import re
import sys
from math import *
-#a dictionary of all of the xmlns prefixes in a standard inkscape doc
+# a dictionary of all of the xmlns prefixes in a standard inkscape doc
NSS = {
u'sodipodi' :u'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd',
u'cc' :u'http://creativecommons.org/ns#',
@@ -48,6 +48,7 @@ u'xlink' :u'http://www.w3.org/1999/xlink',
u'xml' :u'http://www.w3.org/XML/1998/namespace'
}
+
def localize():
domain = 'inkscape'
if sys.platform.startswith('win'):
@@ -55,33 +56,35 @@ def localize():
current_locale, encoding = locale.getdefaultlocale()
os.environ['LANG'] = current_locale
try:
- localdir = os.environ['INKSCAPE_LOCALEDIR'];
+ localdir = os.environ['INKSCAPE_LOCALEDIR']
trans = gettext.translation(domain, localdir, [current_locale], fallback=True)
except KeyError:
trans = gettext.translation(domain, fallback=True)
elif sys.platform.startswith('darwin'):
try:
- localdir = os.environ['INKSCAPE_LOCALEDIR'];
+ localdir = os.environ['INKSCAPE_LOCALEDIR']
trans = gettext.translation(domain, localdir, fallback=True)
except KeyError:
try:
- localdir = os.environ['PACKAGE_LOCALE_DIR'];
+ localdir = os.environ['PACKAGE_LOCALE_DIR']
trans = gettext.translation(domain, localdir, fallback=True)
except KeyError:
trans = gettext.translation(domain, fallback=True)
else:
try:
- localdir = os.environ['PACKAGE_LOCALE_DIR'];
+ localdir = os.environ['PACKAGE_LOCALE_DIR']
trans = gettext.translation(domain, localdir, fallback=True)
except KeyError:
trans = gettext.translation(domain, fallback=True)
#sys.stderr.write(str(localdir) + "\n")
trans.install()
+
def debug(what):
sys.stderr.write(str(what) + "\n")
return what
+
def errormsg(msg):
"""Intended for end-user-visible error messages.
@@ -97,25 +100,27 @@ def errormsg(msg):
inkex.errormsg(_("This extension requires two selected paths."))
"""
if isinstance(msg, unicode):
- sys.stderr.write(msg.encode("UTF-8") + "\n")
+ sys.stderr.write(msg.encode("utf-8") + "\n")
else:
- sys.stderr.write((unicode(msg, "utf-8", errors='replace') + "\n").encode("UTF-8"))
+ sys.stderr.write((unicode(msg, "utf-8", errors='replace') + "\n").encode("utf-8"))
+
def are_near_relative(a, b, eps):
- if (a-b <= a*eps) and (a-b >= -a*eps):
- return True
- else:
- return False
+ return (a-b <= a*eps) and (a-b >= -a*eps)
# third party library
try:
from lxml import etree
-except Exception, e:
+except ImportError as e:
localize()
- errormsg(_("The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension. Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, or install it through your package manager by a command like: sudo apt-get install python-lxml\n\nTechnical details:\n%s" % (e,)))
+ errormsg(_("The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension."
+ "Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, "
+ "or install it through your package manager by a command like: sudo apt-get install "
+ "python-lxml\n\nTechnical details:\n%s" % (e, )))
sys.exit()
-
+
+
def check_inkbool(option, opt, value):
if str(value).capitalize() == 'True':
return True
@@ -124,37 +129,45 @@ def check_inkbool(option, opt, value):
else:
raise optparse.OptionValueError("option %s: invalid inkbool value: %s" % (opt, value))
+
def addNS(tag, ns=None):
val = tag
- if ns!=None and len(ns)>0 and NSS.has_key(ns) and len(tag)>0 and tag[0]!='{':
+ if ns is not None and len(ns) > 0 and ns in NSS and len(tag) > 0 and tag[0] != '{':
val = "{%s}%s" % (NSS[ns], tag)
return val
+
class InkOption(optparse.Option):
TYPES = optparse.Option.TYPES + ("inkbool",)
TYPE_CHECKER = copy.copy(optparse.Option.TYPE_CHECKER)
TYPE_CHECKER["inkbool"] = check_inkbool
+
class Effect:
"""A class for creating Inkscape SVG Effects"""
def __init__(self, *args, **kwargs):
- self.document=None
- self.original_document=None
- self.ctx=None
- self.selected={}
- self.doc_ids={}
- self.options=None
- self.args=None
- self.OptionParser = optparse.OptionParser(usage="usage: %prog [options] SVGfile",option_class=InkOption)
+ self.document = None
+ self.original_document = None
+ self.ctx = None
+ self.selected = {}
+ self.doc_ids = {}
+ self.options = None
+ self.args = None
+ self.OptionParser = optparse.OptionParser(usage="usage: %prog [options] SVGfile",
+ option_class=InkOption)
self.OptionParser.add_option("--id",
action="append", type="string", dest="ids", default=[],
help="id attribute of object to manipulate")
self.OptionParser.add_option("--selected-nodes",
action="append", type="string", dest="selected_nodes", default=[],
- help="id:subpath:position of selected nodes, if any")#TODO write a parser for this
+ help="id:subpath:position of selected nodes, if any")
+ # TODO write a parser for this
def effect(self):
+ """Apply some effects on the document. Extensions subclassing Effect
+ must override this function and define the transformations
+ in it."""
pass
def getoptions(self,args=sys.argv[1:]):
@@ -165,19 +178,19 @@ class Effect:
"""Parse document in specified file or on stdin"""
# First try to open the file from the function argument
- if filename != None:
+ if filename is not None:
try:
stream = open(filename, 'r')
- except Exception:
+ except IOError:
errormsg(_("Unable to open specified file: %s") % filename)
sys.exit()
# If it wasn't specified, try to open the file specified as
# an object member
- elif self.svg_file != None:
+ elif self.svg_file is not None:
try:
stream = open(self.svg_file, 'r')
- except Exception:
+ except IOError:
errormsg(_("Unable to open object member file: %s") % self.svg_file)
sys.exit()
@@ -195,7 +208,7 @@ class Effect:
def getposinlayer(self):
#defaults
self.current_layer = self.document.getroot()
- self.view_center = (0.0,0.0)
+ self.view_center = (0.0, 0.0)
layerattr = self.document.xpath('//sodipodi:namedview/@inkscape:current-layer', namespaces=NSS)
if layerattr:
@@ -207,11 +220,12 @@ class Effect:
xattr = self.document.xpath('//sodipodi:namedview/@inkscape:cx', namespaces=NSS)
yattr = self.document.xpath('//sodipodi:namedview/@inkscape:cy', namespaces=NSS)
if xattr and yattr:
- x = self.unittouu( xattr[0] + 'px' )
- y = self.unittouu( yattr[0] + 'px')
+ x = self.unittouu(xattr[0] + 'px')
+ y = self.unittouu(yattr[0] + 'px')
doc_height = self.unittouu(self.getDocumentHeight())
if x and y:
- self.view_center = (float(x), doc_height - float(y)) # FIXME: y-coordinate flip, eliminate it when it's gone in Inkscape
+ self.view_center = (float(x), doc_height - float(y))
+ # FIXME: y-coordinate flip, eliminate it when it's gone in Inkscape
def getselected(self):
"""Collect selected nodes"""
@@ -224,16 +238,14 @@ class Effect:
path = '//*[@id="%s"]' % id
el_list = self.document.xpath(path, namespaces=NSS)
if el_list:
- return el_list[0]
+ return el_list[0]
else:
- return None
+ return None
def getParentNode(self, node):
for parent in self.document.getiterator():
if node in parent.getchildren():
return parent
- break
-
def getdocids(self):
docIdNodes = self.document.xpath('//@id', namespaces=NSS)
@@ -250,7 +262,7 @@ class Effect:
}
guide = etree.SubElement(
self.getNamedView(),
- addNS('guide','sodipodi'), atts )
+ addNS('guide','sodipodi'), atts)
return guide
def output(self):
@@ -269,9 +281,10 @@ class Effect:
self.getselected()
self.getdocids()
self.effect()
- if output: self.output()
+ if output:
+ self.output()
- def uniqueId(self, old_id, make_new_id = True):
+ def uniqueId(self, old_id, make_new_id=True):
new_id = old_id
if make_new_id:
while new_id in self.doc_ids:
@@ -287,9 +300,9 @@ class Effect:
retval = None
return retval
- #a dictionary of unit to user unit conversion factors
- __uuconv = {'in':96.0, 'pt':1.33333333333, 'px':1.0, 'mm':3.77952755913, 'cm':37.7952755913,
- 'm':3779.52755913, 'km':3779527.55913, 'pc':16.0, 'yd':3456.0 , 'ft':1152.0}
+ # a dictionary of unit to user unit conversion factors
+ __uuconv = {'in': 96.0, 'pt': 1.33333333333, 'px': 1.0, 'mm': 3.77952755913, 'cm': 37.7952755913,
+ 'm': 3779.52755913, 'km': 3779527.55913, 'pc': 16.0, 'yd': 3456.0, 'ft': 1152.0}
# Fault tolerance for lazily defined SVG
def getDocumentWidth(self):
@@ -305,6 +318,10 @@ class Effect:
# Fault tolerance for lazily defined SVG
def getDocumentHeight(self):
+ """Returns a string corresponding to the height of the document, as
+ defined in the SVG file. If it is not defined, returns the height
+ as defined by the viewBox attribute. If viewBox is not defined,
+ returns the string '0'."""
height = self.document.getroot().get('height')
if height:
return height
@@ -315,12 +332,13 @@ class Effect:
else:
return '0'
- # Function returns the unit used for the values in SVG.
- # For lack of an attribute in SVG that explicitly defines what units are used for SVG coordinates,
- # try to calculate the unit from the SVG width and SVG viewbox.
- # Defaults to 'px' units.
def getDocumentUnit(self):
- svgunit = 'px' #default to pixels
+ """Returns the unit used for in the SVG document.
+ In the case the SVG document lacks an attribute that explicitly
+ defines what units are used for SVG coordinates, it tries to calculate
+ the unit from the SVG width and viewBox attributes.
+ Defaults to 'px' units."""
+ svgunit = 'px' # default to pixels
svgwidth = self.getDocumentWidth()
viewboxstr = self.document.getroot().get('viewBox')
@@ -331,9 +349,9 @@ class Effect:
p = param.match(svgwidth)
u = unitmatch.search(svgwidth)
- width = 100 #default
- viewboxwidth = 100 #default
- svgwidthunit = 'px' #default assume 'px' unit
+ width = 100 # default
+ viewboxwidth = 100 # default
+ svgwidthunit = 'px' # default assume 'px' unit
if p:
width = float(p.string[p.start():p.end()])
else:
@@ -347,23 +365,22 @@ class Effect:
viewboxnumbers.append(float(t))
except ValueError:
pass
- if len(viewboxnumbers) == 4: #check for correct number of numbers
+ if len(viewboxnumbers) == 4: # check for correct number of numbers
viewboxwidth = viewboxnumbers[2]
svgunitfactor = self.__uuconv[svgwidthunit] * width / viewboxwidth
# try to find the svgunitfactor in the list of units known. If we don't find something, ...
- eps = 0.01 #allow 1% error in factor
+ eps = 0.01 # allow 1% error in factor
for key in self.__uuconv:
if are_near_relative(self.__uuconv[key], svgunitfactor, eps):
- #found match!
- svgunit = key;
+ # found match!
+ svgunit = key
return svgunit
-
def unittouu(self, string):
- '''Returns userunits given a string representation of units in another system'''
+ """Returns userunits given a string representation of units in another system"""
unit = re.compile('(%s)$' % '|'.join(self.__uuconv.keys()))
param = re.compile(r'(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)')
@@ -378,7 +395,7 @@ class Effect:
return retval * (self.__uuconv[u.string[u.start():u.end()]] / self.__uuconv[self.getDocumentUnit()])
except KeyError:
pass
- else: # default assume 'px' unit
+ else: # default assume 'px' unit
return retval / self.__uuconv[self.getDocumentUnit()]
return retval
@@ -387,7 +404,7 @@ class Effect:
return val / (self.__uuconv[unit] / self.__uuconv[self.getDocumentUnit()])
def addDocumentUnit(self, value):
- ''' Add document unit when no unit is specified in the string '''
+ """Add document unit when no unit is specified in the string """
try:
float(value)
return value + self.getDocumentUnit()
diff --git a/share/extensions/inkwebeffect.py b/share/extensions/inkwebeffect.py
index 994f74dea..4e29892de 100755
--- a/share/extensions/inkwebeffect.py
+++ b/share/extensions/inkwebeffect.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex, sys, os, re
diff --git a/share/extensions/interp.py b/share/extensions/interp.py
index 093a98fda..9dbb996e4 100755
--- a/share/extensions/interp.py
+++ b/share/extensions/interp.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex, cubicsuperpath, simplestyle, copy, math, bezmisc, simpletransform, pathmodifier
diff --git a/share/extensions/interp_att_g.py b/share/extensions/interp_att_g.py
index 168e7ffb0..2ae46b46d 100755
--- a/share/extensions/interp_att_g.py
+++ b/share/extensions/interp_att_g.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
import math
diff --git a/share/extensions/layers2svgfont.py b/share/extensions/layers2svgfont.py
index 379e8e34c..e449ae380 100755
--- a/share/extensions/layers2svgfont.py
+++ b/share/extensions/layers2svgfont.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/layout_nup.py b/share/extensions/layout_nup.py
index 266a3950d..022aa0d3f 100755
--- a/share/extensions/layout_nup.py
+++ b/share/extensions/layout_nup.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
import sys
diff --git a/share/extensions/lindenmayer.py b/share/extensions/lindenmayer.py
index eb0d84328..8e1c4ac22 100755
--- a/share/extensions/lindenmayer.py
+++ b/share/extensions/lindenmayer.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex, simplestyle, pturtle, random
from simpletransform import computePointInNode
diff --git a/share/extensions/lorem_ipsum.py b/share/extensions/lorem_ipsum.py
index 20a2fdd18..efb2361ea 100755
--- a/share/extensions/lorem_ipsum.py
+++ b/share/extensions/lorem_ipsum.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
'''
Example filltext sentences generated over at http://lipsum.com/
diff --git a/share/extensions/markers_strokepaint.py b/share/extensions/markers_strokepaint.py
index d92716939..76284b234 100755
--- a/share/extensions/markers_strokepaint.py
+++ b/share/extensions/markers_strokepaint.py
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
import random
diff --git a/share/extensions/measure.py b/share/extensions/measure.py
index 9fc632c2a..fe981e39e 100755
--- a/share/extensions/measure.py
+++ b/share/extensions/measure.py
@@ -23,7 +23,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
TODO:
* should use the standard attributes for text
diff --git a/share/extensions/merge_styles.py b/share/extensions/merge_styles.py
index f028bf4ce..cdd7b5ed5 100755
--- a/share/extensions/merge_styles.py
+++ b/share/extensions/merge_styles.py
@@ -14,7 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
"""
Merges styles into class based styles and removes.
diff --git a/share/extensions/motion.py b/share/extensions/motion.py
index 9bf31e008..3af80d5c1 100755
--- a/share/extensions/motion.py
+++ b/share/extensions/motion.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import math, inkex, simplestyle, simplepath, bezmisc
diff --git a/share/extensions/new_glyph_layer.py b/share/extensions/new_glyph_layer.py
index cb7dba854..d6622cc62 100755
--- a/share/extensions/new_glyph_layer.py
+++ b/share/extensions/new_glyph_layer.py
@@ -14,11 +14,13 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
import sys
+import locale
+
class NewGlyphLayer(inkex.Effect):
def __init__(self):
@@ -27,10 +29,13 @@ class NewGlyphLayer(inkex.Effect):
action="store", type="string",
dest="unicodechars", default='',
help="Unicode chars")
+ self.encoding = sys.stdin.encoding
+ if self.encoding == 'cp0' or self.encoding is None:
+ self.encoding = locale.getpreferredencoding()
def effect(self):
# Get all the options
- unicode_chars = self.options.unicodechars
+ unicode_chars = self.options.unicodechars.decode(self.encoding)
#TODO: remove duplicate chars
@@ -40,7 +45,7 @@ class NewGlyphLayer(inkex.Effect):
for char in unicode_chars:
# Create a new layer.
layer = inkex.etree.SubElement(svg, 'g')
- layer.set(inkex.addNS('label', 'inkscape'), 'GlyphLayer-'+char)
+ layer.set(inkex.addNS('label', 'inkscape'), u'GlyphLayer-'+char)
layer.set(inkex.addNS('groupmode', 'inkscape'), 'layer')
layer.set('style', 'display:none') #initially not visible
diff --git a/share/extensions/next_glyph_layer.py b/share/extensions/next_glyph_layer.py
index f8a43aff5..5f152c71e 100755
--- a/share/extensions/next_glyph_layer.py
+++ b/share/extensions/next_glyph_layer.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/nicechart.inx b/share/extensions/nicechart.inx
new file mode 100644
index 000000000..0ebcd8fca
--- /dev/null
+++ b/share/extensions/nicechart.inx
@@ -0,0 +1,103 @@
+<!--
+ nicechart.inx
+
+ Copyright 2011-2016
+
+ Christoph Sterz
+ Florian Weber
+ Maren Hachmann
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+-->
+
+<inkscape-extension>
+ <_name>NiceCharts</_name>
+ <id>org.inkscape.filter.nicechart</id>
+ <dependency type="executable" location="extensions">nicechart.py</dependency>
+ <dependency type="executable" location="extensions">inkex.py</dependency>
+ <param name="input_sections" type="notebook">
+ <page name="data_settings" _gui-text="Data">
+ <param name="input_type" type="notebook">
+ <page name="file" _gui-text="Data from file">
+ <_param name="desc" type="description">Enter the full path to a CSV file:</_param>
+ <param name="filename" type="string" _gui-text="File:"></param>
+ <param name="delimiter" type="string" _gui-text="Delimiter:">;</param>
+ <param name="col_key" type="int" _gui-text="Column that contains the keys:" min="0" max="10000">0</param>
+ <param name="col_val" type="int" _gui-text="Column that contains the values:" min="0" max="10000">1</param>
+ <param name="encoding" type="string" _gui-text="File encoding (e.g. utf-8):">utf-8</param>
+ <param name="headings" type="boolean" _gui-text="First line contains headings">false</param>
+ </page>
+ <page name="direct_input" _gui-text="Direct input">
+ <_param name="desc" type="description">Type in comma separated values:</_param>
+ <_param name="desc" type="description">(format like this: apples:3,bananas:5)</_param>
+ <param name="what" type="string" _gui-text="Data:">apples:3,bananas:5,oranges:10,pears:4</param>
+ </page>
+ </param>
+ </page>
+ <page name="description_settings" _gui-text="Labels">
+ <param type="string" name="font" _gui-text="Font:">sans-serif</param>
+ <param type="int" name="font-size" _gui-text="Font size:" min="0" max="10000">10</param>
+ <param type="string" name="font-color" _gui-text="Font color:">#000000</param>
+ </page>
+ <page name="chart_settings" _gui-text="Charts">
+ <param type="boolean" name="rotate" _gui-text="Draw horizontally">false</param>
+ <param name="bar-height" type="int" _gui-text="Bar length:" min="0" max="100000">100</param>
+ <param name="bar-width" type="int" _gui-text="Bar width:" min="0" max="100000">10</param>
+ <param name="pie-radius" type="int" _gui-text="Pie radius:" min="0" max="100000">100</param>
+ <param name="bar-offset" type="int" _gui-text="Bar offset:" min="0" max="100000">5</param>
+ <param name="stroke-width" type="float" min="0.1" max="100000.0" precision="2" _gui-text="Stroke width:">1</param>
+ <param name="text-offset" type="int" _gui-text="Offset between chart and labels:" min="0" max="100000">5</param>
+ <param name="heading-offset" type="int" _gui-text="Offset between chart and chart title:" min="-100000" max="100000">50</param>
+ <param name="segment-overlap" type="boolean" _gui-text="Work around aliasing effects (creates overlapping segments)">false</param>
+
+ <param name="colors" type="enum" _gui-text="Color scheme:">
+ <_item value="default">Default</_item>
+ <_item value="blue">Blue</_item>
+ <_item value="gray">Gray</_item>
+ <_item value="contrast">Contrast</_item>
+ <_item value="sap">SAP</_item>
+ </param>
+
+ <param type="string" name="colors_override" _gui-text="Custom colors:"></param>
+
+ <param type="boolean" name="reverse_colors" _gui-text="Reverse color scheme">false</param>
+ <param type="boolean" name="blur" _gui-text="Drop shadow">false</param>
+ </page>
+ <page name="value_settings" _gui-text="Values">
+ <param type="boolean" name="show_values" _gui-text="Show values">false</param>
+<!-- <param type="string" name="font" _gui-text="Font:">sans-serif</param>
+ <param type="int" name="font-size" _gui-text="Font size:" min="0" max="10000">10</param>
+ <param type="description" name="desc">Font color:</param>
+ <param type="string" name="font-color" _gui-text="Font color:">#000000</param>
+-->
+ </page>
+ </param>
+ <param name="type" type="enum" _gui-text="Chart type:">
+ <_item value="bar">Bar chart</_item>
+ <_item value="pie">Pie chart</_item>
+ <_item value="pie_abs">Pie chart (percentage)</_item>
+ <_item value="stbar">Stacked bar chart</_item>
+ </param>
+ <effect>
+ <object-type>all</object-type>
+ <effects-menu>
+ <submenu _name="Render"/>
+ </effects-menu>
+ </effect>
+ <script>
+ <command reldir="extensions" interpreter="python">nicechart.py</command>
+ </script>
+</inkscape-extension>
diff --git a/share/extensions/nicechart.py b/share/extensions/nicechart.py
new file mode 100755
index 000000000..d4a819ccc
--- /dev/null
+++ b/share/extensions/nicechart.py
@@ -0,0 +1,718 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# nicechart.py
+#
+# Copyright 2011-2016
+#
+# Christoph Sterz
+# Florian Weber
+# Maren Hachmann
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+
+# TODO / Ideas:
+# allow negative values for bar charts
+# show values for stacked bar charts
+# don't create a new layer for each chart, but a normal group
+# correct bar height for stacked bars (it's only half as high as it should be, double)
+# adjust position of heading
+# use aliasing workaround for stacked bars (e.g. let the rectangles overlap)
+
+# Example CSV file contents:
+'''
+Month;1978;1979;1980;1981
+January;2;1,3;0.1;2.3
+February;6.5;2.4;1.2;6.1
+March;7.4;6.7;7.9;4.7
+April;7.7;6.4;8.2;8.9
+May;10.9;11.7;18.7;11.1
+June;12.6;14.2;14.7;14.7
+July;16.5;15.5;17.5;15.1
+August;15.9;15.4;14.6;16.6
+September;14;14.5;13.2;15.3
+October;11.9;13.9;11.5;9.2
+November;6.7;8.5;7;6.6
+December;6.4;2.2;6.3;3.5
+'''
+# The extension creates one chart for a single value column in one go,
+# e.g. chart all temperatures for all months of the year 1978 into one chart.
+# (for this, select column 0 for labels and column 1 for values).
+# "1978" etc. can be used as heading (Need not be numeric. If not used delete the heading line.)
+# Month names can be used as labels
+# Values can be shown, in addition to labels (doesn't work with stacked bar charts)
+# Values can contain commas as decimal separator, as long as delimiter isn't comma
+# Negative values are not yet supported.
+
+
+import re
+import sys
+import math
+import inkex
+
+from simplestyle import *
+
+#www.sapdesignguild.org/goodies/diagram_guidelines/color_palettes.html#mss
+COLOUR_TABLE = {
+ "red": ["#460101", "#980101", "#d40000", "#f44800", "#fb8b00", "#eec73e", "#d9bb7a", "#fdd99b"],
+ "blue": ["#000442", "#0F1781", "#252FB7", "#3A45E1", "#656DDE", "#8A91EC"],
+ "gray": ["#222222", "#444444", "#666666", "#888888", "#aaaaaa", "#cccccc", "#eeeeee"],
+ "contrast": ["#0000FF", "#FF0000", "#00FF00", "#CF9100", "#FF00FF", "#00FFFF"],
+ "sap": ["#f8d753", "#5c9746", "#3e75a7", "#7a653e", "#e1662a", "#74796f", "#c4384f",
+ "#fff8a3", "#a9cc8f", "#b2c8d9", "#bea37a", "#f3aa79", "#b5b5a9", "#e6a5a5"]
+}
+
+def get_color_scheme(name="default"):
+ return COLOUR_TABLE.get(name.lower(), COLOUR_TABLE['red'])
+
+
+class NiceChart(inkex.Effect):
+ """
+ Inkscape extension that can draw pie charts and bar charts
+ (stacked, single, horizontally or vertically)
+ with optional drop shadow, from a csv file or from pasted text
+ """
+
+ def __init__(self):
+ """
+ Constructor.
+ Defines the "--what" option of a script.
+ """
+ # Call the base class constructor.
+ inkex.Effect.__init__(self)
+
+ # Define string option "--what" with "-w" shortcut and default chart values.
+ self.OptionParser.add_option('-w', '--what', action='store',
+ type='string', dest='what', default='22,11,67',
+ help='Chart Values')
+
+ # Define string option "--type" with "-t" shortcut.
+ self.OptionParser.add_option("-t", "--type", action="store",
+ type="string", dest="type", default='',
+ help="Chart Type")
+
+ # Define bool option "--blur" with "-b" shortcut.
+ self.OptionParser.add_option("-b", "--blur", action="store",
+ type="inkbool", dest="blur", default='True',
+ help="Blur Type")
+
+ # Define string option "--file" with "-f" shortcut.
+ self.OptionParser.add_option("-f", "--filename", action="store",
+ type="string", dest="filename", default='',
+ help="Name of File")
+
+ # Define string option "--input_type" with "-i" shortcut.
+ self.OptionParser.add_option("-i", "--input_type", action="store",
+ type="string", dest="input_type", default='file',
+ help="Chart Type")
+
+ # Define string option "--delimiter" with "-d" shortcut.
+ self.OptionParser.add_option("-d", "--delimiter", action="store",
+ type="string", dest="csv_delimiter", default=';',
+ help="delimiter")
+
+ # Define string option "--colors" with "-c" shortcut.
+ self.OptionParser.add_option("-c", "--colors", action="store",
+ type="string", dest="colors", default='default',
+ help="color-scheme")
+
+ # Define string option "--colors_override"
+ self.OptionParser.add_option("", "--colors_override", action="store",
+ type="string", dest="colors_override", default='',
+ help="color-scheme-override")
+
+
+ self.OptionParser.add_option("", "--reverse_colors", action="store",
+ type="inkbool", dest="reverse_colors", default='False',
+ help="reverse color-scheme")
+
+ self.OptionParser.add_option("-k", "--col_key", action="store",
+ type="int", dest="col_key", default='0',
+ help="column that contains the keys")
+
+
+ self.OptionParser.add_option("-v", "--col_val", action="store",
+ type="int", dest="col_val", default='1',
+ help="column that contains the values")
+
+ self.OptionParser.add_option("", "--encoding", action="store",
+ type="string", dest="encoding", default='utf-8',
+ help="encoding of the CSV file, e.g. utf-8")
+
+ self.OptionParser.add_option("", "--headings", action="store",
+ type="inkbool", dest="headings", default='False',
+ help="the first line of the CSV file consists of headings for the columns")
+
+ self.OptionParser.add_option("-r", "--rotate", action="store",
+ type="inkbool", dest="rotate", default='False',
+ help="Draw barchart horizontally")
+
+ self.OptionParser.add_option("-W", "--bar-width", action="store",
+ type="int", dest="bar_width", default='10',
+ help="width of bars")
+
+ self.OptionParser.add_option("-p", "--pie-radius", action="store",
+ type="int", dest="pie_radius", default='100',
+ help="radius of pie-charts")
+
+ self.OptionParser.add_option("-H", "--bar-height", action="store",
+ type="int", dest="bar_height", default='100',
+ help="height of bars")
+
+ self.OptionParser.add_option("-O", "--bar-offset", action="store",
+ type="int", dest="bar_offset", default='5',
+ help="distance between bars")
+
+ self.OptionParser.add_option("", "--stroke-width", action="store",
+ type="float", dest="stroke_width", default='1')
+
+ self.OptionParser.add_option("-o", "--text-offset", action="store",
+ type="int", dest="text_offset", default='5',
+ help="distance between bar and descriptions")
+
+ self.OptionParser.add_option("", "--heading-offset", action="store",
+ type="int", dest="heading_offset", default='50',
+ help="distance between chart and chart title")
+
+ self.OptionParser.add_option("", "--segment-overlap", action="store",
+ type="inkbool", dest="segment_overlap", default='False',
+ help="work around aliasing effects by letting pie chart segments overlap")
+
+ self.OptionParser.add_option("-F", "--font", action="store",
+ type="string", dest="font", default='sans-serif',
+ help="font of description")
+
+ self.OptionParser.add_option("-S", "--font-size", action="store",
+ type="int", dest="font_size", default='10',
+ help="font size of description")
+
+ self.OptionParser.add_option("-C", "--font-color", action="store",
+ type="string", dest="font_color", default='black',
+ help="font color of description")
+ #Dummy:
+ self.OptionParser.add_option("","--input_sections")
+
+ self.OptionParser.add_option("-V", "--show_values", action="store",
+ type="inkbool", dest="show_values", default='False',
+ help="Show values in chart")
+
+ def effect(self):
+ """
+ Effect behaviour.
+ Overrides base class' method and inserts a nice looking chart into SVG document.
+ """
+ # Get script's "--what" option value and process the data type --- i concess the if term is a little bit of magic
+ what = self.options.what
+ keys = []
+ values = []
+ orig_values = []
+ keys_present = True
+ pie_abs = False
+ cnt = 0
+ csv_file_name = self.options.filename
+ csv_delimiter = self.options.csv_delimiter
+ input_type = self.options.input_type
+ col_key = self.options.col_key
+ col_val = self.options.col_val
+ show_values = self.options.show_values
+ encoding = self.options.encoding.strip() or 'utf-8'
+ headings = self.options.headings
+ heading_offset = self.options.heading_offset
+
+ if input_type == "\"file\"":
+ csv_file = open(csv_file_name, "r")
+
+ for linenum, line in enumerate(csv_file):
+ value = line.decode(encoding).split(csv_delimiter)
+ #make sure that there is at least one value (someone may want to use it as description)
+ if len(value) >= 1:
+ # allow to parse headings as strings
+ if linenum == 0 and headings:
+ heading = value[col_val]
+ else:
+ keys.append(value[col_key])
+ # replace comma decimal separator from file by colon,
+ # to avoid file editing for people whose programs output
+ # values with comma
+ values.append(float(value[col_val].replace(",",".")))
+ csv_file.close()
+
+ elif input_type == "\"direct_input\"":
+ what = re.findall("([A-Z|a-z|0-9]+:[0-9]+\.?[0-9]*)", what)
+ for value in what:
+ value = value.split(":")
+ keys.append(value[0])
+ values.append(float(value[1]))
+
+ # warn about negative values (not yet supported)
+ for value in values:
+ if value < 0:
+ inkex.errormsg("Negative values are currently not supported!")
+ return
+
+ # Get script's "--type" option value.
+ charttype = self.options.type
+
+ if charttype == "pie_abs":
+ pie_abs = True
+ charttype = "pie"
+
+ # Get access to main SVG document element and get its dimensions.
+ svg = self.document.getroot()
+
+ # Get the page attibutes:
+ width = self.getUnittouu(svg.get('width'))
+ height = self.getUnittouu(svg.attrib['height'])
+
+ # Create a new layer.
+ layer = inkex.etree.SubElement(svg, 'g')
+ layer.set(inkex.addNS('label', 'inkscape'), 'Chart-Layer: %s' % (what))
+ layer.set(inkex.addNS('groupmode', 'inkscape'), 'layer')
+
+ # Check if a drop shadow should be drawn:
+ draw_blur = self.options.blur
+
+ if draw_blur:
+ # Get defs of Document
+ defs = self.xpathSingle('/svg:svg//svg:defs')
+ if defs == None:
+ defs = inkex.etree.SubElement(self.document.getroot(), inkex.addNS('defs', 'svg'))
+
+ # Create new Filter
+ filt = inkex.etree.SubElement(defs,inkex.addNS('filter', 'svg'))
+ filtId = self.uniqueId('filter')
+ self.filtId = 'filter:url(#%s);' % filtId
+ for k, v in [('id', filtId), ('height', "3"),
+ ('width', "3"),
+ ('x', '-0.5'), ('y', '-0.5')]:
+ filt.set(k, v)
+
+ # Append Gaussian Blur to that Filter
+ fe = inkex.etree.SubElement(filt, inkex.addNS('feGaussianBlur', 'svg'))
+ fe.set('stdDeviation', "1.1")
+
+ # Set Default Colors
+ self.options.colors_override.strip()
+ if len(self.options.colors_override) > 0:
+ colors = self.options.colors_override
+ else:
+ colors = self.options.colors
+
+ if colors[0].isalpha():
+ colors = get_color_scheme(colors)
+ else:
+ colors = re.findall("(#[0-9a-fA-F]{6})", colors)
+ #to be sure we create a fallback:
+ if len(colors) == 0:
+ colors = get_color_scheme()
+
+ color_count = len(colors)
+
+ if self.options.reverse_colors:
+ colors.reverse()
+
+ # Those values should be self-explanatory:
+ bar_height = self.options.bar_height
+ bar_width = self.options.bar_width
+ bar_offset = self.options.bar_offset
+ # offset of the description in stacked-bar-charts:
+ # stacked_bar_text_offset=self.options.stacked_bar_text_offset
+ text_offset = self.options.text_offset
+ # prevents ugly aliasing effects between pie chart segments by overlapping
+ segment_overlap = self.options.segment_overlap
+
+ # get font
+ font = self.options.font
+ font_size = self.options.font_size
+ font_color = self.options.font_color
+
+ # get rotation
+ rotate = self.options.rotate
+
+ pie_radius = self.options.pie_radius
+ stroke_width = self.options.stroke_width
+
+ if charttype == "bar":
+ #########
+ ###BAR###
+ #########
+
+ # iterate all values, use offset to draw the bars in different places
+ offset = 0
+ color = 0
+
+ # Normalize the bars to the largest value
+ try:
+ value_max = max(values)
+ except ValueError:
+ value_max = 0.0
+
+ for x in range(len(values)):
+ orig_values.append(values[x])
+ values[x] = (values[x]/value_max) * bar_height
+
+ # Draw Single bars with their shadows
+ for value in values:
+
+ # draw drop shadow, if necessary
+ if draw_blur:
+ # Create shadow element
+ shadow = inkex.etree.Element(inkex.addNS("rect", "svg"))
+ # Set chart position to center of document. Make it horizontal or vertical
+ if not rotate:
+ shadow.set('x', str(width/2 + offset + 1))
+ shadow.set('y', str(height/2 - int(value) + 1))
+ shadow.set("width", str(bar_width))
+ shadow.set("height", str(int(value)))
+ else:
+ shadow.set('y', str(width/2 + offset + 1))
+ shadow.set('x', str(height/2 + 1))
+ shadow.set("height", str(bar_width))
+ shadow.set("width", str(int(value)))
+
+ # Set shadow blur (connect to filter object in xml path)
+ shadow.set("style", "filter:url(#filter)")
+
+ # Create rectangle element
+ rect = inkex.etree.Element(inkex.addNS('rect', 'svg'))
+
+ # Set chart position to center of document.
+ if not rotate:
+ rect.set('x', str(width/2 + offset))
+ rect.set('y', str(height/2 - int(value)))
+ rect.set("width", str(bar_width))
+ rect.set("height", str(int(value)))
+ else:
+ rect.set('y', str(width/2 + offset))
+ rect.set('x', str(height/2))
+ rect.set("height", str(bar_width))
+ rect.set("width", str(int(value)))
+
+ rect.set("style", "fill:" + colors[color % color_count])
+
+ # If keys are given, create text elements
+ if keys_present:
+ text = inkex.etree.Element(inkex.addNS('text', 'svg'))
+ if not rotate: #=vertical
+ text.set("transform", "matrix(0,-1,1,0,0,0)")
+ #y after rotation:
+ text.set("x", "-" + str(height/2 + text_offset))
+ #x after rotation:
+ text.set("y", str(width/2 + offset + bar_width/2 + font_size/3))
+ else: #=horizontal
+ text.set("y", str(width/2 + offset + bar_width/2 + font_size/3))
+ text.set("x", str(height/2 - text_offset))
+
+ text.set("style", "font-size:" + str(font_size)\
+ + "px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:"\
+ + font + ";-inkscape-font-specification:Bitstream Charter;text-align:end;text-anchor:end;fill:"\
+ + font_color)
+
+ text.text = keys[cnt]
+
+ # Increase Offset and Color
+ #offset=offset+bar_width+bar_offset
+ color = (color + 1) % 8
+ # Connect elements together.
+ if draw_blur:
+ layer.append(shadow)
+ layer.append(rect)
+ if keys_present:
+ layer.append(text)
+
+ if show_values:
+ vtext = inkex.etree.Element(inkex.addNS('text', 'svg'))
+ if not rotate: #=vertical
+ vtext.set("transform", "matrix(0,-1,1,0,0,0)")
+ #y after rotation:
+ vtext.set("x", "-"+str(height/2+text_offset-value-text_offset-text_offset))
+ #x after rotation:
+ vtext.set("y", str(width/2+offset+bar_width/2+font_size/3))
+ else: #=horizontal
+ vtext.set("y", str(width/2+offset+bar_width/2+font_size/3))
+ vtext.set("x", str(height/2-text_offset+value+text_offset+text_offset))
+
+ vtext.set("style", "font-size:"+str(font_size)\
+ + "px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:"\
+ + font + ";-inkscape-font-specification:Bitstream Charter;text-align:start;text-anchor:start;fill:"\
+ + font_color)
+
+ vtext.text = str(int(orig_values[cnt]))
+ layer.append(vtext)
+
+ cnt = cnt+1
+ offset = offset + bar_width + bar_offset
+
+ # set x position for heading line
+ if not rotate:
+ heading_x = width/2 # TODO: adjust
+ else:
+ heading_x = width/2 # TODO: adjust
+
+
+ elif charttype == "pie":
+ #########
+ ###PIE###
+ #########
+ # Iterate all values to draw the different slices
+ color = 0
+
+ # Create the shadow first (if it should be created):
+ if draw_blur:
+ shadow = inkex.etree.Element(inkex.addNS("circle", "svg"))
+ shadow.set('cx', str(width/2))
+ shadow.set('cy', str(height/2))
+ shadow.set('r', str(pie_radius))
+ shadow.set("style", "filter:url(#filter);fill:#000000")
+ layer.append(shadow)
+
+
+ # Add a grey background circle with a light stroke
+ background = inkex.etree.Element(inkex.addNS("circle", "svg"))
+ background.set("cx", str(width/2))
+ background.set("cy", str(height/2))
+ background.set("r", str(pie_radius))
+ background.set("style", "stroke:#ececec;fill:#f9f9f9")
+ layer.append(background)
+
+ #create value sum in order to divide the slices
+ try:
+ valuesum = sum(values)
+
+ except ValueError:
+ valuesum = 0
+
+ if pie_abs:
+ valuesum = 100
+
+ num_values = len(values)
+
+ # Set an offsetangle
+ offset = 0
+
+ # Draw single slices
+ for i in range(num_values):
+ value = values[i]
+ # Calculate the PI-angles for start and end
+ angle = (2*3.141592) / valuesum * float(value)
+ start = offset
+ end = offset + angle
+
+ # proper overlapping
+ if segment_overlap:
+ if i != num_values-1:
+ end += 0.09 # add a 5° overlap
+ if i == 0:
+ start -= 0.09 # let the first element overlap into the other direction
+
+ #then add the slice
+ pieslice = inkex.etree.Element(inkex.addNS("path", "svg"))
+ pieslice.set(inkex.addNS('type', 'sodipodi'), 'arc')
+ pieslice.set(inkex.addNS('cx', 'sodipodi'), str(width/2))
+ pieslice.set(inkex.addNS('cy', 'sodipodi'), str(height/2))
+ pieslice.set(inkex.addNS('rx', 'sodipodi'), str(pie_radius))
+ pieslice.set(inkex.addNS('ry', 'sodipodi'), str(pie_radius))
+ pieslice.set(inkex.addNS('start', 'sodipodi'), str(start))
+ pieslice.set(inkex.addNS('end', 'sodipodi'), str(end))
+ pieslice.set("style", "fill:"+ colors[color % color_count] + ";stroke:none;fill-opacity:1")
+
+ #If text is given, draw short paths and add the text
+ if keys_present:
+ path = inkex.etree.Element(inkex.addNS("path", "svg"))
+ path.set("d", "m "
+ + str((width/2) + pie_radius * math.cos(angle/2 + offset)) + ","
+ + str((height/2) + pie_radius * math.sin(angle/2 + offset)) + " "
+ + str((text_offset - 2) * math.cos(angle/2 + offset)) + ","
+ + str((text_offset - 2) * math.sin(angle/2 + offset)))
+
+ path.set("style", "fill:none;stroke:"
+ + font_color + ";stroke-width:" + str(stroke_width)
+ + "px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1")
+ layer.append(path)
+ text = inkex.etree.Element(inkex.addNS('text', 'svg'))
+ text.set("x", str((width/2) + (pie_radius + text_offset) * math.cos(angle/2 + offset)))
+ text.set("y", str((height/2) + (pie_radius + text_offset) * math.sin(angle/2 + offset) + font_size/3))
+ textstyle = "font-size:" + str(font_size) \
+ + "px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:" \
+ + font + ";-inkscape-font-specification:Bitstream Charter;fill:" + font_color
+ # check if it is right or left of the Pie
+ if math.cos(angle/2 + offset) > 0:
+ text.set("style", textstyle)
+ else:
+ text.set("style", textstyle + ";text-align:end;text-anchor:end")
+ text.text = keys[cnt]
+ if show_values:
+ text.text = text.text + "(" + str(values[cnt])
+
+ if pie_abs:
+ text.text = text.text + " %"
+
+ text.text = text.text + ")"
+
+ cnt = cnt + 1
+ layer.append(text)
+
+ # increase the rotation-offset and the colorcycle-position
+ offset = offset + angle
+ color = (color + 1) % 8
+
+ # append the objects to the extension-layer
+ layer.append(pieslice)
+
+ # set x position for heading line
+ heading_x = width/2 - pie_radius # TODO: adjust
+
+ elif charttype == "stbar":
+ #################
+ ###STACKED BAR###
+ #################
+ # Iterate over all values to draw the different slices
+ color = 0
+
+ #create value sum in order to divide the bars
+ try:
+ valuesum = sum(values)
+ except ValueError:
+ valuesum = 0.0
+
+ for value in values:
+ valuesum = valuesum + float(value)
+
+ # Init offset
+ offset = 0
+
+ if draw_blur:
+ # Create rectangle element
+ shadow = inkex.etree.Element(inkex.addNS("rect", "svg"))
+ # Set chart position to center of document.
+ if not rotate:
+ shadow.set('x', str(width/2))
+ shadow.set('y', str(height/2 - bar_height/2))
+ else:
+ shadow.set('x', str(width/2))
+ shadow.set('y', str(height/2))
+ # Set rectangle properties
+ if not rotate:
+ shadow.set("width", str(bar_width))
+ shadow.set("height", str(bar_height/2))
+ else:
+ shadow.set("width",str(bar_height/2))
+ shadow.set("height", str(bar_width))
+ # Set shadow blur (connect to filter object in xml path)
+ shadow.set("style", "filter:url(#filter)")
+ layer.append(shadow)
+
+ i = 0
+ # Draw Single bars
+ for value in values:
+
+ # Calculate the individual heights normalized on 100units
+ normedvalue = (bar_height / valuesum) * float(value)
+
+ # Create rectangle element
+ rect = inkex.etree.Element(inkex.addNS('rect', 'svg'))
+
+ # Set chart position to center of document.
+ if not rotate:
+ rect.set('x', str(width / 2 ))
+ rect.set('y', str(height / 2 - offset - normedvalue))
+ else:
+ rect.set('x', str(width / 2 + offset ))
+ rect.set('y', str(height / 2 ))
+ # Set rectangle properties
+ if not rotate:
+ rect.set("width", str(bar_width))
+ rect.set("height", str(normedvalue))
+ else:
+ rect.set("height", str(bar_width))
+ rect.set("width", str(normedvalue))
+ rect.set("style", "fill:" + colors[color % color_count])
+
+ #If text is given, draw short paths and add the text
+ # TODO: apply overlap workaround for visible gaps in between
+ if keys_present:
+ if not rotate:
+ path = inkex.etree.Element(inkex.addNS("path", "svg"))
+ path.set("d","m " + str((width + bar_width)/2) + ","
+ + str(height/2 - offset - (normedvalue / 2)) + " "
+ + str(bar_width/2 + text_offset) + ",0")
+ path.set("style", "fill:none;stroke:" + font_color
+ + ";stroke-width:" + str(stroke_width)
+ + "px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1")
+ layer.append(path)
+ text = inkex.etree.Element(inkex.addNS('text', 'svg'))
+ text.set("x", str(width/2 + bar_width + text_offset + 1))
+ text.set("y", str(height/ 2 - offset + font_size/3 - (normedvalue/2)))
+ text.set("style", "font-size:" + str(font_size)
+ + "px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:"
+ + font + ";-inkscape-font-specification:Bitstream Charter;fill:" + font_color)
+ text.text = keys[cnt]
+ cnt = cnt + 1
+ layer.append(text)
+ else:
+ path = inkex.etree.Element(inkex.addNS("path", "svg"))
+ path.set("d","m " + str((width)/2 + offset + normedvalue/2) + ","
+ + str(height / 2 + bar_width/2) + " 0,"
+ + str(bar_width/2 + (font_size * i) + text_offset)) #line
+ path.set("style", "fill:none;stroke:" + font_color
+ + ";stroke-width:" + str(stroke_width)
+ + "px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1")
+ layer.append(path)
+ text = inkex.etree.Element(inkex.addNS('text', 'svg'))
+ text.set("x", str((width)/2 + offset + normedvalue/2 - font_size/3))
+ text.set("y", str((height/2) + bar_width + (font_size * (i + 1)) + text_offset))
+ text.set("style", "font-size:" + str(font_size)
+ + "px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:"
+ + font + ";-inkscape-font-specification:Bitstream Charter;fill:" + font_color)
+ text.text = keys[color]
+ layer.append(text)
+
+ # Increase Offset and Color
+ offset = offset + normedvalue
+ color = (color + 1) % 8
+
+ # Draw rectangle
+ layer.append(rect)
+ i += 1
+
+ # set x position for heading line
+ if not rotate:
+ heading_x = width/2 + offset + normedvalue # TODO: adjust
+ else:
+ heading_x = width/2 + offset + normedvalue # TODO: adjust
+
+ if headings and input_type == "\"file\"":
+ headingtext = inkex.etree.Element(inkex.addNS('text', 'svg'))
+ headingtext.set("y", str(height/2 + heading_offset))
+ headingtext.set("x", str(heading_x))
+ headingtext.set("style", "font-size:" + str(font_size + 4)\
+ + "px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:"\
+ + font + ";-inkscape-font-specification:Bitstream Charter;text-align:end;text-anchor:end;fill:"\
+ + font_color)
+
+ headingtext.text = heading
+ layer.append(headingtext)
+
+ def getUnittouu(self, param):
+ try:
+ return inkex.unittouu(param)
+ except AttributeError:
+ return self.unittouu(param)
+
+if __name__ == '__main__':
+ # Create effect instance and apply it.
+ effect = NiceChart()
+ effect.affect()
diff --git a/share/extensions/param_curves.py b/share/extensions/param_curves.py
index d8f880d0c..e38d5208a 100755
--- a/share/extensions/param_curves.py
+++ b/share/extensions/param_curves.py
@@ -18,7 +18,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Changes:
* This program is derived by Michel Chatelain from funcplot.py. His changes are in the Public Domain.
diff --git a/share/extensions/pathalongpath.py b/share/extensions/pathalongpath.py
index 234430acd..93bb99d6b 100755
--- a/share/extensions/pathalongpath.py
+++ b/share/extensions/pathalongpath.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
barraud@math.univ-lille1.fr
Quick description:
diff --git a/share/extensions/pathmodifier.py b/share/extensions/pathmodifier.py
index ff2bbfb3a..d80b6eeae 100755
--- a/share/extensions/pathmodifier.py
+++ b/share/extensions/pathmodifier.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
barraud@math.univ-lille1.fr
This code defines a basic class (PathModifier) of effects whose purpose is
diff --git a/share/extensions/pathscatter.py b/share/extensions/pathscatter.py
index 5c2857979..92af6ad76 100755
--- a/share/extensions/pathscatter.py
+++ b/share/extensions/pathscatter.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
barraud@math.univ-lille1.fr
Quick description:
diff --git a/share/extensions/perfectboundcover.py b/share/extensions/perfectboundcover.py
index 9f81dbb36..e69bcf4c2 100755
--- a/share/extensions/perfectboundcover.py
+++ b/share/extensions/perfectboundcover.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import sys, inkex
diff --git a/share/extensions/perspective.py b/share/extensions/perspective.py
index a6ee5810b..febe34a22 100755
--- a/share/extensions/perspective.py
+++ b/share/extensions/perspective.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Perspective approach & math by Dmitry Platonov, shadowjack@mail.ru, 2006
"""
diff --git a/share/extensions/plotter.py b/share/extensions/plotter.py
index 7e34f2953..1c4a683c1 100755
--- a/share/extensions/plotter.py
+++ b/share/extensions/plotter.py
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
@@ -144,10 +144,12 @@ class Plot(inkex.Effect):
try:
import serial
except ImportError, e:
- inkex.errormsg(_("pySerial is not installed."
- + "\n\n1. Download pySerial here (not the \".exe\"!): http://pypi.python.org/pypi/pyserial"
- + "\n2. Extract the \"serial\" subfolder from the zip to the following folder: C:\\[Program files]\\inkscape\\python\\Lib\\"
- + "\n3. Restart Inkscape."))
+ inkex.errormsg(_("pySerial is not installed. Please follow these steps:")
+ + "\n\n" + _("1. Download and extract (unzip) this file to your local harddisk:")
+ + "\n" + " https://pypi.python.org/packages/source/p/pyserial/pyserial-2.7.tar.gz"
+ + "\n" + _("2. Copy the \"serial\" folder (Can be found inside the just extracted folder)")
+ + "\n" + _(" into the following Inkscape folder: C:\\<Program files>\\inkscape\\python\\Lib\\")
+ + "\n" + _("3. Close and restart Inkscape."))
return
# init serial framework
mySerial = serial.Serial()
diff --git a/share/extensions/polyhedron_3d.py b/share/extensions/polyhedron_3d.py
index 8e4a8e8e6..7ce8b1c6d 100755
--- a/share/extensions/polyhedron_3d.py
+++ b/share/extensions/polyhedron_3d.py
@@ -46,7 +46,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
import sys
diff --git a/share/extensions/previous_glyph_layer.py b/share/extensions/previous_glyph_layer.py
index 801570d65..5e9de1fb8 100755
--- a/share/extensions/previous_glyph_layer.py
+++ b/share/extensions/previous_glyph_layer.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/print_win32_vector.py b/share/extensions/print_win32_vector.py
index 37c2021ac..bf8e89845 100755
--- a/share/extensions/print_win32_vector.py
+++ b/share/extensions/print_win32_vector.py
@@ -25,7 +25,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
from ctypes import *
diff --git a/share/extensions/printing_marks.py b/share/extensions/printing_marks.py
index 0306048d6..6c718da01 100755
--- a/share/extensions/printing_marks.py
+++ b/share/extensions/printing_marks.py
@@ -21,7 +21,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
from subprocess import Popen, PIPE, STDOUT
diff --git a/share/extensions/pturtle.py b/share/extensions/pturtle.py
index b2740a4bc..a4925bf4c 100755
--- a/share/extensions/pturtle.py
+++ b/share/extensions/pturtle.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import math
class pTurtle:
diff --git a/share/extensions/radiusrand.py b/share/extensions/radiusrand.py
index e272a50c4..e4585ccd4 100755
--- a/share/extensions/radiusrand.py
+++ b/share/extensions/radiusrand.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import random, math, inkex, cubicsuperpath
diff --git a/share/extensions/render_alphabetsoup.py b/share/extensions/render_alphabetsoup.py
index a2cbcb978..06c82cb2d 100755
--- a/share/extensions/render_alphabetsoup.py
+++ b/share/extensions/render_alphabetsoup.py
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
import copy
diff --git a/share/extensions/render_barcode.inx b/share/extensions/render_barcode.inx
index debefadad..890ffb1bd 100644
--- a/share/extensions/render_barcode.inx
+++ b/share/extensions/render_barcode.inx
@@ -5,9 +5,10 @@
<dependency type="executable" location="extensions">inkex.py</dependency>
<dependency type="executable" location="extensions">render_barcode.py</dependency>
<param name="type" type="enum" _gui-text="Barcode Type:">
- <item value="Ean5">EAN5</item>
+ <item value="Ean2">EAN2 Extension</item>
+ <item value="Ean5">EAN5 Extension</item>
+ <item value="Ean13">EAN13 +Extensions</item>
<item value="Ean8">EAN8</item>
- <item value="Ean13">EAN13</item>
<item value="Upca">UPC-A</item>
<item value="Upce">UPC-E</item>
<item value="Code25i">Code25 Interleaved 2 of 5</item>
diff --git a/share/extensions/render_barcode.py b/share/extensions/render_barcode.py
index 4f1464a92..63436f03c 100755
--- a/share/extensions/render_barcode.py
+++ b/share/extensions/render_barcode.py
@@ -11,10 +11,10 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Inkscape's general barcode extension. Run from within inkscape or use the
@@ -27,6 +27,9 @@ from Barcode import getBarcode
from simpletransform import computePointInNode
class InsertBarcode(inkex.Effect):
+ """
+ Raw barcode Effect class, see Barcode base class.
+ """
def __init__(self):
inkex.Effect.__init__(self)
self.OptionParser.add_option("-l", "--height",
@@ -43,29 +46,44 @@ class InsertBarcode(inkex.Effect):
help="Text to print on barcode")
def effect(self):
- x, y = computePointInNode(list(self.view_center), self.current_layer)
- bargen = getBarcode( self.options.type,
+ (pos_x, pos_y) = computePointInNode(
+ list(self.view_center), self.current_layer)
+
+ barcode = getBarcode(self.options.type,
text=self.options.text,
height=self.options.height,
document=self.document,
- x=x, y=y,
+ x=pos_x, y=pos_y,
scale=self.unittouu('1px'),
- )
- if bargen is not None:
- barcode = bargen.generate()
- if barcode is not None:
- self.current_layer.append(barcode)
- else:
- sys.stderr.write("No barcode was generated\n")
+ ).generate()
+ if barcode is not None:
+ self.current_layer.append(barcode)
else:
- sys.stderr.write("Unable to make barcode with: " + str(self.options) + "\n")
+ sys.stderr.write("No barcode was generated\n")
def test_barcode():
- bargen = getBarcode("Ean13", text="123456789101")
- if bargen is not None:
- barcode = bargen.generate()
- if barcode:
- print inkex.etree.tostring(barcode, pretty_print=True)
+ """Run from command line"""
+ for (kind, text) in (
+ ('Ean2', '55'),
+ ('Ean5', '54321'),
+ ('Ean8', '0123456'),
+ ('Ean13', '123456789101'),
+ ('Ean13', '12345678910155'),
+ ('Ean13', '12345678910154321'),
+ ('Code128', 'Martin is Great'),
+ ('Code25i', '3242322'),
+ ('Code39', '4443322888'),
+ ('Code93', '3332222'),
+ ('Rm4scc', 'ROYAL POINT'),
+ ('Upca', '12345678911'),
+ ('Upce', '123456'),
+ ):
+ print "RENDER TEST: %s" % kind
+ bargen = getBarcode(kind, text=text)
+ if bargen is not None:
+ barcode = bargen.generate()
+ if barcode is not None:
+ print inkex.etree.tostring(barcode, pretty_print=True)
if __name__ == '__main__':
@@ -73,6 +91,5 @@ if __name__ == '__main__':
# Debug mode without inkex
test_barcode()
exit(0)
- e = InsertBarcode()
- e.affect()
+ InsertBarcode().affect()
diff --git a/share/extensions/render_barcode_datamatrix.py b/share/extensions/render_barcode_datamatrix.py
index 72ffddbe6..82c827bb8 100755
--- a/share/extensions/render_barcode_datamatrix.py
+++ b/share/extensions/render_barcode_datamatrix.py
@@ -43,7 +43,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
######VERSION HISTORY#####
Ver. Date Notes
diff --git a/share/extensions/render_gear_rack.py b/share/extensions/render_gear_rack.py
index 63433aadb..95076ba64 100755
--- a/share/extensions/render_gear_rack.py
+++ b/share/extensions/render_gear_rack.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/render_gears.py b/share/extensions/render_gears.py
index 2584117f2..fbec5d052 100755
--- a/share/extensions/render_gears.py
+++ b/share/extensions/render_gears.py
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/rtree.py b/share/extensions/rtree.py
index c0dc1cca6..b336c4e3a 100755
--- a/share/extensions/rtree.py
+++ b/share/extensions/rtree.py
@@ -15,7 +15,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex, simplestyle, pturtle, random
from simpletransform import computePointInNode
diff --git a/share/extensions/rubberstretch.py b/share/extensions/rubberstretch.py
index 95d1cffb5..2e6b85ad5 100755
--- a/share/extensions/rubberstretch.py
+++ b/share/extensions/rubberstretch.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
barraud@math.univ-lille1.fr
'''
diff --git a/share/extensions/seamless_pattern.py b/share/extensions/seamless_pattern.py
index 11ed4c356..db8fd8c51 100755
--- a/share/extensions/seamless_pattern.py
+++ b/share/extensions/seamless_pattern.py
@@ -24,8 +24,8 @@ class C(inkex.Effect):
self.document = etree.parse(os.path.join(path, "seamless_pattern.svg"))
root = self.document.getroot()
root.set("id", "SVGRoot")
- root.set("width", str(width) + 'px')
- root.set("height", str(height) + 'px')
+ root.set("width", str(width))
+ root.set("height", str(height))
root.set("viewBox", "0 0 " + str(width) + " " + str(height) )
xpathStr = '//svg:rect[@id="clipPathRect"]'
@@ -42,12 +42,11 @@ class C(inkex.Effect):
else:
designZoneData[0].set("patternTransform", "scale(" + str(10.0/factor) + "," + str(10.0) + ")")
- xpathStr = '//svg:g[@id="designTop"] | //svg:g[@id="designBottom"] | //svg:g[@id="transparencyPreview"]'
+ xpathStr = '//svg:g[@id="designTop"] | //svg:g[@id="designBottom"]'
designZone = root.xpath(xpathStr, namespaces=inkex.NSS)
if designZone != []:
designZone[0].set("transform", "scale(" + str(width/100.0) + "," + str(height/100.0) + ")")
designZone[1].set("transform", "scale(" + str(width /100.0) + "," + str(height/100.0) + ")")
- designZone[2].set("transform", "scale(" + str(width /100.0) + "," + str(height/100.0) + ")")
xpathStr = '//svg:g[@id="designTop"]/child::*'
designZoneData = root.xpath(xpathStr, namespaces=inkex.NSS)
diff --git a/share/extensions/seamless_pattern.svg b/share/extensions/seamless_pattern.svg
index 9b33970d5..5bff87af8 100644
--- a/share/extensions/seamless_pattern.svg
+++ b/share/extensions/seamless_pattern.svg
@@ -1,66 +1,82 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="100px" height="100px" viewBox="0 0 100 100" id="SVGRoot" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="seamless_pattern.svg" inkscape:export-xdpi="96" inkscape:export-ydpi="96" enable-background="new">
-<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.93166" inkscape:cx="79.1968" inkscape:cy="164.9834" inkscape:document-units="px" inkscape:current-layer="patternLayer" showgrid="false" units="px" inkscape:window-width="1280" inkscape:window-height="960" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" borderlayer="true" />
-<defs id="defs4">
-<pattern inkscape:stockid="Checkerboard" id="Checkerboard" patternTransform="translate(0,0) scale(10,10)" height="2" width="2" patternUnits="userSpaceOnUse" inkscape:collect="always">
-<rect id="rect12513" height="1" width="1" y="0" x="0" style="fill:black;stroke:none" />
-<rect id="rect12515" height="1" width="1" y="1" x="1" style="fill:black;stroke:none" />
-</pattern>
-<marker inkscape:stockid="Arrow2Mend" orient="auto" refY="0.0" refX="0.0" id="Arrow2Mend" style="overflow:visible;" inkscape:isstock="true">
-<path id="path19572" style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#000000;stroke-opacity:1;fill:#000000;fill-opacity:1" d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " transform="scale(0.6) rotate(180) translate(0,0)" />
-</marker>
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="100px" height="100px" viewBox="0 0 100 100" id="SVGRoot" version="1.1" inkscape:version="0.91+devel r14699 custom" sodipodi:docname="seamless_pattern.svg" inkscape:export-xdpi="96" inkscape:export-ydpi="96" enable-background="new">
+<defs id="defs4787">
+<linearGradient inkscape:collect="always" id="linearGradient4217">
+<stop style="stop-color:#ffffff;stop-opacity:1" offset="0" id="stop4213" />
+<stop style="stop-color:#ffffff;stop-opacity:0.21960784" offset="1" id="stop4215" />
+</linearGradient>
<clipPath clipPathUnits="userSpaceOnUse" id="patternClipPath">
<rect y="0" x="0" height="100" width="100" id="clipPathRect" style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:20;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.09889996;stroke-opacity:1;marker:none;enable-background:accumulate" />
</clipPath>
+<marker inkscape:stockid="Arrow2Mend" orient="auto" refY="0.0" refX="0.0" id="Arrow2Mend" style="overflow:visible;" inkscape:isstock="true">
+<path id="path19572" style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#000000;stroke-opacity:1;fill:#000000;fill-opacity:1" d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " transform="scale(0.6) rotate(180) translate(0,0)" />
+</marker>
+<radialGradient inkscape:collect="always" xlink:href="#linearGradient4217" id="radialGradient4159" gradientUnits="userSpaceOnUse" cx="50" cy="50" fx="50" fy="50" r="50" />
</defs>
-<metadata id="metadata7">
+<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.93166" inkscape:cx="98.45167" inkscape:cy="143.1829" inkscape:document-units="px" inkscape:current-layer="patternLayer" showgrid="false" inkscape:pagecheckerboard="true" inkscape:snap-global="false" />
+<metadata id="metadata4790">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-<dc:title />
+<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
-<g inkscape:groupmode="layer" id="transparencyPreview" inkscape:label="Preview Background (not in pattern)" style="display:inline">
-<rect style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.11;fill:url(#Checkerboard);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" id="transparencyChess" width="320" height="320" x="190" y="-110" sodipodi:insensitive="true" />
-</g>
<g inkscape:groupmode="layer" id="patternLayer" inkscape:label="Pattern" style="display:inline">
<g id="g8891" sodipodi:insensitive="true">
<use x="0" y="0" xlink:href="#fullPattern" id="fullPatternClone" transform="translate(200,-100)" width="100" height="100" inkscape:tile-cx="50" inkscape:tile-cy="50" inkscape:tile-w="100" inkscape:tile-h="100" inkscape:tile-x0="100" inkscape:tile-y0="100" />
<use height="100%" width="100%" x="0" y="0" inkscape:tiled-clone-of="#fullPatternClone" xlink:href="#fullPatternClone" transform="translate(0,100)" id="clonePreview1" />
<use height="100%" width="100%" x="0" y="0" inkscape:tiled-clone-of="#fullPatternClone" xlink:href="#fullPatternClone" transform="translate(0,200)" id="clonePreview2" />
-<use height="100%" width="100%" x="0" y="0" inkscape:tiled-clone-of="#fullPatternClone" xlink:href="#fullPatternClone" transform="translate(100,0)" id="clonePreview3" />
+<use height="100%" width="100%" x="0" y="0" inkscape:tiled-clone-of="#fullPatternClone" xlink:href="#fullPatternClone" transform="translate(100)" id="clonePreview3" />
<use height="100%" width="100%" x="0" y="0" inkscape:tiled-clone-of="#fullPatternClone" xlink:href="#fullPatternClone" transform="translate(100,100)" id="clonePreview4" />
<use height="100%" width="100%" x="0" y="0" inkscape:tiled-clone-of="#fullPatternClone" xlink:href="#fullPatternClone" transform="translate(100,200)" id="clonePreview5" />
-<use height="100%" width="100%" x="0" y="0" inkscape:tiled-clone-of="#fullPatternClone" xlink:href="#fullPatternClone" transform="translate(200,0)" id="clonePreview6" />
+<use height="100%" width="100%" x="0" y="0" inkscape:tiled-clone-of="#fullPatternClone" xlink:href="#fullPatternClone" transform="translate(200)" id="clonePreview6" />
<use height="100%" width="100%" x="0" y="0" inkscape:tiled-clone-of="#fullPatternClone" xlink:href="#fullPatternClone" transform="translate(200,100)" id="clonePreview7" />
<use height="100%" width="100%" x="0" y="0" inkscape:tiled-clone-of="#fullPatternClone" xlink:href="#fullPatternClone" transform="translate(200,200)" id="clonePreview8" />
</g>
<use style="opacity:0.3" height="100%" width="100%" id="phantomBottom" xlink:href="#designBottom" y="0" x="0" sodipodi:insensitive="true" />
<use style="opacity:0.3" height="100%" width="100%" id="phantomTop" xlink:href="#designTop" y="0" x="0" sodipodi:insensitive="true" />
+<g id="infoGroup" sodipodi:insensitive="true">
+<rect style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:74.66007233;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" id="rect4130" width="526.66248" height="338.53928" x="-348.83969" y="-380.86212" />
+<text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:23.66861534px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:Verdana;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" x="-326.82172" y="-349.80621" id="text8664" sodipodi:linespacing="125%"><tspan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'" sodipodi:role="line" id="tspan8666" x="-326.82172" y="-349.80621">Seamless pattern</tspan></text>
+<flowRoot xml:space="preserve" id="infoText" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.75px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" transform="translate(-709.3014,-231.7039)"><flowRegion id="flowRegion11597"><rect ry="0.97061312" id="rect11599" width="491.7114" height="324.99371" x="383.75671" y="-110.4523" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.75px;font-family:sans-serif;-inkscape-font-specification:sans-serif" /></flowRegion><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara6756">Use the layers &quot;<flowSpan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Cantarell;-inkscape-font-specification:'Cantarell Bold'" id="flowSpan7476">Pattern Foreground</flowSpan>&quot; and &quot;<flowSpan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Cantarell;-inkscape-font-specification:'Cantarell Bold'" id="flowSpan7478">Pattern Background</flowSpan>&quot; on the pattern page to create your design. The separation into two layers will make it easier for you to create and edit overlapping content like a foreground drawing with a background fill.</flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7456" /><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7458">The layer named &quot;<flowSpan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Cantarell;-inkscape-font-specification:'Cantarell Bold'" id="flowSpan7480">Pattern</flowSpan>&quot; is for using the seamless pattern, copying it to other documents, adding opacity etc. </flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7460">Select the group on the page, and use <flowSpan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Cantarell;-inkscape-font-specification:'Cantarell Bold'" id="flowSpan7484">Object-&gt;Pattern-&gt;Objects to Pattern</flowSpan> to convert your creation into a fill pattern.</flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7462" /><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7464">The layer &quot;<flowSpan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Cantarell;-inkscape-font-specification:'Cantarell Bold'" id="flowSpan7482">Preview Background</flowSpan>&quot; provides an easy way to preview your creation if it contains transparency.</flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7466">Changing this layer's visibility will not alter the pattern.</flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7468" /><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7470">If an object is moved outside the pattern/page limits, it will be difficult to select it. </flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7472">To move it back onto the page, select the object using the rubberband selection (click and drag a selection box) with the selection tool.</flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7474">Then move it back onto the page, using the arrow keys or the &quot;Align and Distribute&quot; dialog (Shift+Ctrl+A).</flowPara></flowRoot><path sodipodi:nodetypes="cccc" inkscape:connector-curvature="0" id="path19539" d="m -354.4906,-359.49 h -6.1704 V 51.51566 h 229.6052" style="color:#000000;text-decoration:none;text-decoration-line:none;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:3.77952766;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-end:url(#Arrow2Mend);enable-background:accumulate" />
+</g>
+<g id="textPreview" sodipodi:insensitive="true">
+<path d="m -29.56541,100 0,-7.16704 2.00731,0 0,4.51126 1.91761,0 0,-4.24223 2.00731,0 0,4.24223 4.36647,0 0,2.65578 -10.2987,0 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9845" inkscape:connector-curvature="0" />
+<path d="m -22.7433,87.81814 q 0,0.77256 0.26214,1.16575 0.26214,0.38628 0.77256,0.38628 0.46906,0 0.73808,-0.3104 0.26214,-0.31731 0.26214,-0.87604 0,-0.6967 -0.49667,-1.17266 -0.50355,-0.47596 -1.25547,-0.47596 l -0.28278,0 0,1.28303 z m -0.93124,-3.7732 4.40783,0 0,2.49017 -1.14504,0 q 0.70359,0.49666 1.02773,1.11747 0.31735,0.62082 0.31735,1.51066 0,1.20024 -0.69671,1.95213 -0.70359,0.74498 -1.82103,0.74498 -1.35893,0 -1.99355,-0.93123 -0.63462,-0.93812 -0.63462,-2.93854 l 0,-1.45547 -0.19316,0 q -0.58628,0 -0.8553,0.46216 -0.2759,0.46217 -0.2759,1.44168 0,0.79327 0.15859,1.47617 0.15868,0.6829 0.47603,1.26923 l -1.88321,0 q -0.19317,-0.79327 -0.28966,-1.59344 -0.10355,-0.80016 -0.10355,-1.60033 0,-2.09008 0.82778,-3.01441 0.8209,-0.93123 2.67642,-0.93123 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9847" inkscape:connector-curvature="0" />
+<path d="m -26.75105,75.72598 1.87625,0 q -0.33111,0.79327 -0.49658,1.53136 -0.16556,0.73808 -0.16556,1.39338 0,0.7036 0.17932,1.04849 0.17243,0.338 0.53803,0.338 0.29663,0 0.45531,-0.25522 0.15858,-0.26212 0.23453,-0.93122 l 0.0624,-0.43458 q 0.2415,-1.89694 0.79329,-2.55225 0.55189,-0.65531 1.73142,-0.65531 1.23474,0 1.85551,0.91054 0.62086,0.91053 0.62086,2.7178 0,0.76568 -0.12419,1.58654 -0.11722,0.81396 -0.35872,1.67621 l -1.87624,0 q 0.35872,-0.73809 0.53803,-1.51067 0.17941,-0.77947 0.17941,-1.57963 0,-0.72429 -0.20005,-1.08988 -0.20004,-0.3656 -0.59325,-0.3656 -0.33111,0 -0.4897,0.25524 -0.16555,0.24832 -0.25525,1.00019 l -0.055,0.43458 q -0.20692,1.64862 -0.76568,2.31082 -0.55868,0.66221 -1.69684,0.66221 -1.22787,0 -1.82112,-0.84156 -0.59325,-0.84155 -0.59325,-2.57984 0,-0.6829 0.10355,-1.43477 0.10346,-0.75188 0.32415,-1.63483 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9849" inkscape:connector-curvature="0" />
+<path d="m -29.18596,70.67666 2.19351,0 0,-2.54535 1.7659,0 0,2.54535 3.27654,0 q 0.53804,0 0.7312,-0.21383 0.1862,-0.21384 0.1862,-0.84846 l 0,-1.26922 1.7659,0 0,2.11768 q 0,1.46237 -0.60701,2.07628 -0.61398,0.60703 -2.07629,0.60703 l -3.27654,0 0,1.22784 -1.7659,0 0,-1.22784 -2.19351,0 0,-2.46948 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9851" inkscape:connector-curvature="0" />
+<path d="m -20.38415,59.23292 4.05599,0 0,2.46948 -10.66429,0 0,-2.46948 1.13128,0 q -0.67598,-0.51044 -0.99334,-1.13127 -0.32423,-0.62081 -0.32423,-1.42788 0,-1.42787 1.13826,-2.3453 1.13119,-0.91744 2.91782,-0.91744 1.78654,0 2.92471,0.91744 1.13128,0.91743 1.13128,2.3453 0,0.80707 -0.31735,1.42788 -0.32414,0.62083 -1.00013,1.13127 z m -5.00108,-1.64171 q 0,0.79327 0.58637,1.22093 0.5794,0.42078 1.6762,0.42078 1.09671,0 1.68308,-0.42078 0.5794,-0.42766 0.5794,-1.22093 0,-0.79327 -0.5794,-1.20715 -0.5794,-0.42078 -1.68308,-0.42078 -1.10368,0 -1.68317,0.42078 -0.5794,0.41388 -0.5794,1.20715 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9853" inkscape:connector-curvature="0" />
+<path d="m -24.88856,45.83706 q -0.1518,0.3242 -0.22077,0.6484 -0.0761,0.31731 -0.0761,0.64151 0,0.95193 0.61389,1.46927 0.6071,0.51045 1.74526,0.51045 l 3.55932,0 0,2.46948 -7.72574,0 0,-2.46948 1.26923,0 q -0.7588,-0.47595 -1.10367,-1.08988 -0.35185,-0.62081 -0.35185,-1.48306 0,-0.12416 0.0138,-0.26902 0.009,-0.14486 0.0413,-0.42078 l 2.23496,-0.007 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9855" inkscape:connector-curvature="0" />
+<path d="m -23.15027,36.88348 0.7036,0 0,5.77361 q 0.86914,-0.0897 1.30372,-0.62772 0.43457,-0.53804 0.43457,-1.50375 0,-0.77948 -0.22765,-1.59344 -0.23453,-0.82086 -0.70359,-1.6831 l 1.90385,0 q 0.33111,0.87604 0.49667,1.75208 0.17243,0.87604 0.17243,1.75209 0,2.09698 -1.06231,3.26274 -1.06919,1.15886 -2.99368,1.15886 -1.89009,0 -2.97304,-1.13817 -1.08304,-1.14506 -1.08304,-3.14547 0,-1.82107 1.0968,-2.91095 1.0968,-1.09678 2.93167,-1.09678 z m -0.8209,2.53846 q -0.70359,0 -1.13119,0.41388 -0.43458,0.40698 -0.43458,1.06918 0,0.71739 0.40697,1.16576 0.40009,0.44836 1.1588,0.55873 l 0,-3.20755 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9857" inkscape:connector-curvature="0" />
+<path d="m -26.99245,35.99364 0,-2.46947 5.33907,-1.92454 -5.33907,-1.91764 0,-2.47637 7.72574,3.04201 0,2.7109 -7.72574,3.03511 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9859" inkscape:connector-curvature="0" />
+<path d="m -26.99245,25.80534 0,-2.46948 7.72574,0 0,2.46948 -7.72574,0 z m -3.00753,0 0,-2.46948 2.01419,0 0,2.46948 -2.01419,0 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9861" inkscape:connector-curvature="0" />
+<path d="m -23.15027,13.23722 0.7036,0 0,5.77361 q 0.86914,-0.0897 1.30372,-0.62772 0.43457,-0.53805 0.43457,-1.50376 0,-0.77947 -0.22765,-1.59344 -0.23453,-0.82085 -0.70359,-1.6831 l 1.90385,0 q 0.33111,0.87604 0.49667,1.75208 0.17243,0.87605 0.17243,1.75209 0,2.09698 -1.06231,3.26275 -1.06919,1.15885 -2.99368,1.15885 -1.89009,0 -2.97304,-1.13816 -1.08304,-1.14506 -1.08304,-3.14548 0,-1.82106 1.0968,-2.91094 1.0968,-1.09678 2.93167,-1.09678 z m -0.8209,2.53845 q -0.70359,0 -1.13119,0.41389 -0.43458,0.40697 -0.43458,1.06918 0,0.71738 0.40697,1.16575 0.40009,0.44837 1.1588,0.55874 l 0,-3.20756 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9863" inkscape:connector-curvature="0" />
+<path d="m -26.99245,12.06456 0,-2.400495 5.32522,-1.29682 -5.32522,-1.303718 0,-2.062494 5.2701,-1.29682 -5.2701,-1.303717 0,-2.4004958732508 L -19.26671,2.034903 l 0,2.697109 -5.31147,1.303717 5.31147,1.296819 0,2.697112 -7.72574,2.0349 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9865" inkscape:connector-curvature="0" />
+</g>
<g inkscape:label="Helper Layer (don't use)" clip-path="url(#patternClipPath)" id="fullPattern" style="display:inline">
<g inkscape:groupmode="layer" id="designBottom" inkscape:label="Pattern Background">
-<rect y="0" x="0" height="100" width="100" id="rect9111" style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#006b80;fill-opacity:0.2568807;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;enable-background:accumulate" />
+<rect y="0" x="0" height="100" width="100" id="rect9111" style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#radialGradient4159);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;enable-background:accumulate" />
</g>
<g inkscape:groupmode="layer" id="designTop" inkscape:label="Pattern Foreground">
-<path id="text1784" d="m 3.644595,67.94579 c -0.07888,0.0262 -0.14386,0.12546 -0.20154,0.20397 C 3.067293,68.64562 2.91593,69.28897 2.682325,69.85677 2.323219,70.73336 1.90288,71.573 1.56176,72.45791 1.285321,72.40521 1.02863,72.29628 0.7496868,72.25964 -1.837815,71.90531 -4.512611,72.37529 -6.906564,73.39738 c -1.214178,0.49918 -2.32123,1.19527 -3.353956,2.00537 -2.08646,1.63753 -4.04345,3.48886 -5.56318,5.66676 -1.11014,1.64265 -2.09469,3.3866 -2.97126,5.16587 -0.69326,1.45248 -1.35982,3.01296 -1.51474,4.6304 -0.0598,0.81813 0.0232,1.70029 0.58093,2.34833 0.65445,0.6988 1.69331,0.88725 2.59876,0.71516 0.95914,-0.18125 1.67478,-0.93587 2.34256,-1.59435 1.88048,-1.9502 3.61757,-4.1173 4.66576,-6.63482 0.634096,-1.51607 1.113946,-3.17073 0.905436,-4.82969 -0.0946,-0.60481 -0.20017,-1.24465 -0.57725,-1.74017 -0.243456,-0.34737 -0.877996,-0.30599 -1.094556,0.0468 -0.16208,0.26767 -0.22687,0.58492 -0.15712,0.89273 0.3783,0.44718 0.70984,1.06029 0.73912,1.65818 0.0698,1.17828 -0.31269,2.25533 -0.75163,3.32879 -0.75358,1.84468 -1.94965,3.5096 -3.25592,5.00513 -0.70486,0.78764 -1.45032,1.59495 -2.38026,2.1217 -0.40386,0.19178 -0.80791,0.30346 -1.25494,0.33135 -0.53312,-0.0778 -0.77516,-0.60639 -0.85767,-1.08983 -0.13573,-0.97575 0.094,-1.91986 0.38957,-2.84026 1.17106,-3.38598 3.16858,-6.51508 5.6657,-9.07312 1.35812,-1.36531 2.844856,-2.56824 4.480256,-3.59283 1.588547,-0.95674 3.34305,-1.72154 5.178221,-2.01577 1.381324,-0.2054 2.8172613,-0.16697 4.137373,0.34162 -0.7794137,1.64787 -1.5983697,3.24415 -2.40518,4.87872 -1.265305,2.53051 -2.495375,5.07615 -3.768429,7.60291 -1.142036,2.22115 -2.237389,4.48261 -3.286679,6.74875 -0.739536,1.63933 -1.450876,3.29688 -2.039752,4.99818 -0.45166,0.073 -0.88599,0.092 -1.33705,0.1694 -1.26829,0.2351 -2.61845,0.37656 -3.80592,0.91346 -1.84359,0.86315 -3.50343,2.09935 -4.88559,3.59545 -0.56231,0.6379 -1.15693,1.3401 -1.32556,2.1969 -0.10997,0.5181 0.16568,1.001 0.49415,1.3755 0.55111,0.6465 1.46764,0.7986 2.27435,0.6765 1.15422,-0.1701 2.24026,-0.6453 3.23648,-1.2343 1.83486,-1.1545 3.36329,-2.7146 4.84128,-4.2843 0.59391,-0.6589 1.231686,-1.3135 1.691186,-2.07745 1.507243,-0.1922 3.062275,-0.4411 4.494843,-0.95786 1.289854,-0.4483 2.373109,-1.2254 3.393811,-2.1271 C 0.4518583,95.09462 2.040699,93.14682 3.247074,91.01718 4.807531,88.26202 5.61237,85.15871 5.791337,82.00254 5.874995,80.36609 5.903956,78.65916 5.52026,77.05769 5.319404,76.14681 4.855366,75.37874 4.451996,74.54987 4.127542,74.01532 3.597233,73.60726 3.147014,73.17872 3.411709,72.47842 3.713112,71.72232 3.986172,71.02522 4.23113,70.3734 4.493048,69.74276 4.502219,69.03581 4.490243,68.77072 4.478417,68.5295 4.335923,68.30692 4.228834,68.0611 3.881507,67.86702 3.644595,67.94579 Z M 84.34138,27.23312 c -0.44529,0.30974 -0.73781,0.82929 -0.96576,1.30286 -0.49868,1.19226 -0.84985,2.41005 -1.19581,3.65561 -0.0134,0.38195 -0.31995,0.6064 -0.60367,0.8142 -1.49202,1.12658 -3.19135,2.01226 -4.84903,2.86523 -1.48238,0.7039 -3.03923,1.08073 -4.61349,1.52602 -1.73034,0.45151 -3.50929,0.96835 -5.1806,1.6104 -2.52066,0.95987 -5.01271,2.21913 -6.95033,4.13381 -1.39268,1.38454 -2.51575,3.10043 -2.93119,5.04391 -0.35303,1.63509 -0.0503,3.34506 0.79699,4.7797 0.18065,0.30603 0.54465,0.52636 0.89412,0.35983 0.34226,-0.11634 0.3347,-0.47788 0.31997,-0.77199 -0.0848,-0.81581 -0.25089,-1.65643 -0.33823,-2.47136 -0.13274,-1.50954 0.22115,-3.055 1.07052,-4.30364 1.17803,-1.7495 2.94832,-3.01432 4.76145,-4.04062 1.79931,-1.04737 3.78417,-1.68472 5.7853,-2.22179 2.24001,-0.55279 4.52213,-1.20351 6.59618,-2.22637 2.14382,-1.07908 4.236,-2.34304 6.01868,-3.96652 1.09963,-0.9973 1.97387,-2.18563 2.57492,-3.54183 0.34801,-0.81975 0.56687,-1.87986 0.14692,-2.71709 -0.0326,-0.0618 -0.0587,-0.0294 -0.12187,-0.0399 -0.40531,-0.0134 -0.85125,0.0138 -1.21507,0.20949 z M 2.427234,74.96673 c 0.456568,0.48824 0.909598,1.02103 1.225372,1.61484 0.468456,0.92468 0.679978,1.92867 0.786881,2.95527 0.210304,2.25367 -0.08056,4.48052 -0.692406,6.65317 -0.559423,2.04637 -1.497093,4.07018 -2.7651302,5.77262 -1.3115275,1.73179 -2.8039138,3.27659 -4.6782688,4.40516 -1.612401,0.9746 -3.469514,1.4245 -5.301216,1.7732 0.170959,-0.588 0.402284,-1.1832 0.638658,-1.7473 1.155587,-2.67049 2.547857,-5.18515 3.889255,-7.76556 1.217808,-2.22655 2.374788,-4.43617 3.6523103,-6.62906 1.167,-2.29088 2.2681597,-4.65392 3.2445447,-7.03234 z M 67.57768,45.49074 c -0.40824,0.51869 -0.65747,1.19128 -0.92255,1.78906 -0.77112,1.92416 -1.40303,3.9042 -2.11606,5.85014 -0.37711,-0.0795 -0.70887,-0.15598 -1.09544,-0.15599 -0.80485,0.0562 -1.65431,0.15898 -2.38921,0.50001 -0.54262,0.23471 -1.00247,0.81467 -1.00553,1.42467 -0.0125,0.65937 0.28025,1.26591 0.61823,1.82102 0.19269,0.30721 0.62399,0.41362 0.93384,0.23791 0.25865,-0.20483 -0.0233,-0.60861 -0.0456,-0.89172 -0.11716,-0.41205 -9.8e-4,-0.97738 0.39868,-1.21849 0.61623,-0.34207 1.36665,-0.39943 2.06581,-0.33591 -0.29342,0.83003 -0.60125,1.64213 -0.87804,2.47803 -0.68239,2.01201 -1.38392,4.01984 -2.39955,5.89223 -0.40569,0.69471 -0.87052,1.47764 -1.57051,1.91444 -0.2436,0.19761 -0.58781,0.0269 -0.65024,-0.28006 -0.11846,-0.66994 0.11465,-1.31641 0.11053,-1.98724 0.026,-0.40586 -0.50349,-0.51619 -0.77232,-0.32033 -0.47107,0.23275 -0.51019,0.82958 -0.56006,1.30084 -0.0412,0.74969 -0.0571,1.53887 0.13421,2.26947 0.0965,0.4567 0.52894,0.68786 0.93734,0.8463 0.33925,0.12123 0.72093,0.31845 1.0546,0.0752 1.13476,-0.66883 1.86086,-1.76917 2.49748,-2.89241 0.80854,-1.47937 1.43701,-3.02351 2.04187,-4.59314 0.55641,-1.42495 0.98258,-2.92606 1.43479,-4.38682 0.40943,0.13296 0.82724,0.25765 1.25852,0.27659 1.20605,0.002 2.39949,-0.45257 3.48144,-0.95177 0.49764,-0.24958 0.96783,-0.48357 1.41439,-0.81904 0.30554,-0.22955 0.43632,-0.60767 0.23808,-0.93352 -0.1089,-0.12169 -0.30739,-0.0981 -0.44633,-0.0786 -0.98003,0.26008 -1.85222,0.76692 -2.83228,1.02947 -0.83284,0.27812 -1.74628,0.25605 -2.59436,0.0957 0.58821,-1.64321 1.10463,-3.33293 1.63425,-4.99607 0.27019,-0.90457 0.63563,-1.78047 0.75504,-2.72064 0.10464,-0.46041 -0.51446,-0.48396 -0.73106,-0.23921 z M 108.587,27.34034 c -0.5756,0.21291 -1.0637,0.63797 -1.4942,1.0625 -1.2491,1.30533 -2.1554,2.83975 -3.0567,4.39586 -0.6837,1.16248 -1.2916,2.41268 -1.8038,3.65925 -0.6921,1.70299 -1.3276,3.43084 -1.8359,5.19987 -0.049,0.19961 -0.1524,0.40484 -0.1993,0.60913 -0.94679,1.00158 -1.81659,2.10992 -2.82088,3.05653 -0.80208,0.76949 -1.74266,1.34726 -2.82893,1.63756 -0.36113,0.0994 -0.86059,0.11619 -1.05557,-0.27759 -0.19029,-0.4666 0.0329,-0.92335 0.23564,-1.33951 0.45357,-0.6488 0.93472,-1.30494 1.32676,-1.99428 0.70139,-1.2598 1.45703,-2.51591 1.88377,-3.90256 0.16037,-0.58656 0.31526,-1.26446 -0.0103,-1.82445 -0.16833,-0.32477 -0.64194,-0.44311 -0.97481,-0.31881 -0.3752,0.0757 -0.56015,0.39672 -0.76645,0.69358 -0.94888,1.37515 -1.77373,2.86546 -2.44848,4.39241 -0.52354,1.23776 -1.03607,2.5383 -1.07287,3.89828 2.6e-4,0.15051 0.10558,0.28844 0.12417,0.44513 -0.82115,0.89795 -1.6121,1.85468 -2.4986,2.68997 -0.80207,0.76946 -1.74277,1.34729 -2.82892,1.63752 -0.36114,0.0994 -0.8606,0.1162 -1.05557,-0.27758 -0.051,-0.12483 -0.087,-0.23813 -0.0832,-0.36466 0.0491,-0.0826 0.0532,-0.15475 0.0798,-0.2436 0.0161,-0.0708 -0.0259,-0.13347 -10e-4,-0.20283 0.0674,-0.18911 0.15715,-0.35786 0.24029,-0.52844 0.45355,-0.64879 0.93461,-1.30486 1.32665,-1.99422 0.70138,-1.25978 1.45712,-2.51596 1.88377,-3.90256 0.16039,-0.58656 0.3153,-1.26446 -0.0102,-1.82446 -0.1683,-0.32478 -0.56117,-0.48408 -0.89395,-0.3598 -0.37513,0.0757 -0.64104,0.43772 -0.84734,0.73457 -0.94888,1.37517 -1.77373,2.8655 -2.44846,4.39244 -0.52355,1.23776 -0.95512,2.49723 -0.99192,3.85718 3e-4,0.15521 0.0233,0.32499 0.0431,0.48627 -0.2068,0.26019 -0.42429,0.48551 -0.6445,0.73339 -0.66564,0.81193 -1.44461,1.53316 -2.2173,2.24238 -0.91197,0.83065 -1.83072,1.66993 -2.90617,2.28682 -0.2574,0.13585 -0.61018,0.38297 -0.85083,0.12623 -0.42004,-0.66561 -0.30999,-1.54199 -0.0125,-2.22966 0.47338,-1.1191 1.37209,-2.03793 2.17289,-2.9314 0.4866,-0.58312 1.06558,-1.0558 1.32792,-1.79129 0.15516,-0.37077 -0.0611,-0.80107 -0.33039,-1.05254 -0.36439,-0.36104 -0.91542,-0.21957 -1.29687,0.0482 -0.87078,0.61958 -1.12644,1.76762 -1.89168,2.48385 -0.24434,0.25414 -0.6908,0.38575 -0.97261,0.0863 -0.29737,-0.36448 -0.50579,-0.74806 -0.77669,-1.13091 -0.37854,-0.35766 -0.91649,-0.21501 -1.2972,0.0478 -0.43013,0.44401 -0.61101,1.05528 -0.80171,1.62642 -0.30997,1.09707 -0.5985,2.19824 -0.75159,3.32887 -0.0766,0.36508 0.0478,0.78906 0.33017,1.05186 0.24866,0.31352 0.74918,0.32089 1.05454,0.0753 0.23646,-0.45019 0.33148,-0.97776 0.47851,-1.462 0.17355,-0.54985 0.26331,-1.06603 0.51802,-1.58425 0.30333,-0.14599 0.72527,-0.10802 1.05348,-0.12753 0.39537,-0.11337 0.17868,0.21655 0.12418,0.44514 -0.28139,1.1268 -0.72334,2.2817 -0.79159,3.45069 -0.0556,0.45818 0.28452,0.81111 0.69465,0.96907 0.60938,0.23618 1.2759,0.30015 1.90643,0.15137 0.51295,-0.18962 0.94672,-0.53826 1.41442,-0.81865 0.80765,-0.49219 1.56879,-1.15472 2.2197,-1.83675 0.97916,-0.97548 1.84894,-2.00675 2.69895,-3.09649 0.0479,0.0458 0.106,0.0817 0.1628,0.12062 0.64825,0.40664 1.43003,0.39853 2.15018,0.23119 1.62369,-0.40653 3.0006,-1.45615 4.16132,-2.61803 0.54746,-0.56458 1.02834,-1.18692 1.53056,-1.79253 0.0487,0.0469 0.10473,0.0809 0.16291,0.12057 0.64816,0.40668 1.5108,0.35758 2.23096,0.19024 1.62358,-0.40648 3.00058,-1.45613 4.16135,-2.61804 0.5752,-0.59294 1.04637,-1.27513 1.57039,-1.91426 0.3306,0.50844 0.9318,0.90306 1.5452,0.84262 0.6209,-0.058 1.1063,-0.49969 1.6173,-0.82001 1.411,-0.99141 2.8149,-2.08784 3.9949,-3.34701 0.7577,-0.83156 1.4004,-1.7547 2.1342,-2.6068 0.163,-0.19111 0.2521,-0.40348 0.4019,-0.61041 0.057,0.0414 0.095,0.0912 0.163,0.12082 0.6471,0.24727 1.4292,0.10517 2.0258,-0.21405 1.0007,-0.57377 1.8278,-1.38041 2.6639,-2.16379 -0.887,2.33035 -1.6659,4.72451 -2.5146,7.06867 -0.09,0.34783 -0.3725,0.59664 -0.5626,0.89526 -1.1381,1.79428 -2.2801,3.54909 -3.3753,5.37081 -1.1337,1.86045 -2.1368,3.83844 -3.0488,5.81439 -0.8639,1.85902 -1.5971,3.72816 -2.1979,5.6887 -0.4054,1.35914 -0.8009,2.75281 -0.8279,4.18066 0.01,0.56235 0.056,1.28816 0.5362,1.65904 0.2644,0.16946 0.5677,0.39002 0.894,0.35988 0.3604,-0.11198 0.7026,-0.43718 0.9691,-0.69454 0.9078,-0.95916 1.4468,-2.13754 1.968,-3.33561 0.4515,-1.13583 0.8492,-2.34916 1.2776,-3.49399 1.2152,-3.36573 2.5437,-6.66788 3.7549,-10.03506 0.9621,-2.73266 1.866,-5.44685 2.7514,-8.20547 0.4073,-0.56807 0.8315,-1.18812 1.2472,-1.75047 1.4147,-1.94219 2.9498,-3.75943 4.4687,-5.62009 0.7836,-1.00486 1.6867,-1.86626 2.5386,-2.8118 0.1928,-0.26571 0.5476,-0.54901 0.5624,-0.89527 -0.059,-0.12396 -0.1826,-0.23081 -0.3256,-0.24109 -0.4184,0.001 -0.7216,0.35193 -1.0102,0.61374 -1.7327,1.82561 -3.54,3.60423 -5.2808,5.4219 -0.1074,0.0686 -0.3797,0.56052 -0.2823,0.24505 0.3567,-1.28913 0.89,-2.48622 1.3574,-3.73794 0.2095,-0.60908 0.4006,-1.223 0.4759,-1.86749 -0.05,-0.30552 -0.4163,-0.76694 -0.7322,-0.44195 -0.578,0.55875 -0.9229,1.24934 -1.3677,1.91353 -0.6853,1.01979 -1.3454,2.06386 -2.1319,3.01189 -0.6412,0.75965 -1.3592,1.50246 -2.3005,1.87795 -0.3221,0.16388 -0.8377,0.008 -0.8132,-0.40083 0.01,-0.85891 0.1689,-1.73866 0.4317,-2.55668 0.2897,-0.8091 0.8016,-1.48154 1.204,-2.23653 0.1252,-0.25333 0.3673,-0.76509 -0.046,-0.89194 -0.3506,-0.006 -0.6089,0.30821 -0.8483,0.53194 -0.7167,0.77318 -1.2945,1.71039 -1.6877,2.68549 -0.3394,0.91019 -0.5556,1.82217 -0.5116,2.8002 0.01,0.10625 0.064,0.25344 0.083,0.36445 -0.41,0.45005 -0.8542,0.88179 -1.249,1.34493 -0.5644,0.7076 -1.1629,1.40888 -1.8131,2.03743 -0.9711,0.94404 -1.927,1.85472 -3.0258,2.65233 -0.313,0.21394 -0.7272,0.49491 -1.0932,0.24935 -0.44,-0.3611 -0.4112,-0.95229 -0.3327,-1.45795 0.2399,-1.28812 0.802,-2.56009 1.3574,-3.73758 0.4514,-0.73946 0.9554,-1.44295 1.4477,-2.15683 0.7906,-1.15737 1.7293,-2.22374 2.5758,-3.33894 0.5342,-0.71253 1.0961,-1.36146 1.5695,-2.11713 0.3464,-0.5816 0.6406,-1.33431 0.313,-1.98845 -0.1035,-0.24997 -0.3922,-0.37474 -0.65,-0.28008 z M 8.027858,83.20618 c -0.430011,0.44396 -0.611007,1.05528 -0.801615,1.62636 -0.309961,1.09709 -0.598498,2.19825 -0.751578,3.32889 -0.07666,0.36513 0.04761,0.78916 0.330053,1.0519 0.248667,0.31352 0.749202,0.32088 1.054572,0.0753 0.236528,-0.45025 0.331458,-0.97777 0.478468,-1.46202 0.17358,-0.54984 0.34419,-1.10703 0.59902,-1.62527 0.30332,-0.14599 0.644409,-0.067 0.972499,-0.0865 0.395373,-0.11338 0.178683,0.21657 0.124163,0.44516 -0.281263,1.12673 -0.723312,2.28169 -0.791472,3.45064 -0.0557,0.45823 0.284529,0.81111 0.694549,0.96913 0.609413,0.23617 1.356883,0.25908 1.987293,0.11038 0.51296,-0.18963 0.94674,-0.53826 1.41445,-0.81869 0.80761,-0.49216 1.4879,-1.1137 2.13882,-1.79574 0.99833,-0.99456 1.91614,-2.02417 2.77979,-3.13748 0.23311,0.3408 0.56864,0.62053 0.97721,0.72417 0.78253,0.23795 1.52756,-0.0898 2.18643,-0.49897 1.77886,-1.08183 3.09285,-2.79952 4.06908,-4.60399 0.24959,0.17593 0.5237,0.34658 0.77324,0.52265 0.39105,0.34338 0.94057,0.39609 1.42025,0.19486 1.5733,-0.74066 2.93723,-1.88327 4.07697,-3.1853 0.30325,-0.36253 0.58892,-0.69103 0.88598,-1.05927 0.004,0.0382 -0.0441,0.0835 -0.0397,0.12208 0.025,0.46893 0.25491,0.91036 0.61492,1.21279 0.41371,0.36322 0.97534,0.24393 1.41894,-0.008 0.93376,-0.57613 1.82908,-1.22274 2.70594,-1.88037 1.6555,-1.20948 2.99389,-2.76548 4.31387,-4.32191 0.10169,0.51946 0.26151,1.00284 0.45439,1.49763 0.14699,0.4596 0.70811,0.55231 1.09671,0.3589 0.50778,-0.27775 0.77554,-0.79541 1.08761,-1.263 0.63634,-1.06045 1.20036,-2.17586 1.80614,-3.25381 0.64763,-1.25323 1.57129,-2.38589 2.37234,-3.54039 0.14839,-0.26749 0.35821,-0.52946 0.27882,-0.85317 l -0.041,-0.0808 c -0.15866,-0.36449 -0.59992,-0.38643 -0.8928,-0.15733 -0.68269,0.47276 -1.11497,1.1812 -1.61154,1.83359 -0.74093,1.04745 -1.43576,2.13663 -2.13086,3.21478 -0.15769,0.24295 -0.58953,-0.0952 -0.85172,-0.0763 -0.47343,-0.0646 -1.04759,-0.1831 -1.45895,0.12975 -0.83666,0.70485 -1.48376,1.59356 -2.25706,2.36442 -0.76047,0.81844 -1.70295,1.46972 -2.54194,2.20356 -0.72325,0.60498 -1.37524,1.24182 -2.1387,1.79595 -0.25523,0.1914 -0.72442,0.15763 -0.73122,-0.23927 -0.003,-0.53444 0.12317,-1.01967 0.23472,-1.54183 0.12416,-0.20867 0.31687,-0.41102 0.28023,-0.65019 -0.0256,-0.0524 -0.0858,-0.0111 -0.12191,-0.04 -0.024,-0.0191 -0.0136,-0.0707 -0.041,-0.0809 0.21386,-0.88848 0.62144,-1.6733 0.95878,-2.51922 0.0716,-0.26898 0.29503,-0.5987 0.0765,-0.85159 -0.27167,-0.35581 -0.73367,-0.26947 -1.05457,-0.0753 -0.38057,0.31308 -0.6152,0.78067 -0.80403,1.22087 -0.33416,0.88123 -0.54692,1.86521 -0.83591,2.76162 -0.14181,0.38894 -0.20368,0.72862 -0.23691,1.1366 -0.31448,0.39289 -0.6136,0.78713 -0.92581,1.18095 -0.78684,1.07995 -1.75697,1.99637 -2.90405,2.69225 -0.34382,0.15145 -0.69029,0.58305 -1.09215,0.45212 -0.27052,-0.15947 -0.44751,-0.45749 -0.49087,-0.76763 -0.013,-0.71143 0.37105,-1.31496 0.63757,-1.94988 0.12414,-0.34046 0.38906,-0.72474 0.35886,-1.09654 -0.15283,-0.28555 -0.43164,-0.66009 -0.81435,-0.60371 -0.44381,0.16732 -0.72772,0.49182 -0.96793,0.89737 -0.20124,0.008 -0.5557,-0.19892 -0.81193,-0.19795 -0.789,-0.12536 -1.55883,0.23498 -2.22649,0.6204 -1.95676,1.06222 -3.78316,2.4943 -4.83991,4.48736 -0.40852,0.77273 -0.69846,1.67701 -0.63434,2.55767 -0.24232,0.30222 -0.50867,0.60754 -0.76541,0.89617 -0.66551,0.8119 -1.36363,1.49212 -2.13642,2.20138 -0.91188,0.83059 -1.83072,1.66994 -2.90629,2.2869 -0.25738,0.13584 -0.60997,0.38286 -0.85073,0.12615 -0.42002,-0.6656 -0.30998,-1.54199 -0.0125,-2.22967 0.47336,-1.1191 1.29122,-1.99691 2.09202,-2.89038 0.48659,-0.58314 1.14643,-1.09682 1.40887,-1.83235 0.15506,-0.37071 -0.14194,-0.76007 -0.41135,-1.01149 -0.3644,-0.36102 -0.91542,-0.21955 -1.29687,0.0482 -0.87089,0.61966 -1.12643,1.76767 -1.89169,2.48388 -0.24433,0.25415 -0.69079,0.38575 -0.9726,0.0863 -0.297373,-0.36427 -0.424913,-0.78887 -0.695842,-1.1717 -0.37852,-0.35765 -0.99736,-0.17401 -1.37805,0.0888 z M 23.77341,78.5769 c 0.26028,-0.11506 0.6484,-0.45809 0.85076,-0.12616 0.0618,0.23577 0.10732,0.52726 0.0854,0.76963 -0.12009,1.06008 -0.73234,1.89476 -1.36325,2.72392 -0.70964,0.87819 -1.45831,1.83402 -2.41877,2.44645 -0.27876,0.14497 -0.56478,0.35889 -0.89066,0.24816 -0.34842,-0.19417 -0.44646,-0.6457 -0.41096,-1.011 0.1161,-0.85413 0.5776,-1.60339 1.08178,-2.27667 0.85511,-1.06945 1.861,-2.09499 3.0657,-2.77433 z M 125.8707,29.55418 c -0.4946,0.46664 -0.6267,1.28187 -0.1921,1.82564 0.3278,0.45658 0.9812,0.52547 1.461,0.27568 0.642,-0.27303 0.8625,-1.12938 0.5582,-1.70606 -0.078,-0.15213 -0.2086,-0.32088 -0.3268,-0.44394 -0.3794,-0.43344 -1.0838,-0.29549 -1.5003,0.0487 z M -15.7895,101.5847 c 0.63297,-0.2927 1.31152,-0.5129 1.98257,-0.7006 0.80496,-0.2101 1.66439,-0.3322 2.47002,-0.5409 -0.4517,0.6007 -1.08289,1.1004 -1.61261,1.6308 -1.17175,1.1112 -2.33239,2.2716 -3.67148,3.1833 -0.66574,0.4156 -1.38901,0.7691 -2.14338,0.9849 -0.4836,0.1198 -1.07809,0.1274 -1.46097,-0.2755 -0.32097,-0.2916 0.0481,-0.681 0.23788,-0.934 0.73022,-0.8689 1.51789,-1.5567 2.41997,-2.2437 0.55539,-0.4269 1.14465,-0.8121 1.778,-1.1043 z M 110.6847,47.11398 c -0.025,0.25642 -0.093,0.44167 -0.1585,0.69033 -0.3699,1.30782 -0.8329,2.61461 -1.2755,3.89914 -1.1569,3.19693 -2.333,6.38473 -3.4734,9.58761 -0.3858,0.9793 -0.8061,1.97284 -1.4031,2.84604 -0.1843,0.21269 -0.4536,0.71991 -0.7673,0.49101 -0.2743,-0.26078 -0.1621,-0.72543 -0.1278,-1.05378 0.3111,-1.85091 0.8375,-3.62214 1.4294,-5.39992 0.8373,-2.56748 2.1123,-4.95415 3.4051,-7.31724 0.7255,-1.28909 1.4282,-2.5965 2.3711,-3.74319 z" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10px;line-height:100%;font-family:Pushkin;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none" inkscape:connector-curvature="0" />
-<path id="path1790" d="m 84.87396,19.36488 -4.9936,0 0,0.31955 0.14957,0 c 0.67301,0 0.74773,0.0342 0.74773,0.31968 l 0,0.197 0,3.23589 0,0.19726 c 0,0.28537 -0.0747,0.31942 -0.74773,0.31942 l -0.14957,0 0,0.31955 5.10156,0 0.16619,-1.81515 -0.36562,0 c -0.10782,0.47574 -0.29915,0.89731 -0.49844,1.09457 -0.25767,0.27186 -0.73125,0.40103 -1.42912,0.40103 l -0.54844,0 c -0.24928,0 -0.45696,-0.0407 -0.53181,-0.10201 -0.058,-0.0405 -0.0663,-0.0815 -0.0663,-0.22416 l 0,-1.73354 0.16619,0 c 0.50668,0 0.71449,0.0407 0.88082,0.18336 0.21578,0.177 0.29901,0.39453 0.31563,0.79542 l 0.39048,0 0,-2.22968 -0.39048,0 c -0.0416,0.66626 -0.374,0.93136 -1.16335,0.93136 l -0.19929,0 0,-1.55005 c 0,-0.29226 0.0748,-0.33995 0.52343,-0.33995 l 0.43197,0 c 0.73125,0 1.08849,0.0613 1.37115,0.25172 0.27415,0.17673 0.47345,0.55735 0.59816,1.16915 l 0.35738,0 -0.11647,-1.74042 z m -11.02598,2.72609 0.93892,0 c 0.74787,0 1.13835,-0.0476 1.47087,-0.17659 0.58978,-0.23132 0.92216,-0.66639 0.92216,-1.20334 0,-0.51642 -0.2909,-0.91095 -0.8392,-1.13525 -0.32401,-0.13579 -0.8392,-0.21091 -1.4125,-0.21091 l -2.90809,0 0,0.31955 0.14957,0 c 0.67301,0 0.74773,0.0342 0.74773,0.31968 l 0,0.197 0,3.23589 0,0.19726 c 0,0.28537 -0.0747,0.31942 -0.74773,0.31942 l -0.14957,0 0,0.31955 2.79176,0 0,-0.31955 -0.21619,0 c -0.67301,0 -0.74773,-0.034 -0.74773,-0.31942 l 0,-0.19726 0,-1.34603 z m 0,-0.31941 0,-1.74029 c 0,-0.31266 0.05,-0.34684 0.50696,-0.34684 l 0.53181,0 c 0.86407,0 1.27117,0.33319 1.27117,1.05376 0,0.70031 -0.42372,1.03337 -1.30441,1.03337 l -1.00553,0 z m -7.22869,-2.50167 -0.34886,0 -1.91122,3.96308 c -0.16605,0.3536 -0.19929,0.40129 -0.32387,0.50993 -0.13309,0.12917 -0.36576,0.21078 -0.59018,0.21078 l -0.0331,0 0,0.31955 2.20185,0 0,-0.31955 -0.16633,0 c -0.44845,0 -0.67288,-0.12917 -0.67288,-0.38738 0,-0.0817 0.025,-0.17673 0.0747,-0.2855 l 0.27429,-0.59829 2.20184,0 0.44872,0.91095 c 0.0499,0.10201 0.0665,0.14944 0.0665,0.18362 0,0.10863 -0.20794,0.1766 -0.5152,0.1766 l -0.349,0 0,0.31955 2.57584,0 0,-0.31955 -0.11633,0 c -0.41562,0 -0.50695,-0.0543 -0.69801,-0.43494 L 66.6193,19.26989 Z m -0.4071,1.11484 0.93878,1.93067 -1.86121,0 0.92243,-1.93067 z m -5.73323,-1.06728 -0.31576,0 -0.33225,0.40116 C 59.24076,19.36488 58.91702,19.263 58.36021,19.263 c -0.80596,0 -1.47073,0.26523 -2.03565,0.81569 -0.53182,0.51669 -0.7811,1.08769 -0.7811,1.78799 0,1.46168 1.17145,2.50856 2.80851,2.50856 1.3294,0 2.17685,-0.6391 2.36804,-1.78123 l -0.39049,-0.0543 c -0.0831,0.36036 -0.18294,0.60491 -0.33252,0.80894 -0.34049,0.46912 -0.8723,0.70719 -1.54545,0.70719 -1.22969,0 -1.81122,-0.70043 -1.81122,-2.16185 0,-0.7684 0.12444,-1.28495 0.40696,-1.69286 0.25767,-0.38062 0.77273,-0.61869 1.30468,-0.61869 0.58154,0 1.09673,0.25158 1.4125,0.68679 0.15782,0.22429 0.28253,0.48939 0.47372,1.01283 l 0.36521,0 -0.12444,-1.96459 z m -8.31718,0.007 -0.30739,0 -0.33238,0.40791 c -0.39062,-0.3059 -0.9223,-0.46912 -1.51222,-0.46912 -1.08849,0 -1.8196,0.571 -1.8196,1.42101 0,0.74084 0.44845,1.10795 1.6699,1.36629 l 0.78934,0.16322 c 0.61491,0.12904 0.67301,0.14268 0.84758,0.25159 0.24929,0.15619 0.38224,0.38048 0.38224,0.64572 0,0.27185 -0.12471,0.49614 -0.37386,0.6799 -0.27429,0.197 -0.5483,0.27185 -1.0054,0.27185 -0.61491,0 -1.05525,-0.15646 -1.44573,-0.50993 -0.34901,-0.31968 -0.52344,-0.63909 -0.64802,-1.16253 l -0.35738,0 0.0332,1.93756 0.32414,0 0.37373,-0.46237 c 0.55668,0.37387 1.02229,0.50993 1.74489,0.50993 1.22144,0 2.00254,-0.58451 2.00254,-1.49573 0,-0.42143 -0.17456,-0.78165 -0.49844,-1.03999 -0.22442,-0.17673 -0.54843,-0.29239 -1.21334,-0.42831 l -0.88906,-0.18349 c -0.73935,-0.15633 -1.08835,-0.42156 -1.08835,-0.83623 0,-0.47574 0.47358,-0.80232 1.17983,-0.80232 0.58167,0 1.05511,0.20416 1.3875,0.59154 0.24105,0.27874 0.39048,0.56424 0.49871,0.91095 l 0.35725,0 -0.0997,-1.76745 z m -11.23365,2.72609 0,-1.84919 0,-0.197 c 0,-0.2855 0.0746,-0.31968 0.74773,-0.31968 l 0.15795,0 0,-0.31955 -2.73366,0 0,0.31955 0.14957,0 c 0.67301,0 0.7476,0.0342 0.7476,0.31968 l 0,0.197 0,3.23589 0,0.19726 c 0,0.28537 -0.0746,0.31942 -0.7476,0.31942 l -0.14957,0 0,0.31955 2.73366,0 0,-0.31955 -0.15795,0 c -0.67315,0 -0.74773,-0.0341 -0.74773,-0.31942 l 0,-0.19726 0,-0.86326 0.96378,-0.79542 1.44574,1.73353 c 0.13309,0.16308 0.16619,0.21754 0.16619,0.28563 0,0.10864 -0.15768,0.1562 -0.56492,0.1562 l -0.25766,0 0,0.31955 2.84161,0 0,-0.31955 -0.15781,0 c -0.45696,0 -0.57343,-0.0476 -0.81434,-0.33982 l -2.01066,-2.37263 1.23806,-1.01283 c 0.39873,-0.3467 0.90555,-0.54397 1.40413,-0.54397 l 0,-0.31955 -2.55923,0 0,0.31955 0.20794,0 c 0.38225,0 0.53993,0.0613 0.53993,0.20402 0,0.0951 -0.1662,0.29226 -0.40711,0.48939 l -2.03565,1.67246 z m -9.28947,-2.68542 -1.71165,0 0,0.31955 0.20781,0 c 0.42372,0 0.61491,0.0544 0.76435,0.22456 l 0,2.88904 c 0,0.93136 -0.16619,1.12849 -0.96378,1.15565 l 0,0.31955 2.36817,0 0,-0.31955 c -0.78962,-0.0272 -0.95567,-0.22429 -0.95567,-1.15565 l 0,-2.52207 3.70595,4.09252 0.34887,0 0,-3.52827 c 0,-0.93122 0.16606,-1.12849 0.96378,-1.15578 l 0,-0.31955 -2.36804,0 0,0.31955 c 0.78935,0.0273 0.95554,0.22456 0.95554,1.15578 l 0,2.13455 -3.31533,-3.60988 z m -5.40071,0.83623 0,-0.197 c 0,-0.2855 0.0747,-0.31968 0.73935,-0.31968 l 0.16619,0 0,-0.31955 -2.75014,0 0,0.31955 0.16619,0 c 0.67301,0 0.74773,0.0342 0.74773,0.31968 l 0,0.197 0,3.23589 0,0.19726 c 0,0.28537 -0.0747,0.31942 -0.74773,0.31942 l -0.16619,0 0,0.31955 2.75014,0 0,-0.31955 -0.16619,0 c -0.66463,0 -0.73935,-0.0341 -0.73935,-0.31942 l 0,-0.19726 0,-3.23589 z" style="fill:#000000;fill-opacity:1;stroke-width:1pt" inkscape:connector-curvature="0" />
-<g id="g7535">
+<path id="path1790" d="m 84.87396,19.36488 h -4.9936 v 0.31955 h 0.14957 c 0.67301,0 0.74773,0.0342 0.74773,0.31968 v 0.197 3.23589 0.19726 c 0,0.28537 -0.0747,0.31942 -0.74773,0.31942 h -0.14957 v 0.31955 h 5.10156 l 0.16619,-1.81515 h -0.36562 c -0.10782,0.47574 -0.29915,0.89731 -0.49844,1.09457 -0.25767,0.27186 -0.73125,0.40103 -1.42912,0.40103 h -0.54844 c -0.24928,0 -0.45696,-0.0407 -0.53181,-0.10201 -0.058,-0.0405 -0.0663,-0.0815 -0.0663,-0.22416 v -1.73354 h 0.16619 c 0.50668,0 0.71449,0.0407 0.88082,0.18336 0.21578,0.177 0.29901,0.39453 0.31563,0.79542 h 0.39048 v -2.22968 h -0.39048 c -0.0416,0.66626 -0.374,0.93136 -1.16335,0.93136 h -0.19929 v -1.55005 c 0,-0.29226 0.0748,-0.33995 0.52343,-0.33995 h 0.43197 c 0.73125,0 1.08849,0.0613 1.37115,0.25172 0.27415,0.17673 0.47345,0.55735 0.59816,1.16915 h 0.35738 L 84.874,19.36488 Z m -11.02598,2.72609 h 0.93892 c 0.74787,0 1.13835,-0.0476 1.47087,-0.17659 0.58978,-0.23132 0.92216,-0.66639 0.92216,-1.20334 0,-0.51642 -0.2909,-0.91095 -0.8392,-1.13525 -0.32401,-0.13579 -0.8392,-0.21091 -1.4125,-0.21091 h -2.90809 v 0.31955 h 0.14957 c 0.67301,0 0.74773,0.0342 0.74773,0.31968 v 0.197 3.23589 0.19726 c 0,0.28537 -0.0747,0.31942 -0.74773,0.31942 h -0.14957 v 0.31955 h 2.79176 v -0.31955 h -0.21619 c -0.67301,0 -0.74773,-0.034 -0.74773,-0.31942 V 23.437 Z m 0,-0.31941 v -1.74029 c 0,-0.31266 0.05,-0.34684 0.50696,-0.34684 h 0.53181 c 0.86407,0 1.27117,0.33319 1.27117,1.05376 0,0.70031 -0.42372,1.03337 -1.30441,1.03337 z m -7.22869,-2.50167 h -0.34886 l -1.91122,3.96308 c -0.16605,0.3536 -0.19929,0.40129 -0.32387,0.50993 -0.13309,0.12917 -0.36576,0.21078 -0.59018,0.21078 h -0.0331 v 0.31955 h 2.20185 v -0.31955 h -0.16633 c -0.44845,0 -0.67288,-0.12917 -0.67288,-0.38738 0,-0.0817 0.025,-0.17673 0.0747,-0.2855 l 0.27429,-0.59829 h 2.20184 l 0.44872,0.91095 c 0.0499,0.10201 0.0665,0.14944 0.0665,0.18362 0,0.10863 -0.20794,0.1766 -0.5152,0.1766 h -0.349 v 0.31955 h 2.57584 v -0.31955 h -0.11633 c -0.41562,0 -0.50695,-0.0543 -0.69801,-0.43494 L 66.6193,19.26989 Z m -0.4071,1.11484 0.93878,1.93067 H 65.28976 Z M 60.47896,19.31745 H 60.1632 l -0.33225,0.40116 C 59.24076,19.36488 58.91702,19.263 58.36021,19.263 c -0.80596,0 -1.47073,0.26523 -2.03565,0.81569 -0.53182,0.51669 -0.7811,1.08769 -0.7811,1.78799 0,1.46168 1.17145,2.50856 2.80851,2.50856 1.3294,0 2.17685,-0.6391 2.36804,-1.78123 l -0.39049,-0.0543 c -0.0831,0.36036 -0.18294,0.60491 -0.33252,0.80894 -0.34049,0.46912 -0.8723,0.70719 -1.54545,0.70719 -1.22969,0 -1.81122,-0.70043 -1.81122,-2.16185 0,-0.7684 0.12444,-1.28495 0.40696,-1.69286 0.25767,-0.38062 0.77273,-0.61869 1.30468,-0.61869 0.58154,0 1.09673,0.25158 1.4125,0.68679 0.15782,0.22429 0.28253,0.48939 0.47372,1.01283 h 0.36521 l -0.12444,-1.96459 z m -8.31718,0.007 h -0.30739 l -0.33238,0.40791 c -0.39062,-0.3059 -0.9223,-0.46912 -1.51222,-0.46912 -1.08849,0 -1.8196,0.571 -1.8196,1.42101 0,0.74084 0.44845,1.10795 1.6699,1.36629 l 0.78934,0.16322 c 0.61491,0.12904 0.67301,0.14268 0.84758,0.25159 0.24929,0.15619 0.38224,0.38048 0.38224,0.64572 0,0.27185 -0.12471,0.49614 -0.37386,0.6799 -0.27429,0.197 -0.5483,0.27185 -1.0054,0.27185 -0.61491,0 -1.05525,-0.15646 -1.44573,-0.50993 -0.34901,-0.31968 -0.52344,-0.63909 -0.64802,-1.16253 h -0.35738 l 0.0332,1.93756 h 0.32414 l 0.37373,-0.46237 c 0.55668,0.37387 1.02229,0.50993 1.74489,0.50993 1.22144,0 2.00254,-0.58451 2.00254,-1.49573 0,-0.42143 -0.17456,-0.78165 -0.49844,-1.03999 -0.22442,-0.17673 -0.54843,-0.29239 -1.21334,-0.42831 l -0.88906,-0.18349 c -0.73935,-0.15633 -1.08835,-0.42156 -1.08835,-0.83623 0,-0.47574 0.47358,-0.80232 1.17983,-0.80232 0.58167,0 1.05511,0.20416 1.3875,0.59154 0.24105,0.27874 0.39048,0.56424 0.49871,0.91095 h 0.35725 l -0.0997,-1.76745 z m -11.23365,2.72609 v -1.84919 -0.197 c 0,-0.2855 0.0746,-0.31968 0.74773,-0.31968 h 0.15795 v -0.31955 h -2.73366 v 0.31955 h 0.14957 c 0.67301,0 0.7476,0.0342 0.7476,0.31968 v 0.197 3.23589 0.19726 c 0,0.28537 -0.0746,0.31942 -0.7476,0.31942 h -0.14957 v 0.31955 h 2.73366 v -0.31955 h -0.15795 c -0.67315,0 -0.74773,-0.0341 -0.74773,-0.31942 v -0.19726 -0.86326 l 0.96378,-0.79542 1.44574,1.73353 c 0.13309,0.16308 0.16619,0.21754 0.16619,0.28563 0,0.10864 -0.15768,0.1562 -0.56492,0.1562 h -0.25766 v 0.31955 h 2.84161 v -0.31955 h -0.15781 c -0.45696,0 -0.57343,-0.0476 -0.81434,-0.33982 l -2.01066,-2.37263 1.23806,-1.01283 c 0.39873,-0.3467 0.90555,-0.54397 1.40413,-0.54397 v -0.31955 h -2.55923 v 0.31955 h 0.20794 c 0.38225,0 0.53993,0.0613 0.53993,0.20402 0,0.0951 -0.1662,0.29226 -0.40711,0.48939 z m -9.28947,-2.68542 h -1.71165 v 0.31955 h 0.20781 c 0.42372,0 0.61491,0.0544 0.76435,0.22456 v 2.88904 c 0,0.93136 -0.16619,1.12849 -0.96378,1.15565 v 0.31955 h 2.36817 v -0.31955 c -0.78962,-0.0272 -0.95567,-0.22429 -0.95567,-1.15565 V 20.2762 l 3.70595,4.09252 h 0.34887 v -3.52827 c 0,-0.93122 0.16606,-1.12849 0.96378,-1.15578 v -0.31955 h -2.36804 v 0.31955 c 0.78935,0.0273 0.95554,0.22456 0.95554,1.15578 V 22.975 Z m -5.40071,0.83623 v -0.197 c 0,-0.2855 0.0747,-0.31968 0.73935,-0.31968 h 0.16619 v -0.31955 h -2.75014 v 0.31955 h 0.16619 c 0.67301,0 0.74773,0.0342 0.74773,0.31968 v 0.197 3.23589 0.19726 c 0,0.28537 -0.0747,0.31942 -0.74773,0.31942 h -0.16619 v 0.31955 h 2.75014 V 23.95392 H 26.9773 c -0.66463,0 -0.73935,-0.0341 -0.73935,-0.31942 v -0.19726 z" style="fill:#000000;fill-opacity:1;stroke-width:1pt" inkscape:connector-curvature="0" />
+<g id="g7535" transform="matrix(1.314547,0,0,1.314547,-17.94833,-33.3228)">
<path id="path2313" d="M 49.37627,75.52654 34.51809,90.7309 c -5.02019,6.2169 3.41648,5.49357 7.03314,7.28421 1.29735,1.32611 -4.97263,2.30489 -3.67528,3.63219 1.29735,1.3261 7.84495,2.5548 9.14451,3.881 1.29736,1.3261 -2.65553,2.7329 -1.35818,4.059 1.29735,1.3261 4.29797,0.07 4.85982,3.1311 0.40038,2.1877 5.4073,0.9402 7.85601,-0.8516 1.29736,-1.3272 -2.48189,-1.2022 -1.18454,-2.5283 3.22624,-3.2993 6.23017,-1.199 7.33397,-4.5048 0.54527,-1.6336 -4.74922,-2.5184 -3.44965,-3.8445 3.73279,-2.17998 16.63444,-3.59899 10.51265,-9.72077 L 56.18931,75.52654 c -1.88354,-1.80833 -5.02683,-1.82824 -6.81304,0 z m 17.06689,29.30716 c 0,0.7543 5.55771,1.2487 5.55771,-0.1781 -0.7919,-2.2917 -4.90074,-2.1368 -5.55771,0.1781 z m -25.03571,4.0082 c 1.31615,1.1381 3.34901,-0.2832 3.95842,-1.8714 -1.27523,-1.6944 -6.04879,0.061 -3.95842,1.8714 z m 24.33892,-2.4587 c -1.69662,1.5219 0.19023,3.0659 1.86253,2.0826 0.37272,-0.3782 -0.01,-1.7043 -1.86253,-2.0826 z" inkscape:connector-curvature="0" />
<path style="fill:#ffffff" id="path2315" d="m 45.82044,98.83798 c 0.39706,0.24664 6.40271,1.46662 7.87039,1.70992 0.50876,0.1073 0.1482,0.6315 -0.55301,0.9854 -1.5816,0.4203 -9.2529,-2.69532 -7.31738,-2.69532 z" inkscape:connector-curvature="0" />
-<path style="fill:#ffffff" id="path2317" d="m 55.29123,76.59274 5.87846,5.97026 c 0.55743,0.5696 0.54969,1.6734 0.23779,1.99082 l -2.91877,-2.33479 -0.57402,3.4574 -2.43876,-1.2874 -3.90533,2.46751 -1.29293,-5.20158 -2.0981,3.62994 -3.20744,0 c -1.30731,0 -1.46104,-1.65902 -0.27319,-2.84688 2.07488,-2.23968 4.45613,-4.52249 5.75016,-5.84528 1.30068,-1.32943 3.5669,-1.29182 4.84213,0 z" inkscape:connector-curvature="0" />
+<path style="fill:#ffffff" id="path2317" d="m 55.29123,76.59274 5.87846,5.97026 c 0.55743,0.5696 0.54969,1.6734 0.23779,1.99082 l -2.91877,-2.33479 -0.57402,3.4574 -2.43876,-1.2874 -3.90533,2.46751 -1.29293,-5.20158 -2.0981,3.62994 h -3.20744 c -1.30731,0 -1.46104,-1.65902 -0.27319,-2.84688 2.07488,-2.23968 4.45613,-4.52249 5.75016,-5.84528 1.30068,-1.32943 3.5669,-1.29182 4.84213,0 z" inkscape:connector-curvature="0" />
</g>
+<path id="path3959" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:100%;font-family:'Euphoria Script';-inkscape-font-specification:'Euphoria Script';letter-spacing:0px;word-spacing:0px;fill:#f58908;fill-opacity:1;stroke:none;stroke-width:2.2432382px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 109.8503,40.23567 q 2.3202,-1.13792 2.5606,-3.97352 0.186,-2.4898 -0.6114,-5.68054 -4.6175,2.38741 -5.4222,7.07206 -0.039,0.31176 -0.4521,0.31617 -0.2327,-0.0181 -0.2304,-0.20804 0.2868,-2.21912 1.6902,-4.37864 1.4161,-2.13367 4.2015,-3.62721 -0.3485,-1.42876 -0.9383,-3.28215 -0.589,-1.85376 -1.0504,-3.6417 l -0.2322,0.11386 q -0.4308,7.59868 -2.1838,8.45843 -1.9593,0.96092 -3.4388,-2.05579 -1.4792,-3.01595 -1.6821,-6.68994 -0.2158,-3.70067 0.7277,-4.45045 l 0.1545,-0.0758 q 0.4384,-0.21504 0.7184,0.35587 0.056,0.83196 0.1759,2.18389 0.1055,1.32413 0.6479,4.25553 0.5302,2.90629 1.2384,4.35032 0.6952,1.41738 1.314,1.11387 0.7217,-0.35392 1.0938,-3.63852 0.5507,-4.81127 0.4321,-9.42182 -0.024,-1.93929 0.8271,-2.3566 0.5412,-0.26544 0.8324,0.32831 -0.048,1.14247 0.4702,3.95838 0.518,2.81594 1.3185,5.5575 0.788,2.71564 1.1744,4.28536 2.1236,-0.62598 3.1031,0.58868 0.169,0.20985 0.3557,0.59046 0.2016,0.41105 0.031,0.84428 -0.156,0.46367 -0.3882,0.57753 -0.036,-0.20882 -0.2945,-0.65823 -0.2394,-0.43031 -0.5463,-0.65751 -0.2817,-0.24901 -0.8327,-0.39429 -0.5509,-0.14529 -1.2443,0.006 1.6818,8.45026 -3.2164,10.8525 -2.114,1.03679 -3.5436,-0.11763 -0.06,-0.0649 -0.086,-0.11821 -0.075,-0.15224 0.1831,-0.34478 0.2581,-0.12656 0.4763,-0.007 0.9829,0.8296 2.6841,-0.005 z m -5.8407,-2.47555 q -1.4953,0.73334 -2.9885,-0.4853 -1.46703,-1.23146 -3.00964,-4.37681 -1.54261,-3.14535 -2.72572,-7.9052 -1.18349,-4.76062 -1.33672,-8.20304 -0.12779,-3.45585 0.80028,-3.91101 0.43846,-0.21504 0.69233,0.30259 0.0658,1.50318 0.46712,4.40843 0.3887,2.87934 0.85833,5.27137 0.49552,2.37934 1.42237,5.4433 0.9522,3.05057 1.95085,5.08683 0.9864,2.01114 1.9039,2.90394 0.9566,0.90675 1.6525,0.56545 0.593,-0.29083 0.8543,-1.12726 0.2762,-0.8059 0.2422,-1.46251 -0.01,-0.34475 0.3897,-0.37998 0.1659,0.013 0.154,0.1794 0.036,0.20882 0.01,0.54268 0,0.3219 -0.098,1.0397 -0.1791,1.59116 -1.2361,2.10957 z M 88.98873,24.94693 q 1.9593,-0.96092 3.08453,1.33339 0.64474,1.31462 0.47641,3.18855 -0.31956,3.13037 -2.79443,4.34415 -0.3867,0.18965 -0.70822,0.1868 -0.32152,-0.003 -0.5771,-0.19857 1.83035,-0.89767 2.31467,-3.75757 0.40304,-2.30821 -0.29248,-3.72636 -0.51818,-1.05657 -1.36892,-0.63933 -1.70147,0.83447 -1.86875,4.21028 -0.15655,3.65857 1.33529,6.70039 1.26447,2.57825 2.98667,2.37291 0.3362,-0.0327 0.7739,-0.24735 0.43847,-0.21504 0.82728,-0.66069 0.37449,-0.47641 0.55987,-0.94505 0.36747,-0.94512 0.43843,-1.91007 0.002,-0.25593 0.2859,-0.39518 0.46434,-0.22773 0.51313,-0.0628 0.0605,0.31973 -0.12521,1.24463 -0.16169,0.9103 -0.39682,1.53838 -0.22218,0.59056 -0.76883,1.23639 -0.50561,0.66347 -1.20205,1.00503 -2.73269,1.34022 -4.74476,-0.87137 -0.66188,-0.7623 -1.11734,-1.69098 -0.84709,-1.72721 -1.04663,-4.15539 -0.25398,-3.71313 1.29294,-6.16685 0.85704,-1.31743 2.1202,-1.93693 z M 78.98146,29.8549 q 1.95922,-0.96088 3.08445,1.33343 0.64474,1.31462 0.47648,3.18851 -0.31963,3.13041 -2.7945,4.34419 -0.3867,0.18965 -0.70822,0.1868 -0.32152,-0.003 -0.5771,-0.19857 1.83035,-0.89767 2.31467,-3.75757 0.40304,-2.30821 -0.29248,-3.72636 -0.51818,-1.05657 -1.36892,-0.63933 -1.70148,0.83447 -1.86875,4.21028 -0.15655,3.65857 1.33529,6.70039 1.26447,2.57825 2.98667,2.37291 0.3362,-0.0327 0.7739,-0.24735 0.43846,-0.21504 0.82728,-0.66069 0.37449,-0.47641 0.55987,-0.94505 0.36747,-0.94512 0.43843,-1.91007 0.002,-0.25593 0.2859,-0.39518 0.46434,-0.22773 0.51312,-0.0628 0.0605,0.31973 -0.1252,1.24463 -0.16169,0.9103 -0.39682,1.53838 -0.22219,0.59056 -0.76883,1.23639 -0.50561,0.66347 -1.20205,1.00503 -2.73269,1.34022 -4.74476,-0.87137 -0.66188,-0.7623 -1.11734,-1.69098 -0.84709,-1.72721 -1.04656,-4.15543 -0.25405,-3.71309 1.29294,-6.16685 0.85697,-1.31739 2.12021,-1.93693 z m -5.99756,9.27308 q -0.97961,0.48044 -2.02905,-1.65934 -0.59397,-1.2111 -0.64818,-2.49616 -1.00717,2.38069 -1.1369,7.59367 -0.1428,5.18633 0.47693,6.44995 0.15307,0.3121 -0.25951,0.51445 -0.74752,0.36661 -1.74656,-1.67041 -1.88383,-3.8411 -2.64035,-7.33988 -0.75614,-3.49801 0.35242,-4.0417 0.49022,-0.24042 0.77022,0.33049 0.65986,4.34508 2.07889,8.54256 l 0.18041,-0.0885 q -0.27614,-5.84491 0.9227,-9.79086 0.68511,-2.25485 1.87094,-2.83643 0.25805,-0.12656 0.48724,-0.0501 0.25508,0.0638 0.37081,0.29974 -0.0908,0.27117 -0.17339,0.7555 -0.0826,0.48434 0.15133,2.06843 0.21898,1.55555 1.0026,3.15334 0.1008,0.20553 -0.0278,0.26863 z m -24.00261,4.57617 q 0.93557,1.90762 2.08179,1.50599 0.0978,0.39586 -0.41752,0.6486 -1.05703,0.51841 -2.12769,-0.55616 -0.49748,-0.49258 -0.91412,-1.3421 -0.43008,-0.87692 -0.35418,-2.41655 0.14265,-3.55637 3.74658,-6.31542 1.23938,-0.92891 2.78618,-1.68752 1.5726,-0.77127 2.52802,-1.62701 0.95549,-0.85579 1.18133,-1.4387 0.58996,-1.53584 1.10553,-1.7887 0.51534,-0.25274 0.66841,0.0594 0.0373,0.0761 0.0747,0.15224 0.17425,0.81164 -0.87704,2.12424 -0.64947,0.76235 -1.57615,1.48124 -0.67528,0.77501 -0.44428,2.68066 0.2169,1.87669 1.09001,5.22196 1.27704,-0.78684 2.15358,-1.21673 0.23217,-0.11387 0.34443,0.18048 0.0503,0.36249 -0.37696,0.60037 -0.43847,0.21504 -1.90971,1.25766 1.72164,6.57513 2.03307,9.49236 0.80387,7.37746 -3.39828,9.43837 -3.01625,1.47929 -5.1168,-0.91272 -0.75172,-0.81455 -1.21951,-1.76836 -0.88479,-1.80408 -0.81608,-4.07675 0.0907,-3.46668 2.43669,-4.61725 0.33494,-0.16427 0.61589,-0.1132 0.30684,0.0384 0.53679,0.31277 -2.21705,1.08733 -2.53547,4.08967 -0.26189,2.3353 0.67368,4.24291 1.36564,2.78454 3.62846,2.44249 0.52781,-0.0983 1.2751,-0.46483 0.74752,-0.36661 1.35607,-1.21277 0.64913,-0.82829 0.76238,-2.29275 0.1518,-1.45032 0.22381,-2.41295 0.0592,-0.98843 -0.33485,-3.22587 -0.50499,-2.72598 -1.04037,-4.99039 -0.54701,-2.28988 -0.64659,-2.75286 -1.33165,0.93639 -2.07925,1.30304 -0.72163,0.35392 -1.14234,-0.24241 -0.2767,-0.50643 -0.007,-0.73301 0.20331,0.0891 0.87387,-0.23971 0.69575,-0.34123 2.10204,-1.19147 -0.59433,-2.84269 -0.77295,-4.70604 -0.19101,-1.88939 0.2038,-3.10571 -0.41258,0.20235 -1.28905,0.6322 -4.94974,2.42755 -5.50603,6.31427 -0.28375,1.83421 0.3987,3.22572 z m 13.93518,-0.27799 q 0.0635,0.1294 -0.1687,0.24327 -0.23218,0.11386 -0.51288,0.12877 -0.25856,-0.005 -0.34442,-0.18047 -1.28949,-2.62925 -1.4805,-4.51863 -0.2037,-1.91527 0.77591,-2.39571 0.25805,-0.12656 0.52806,-0.0324 0.27001,0.0942 0.41934,0.3987 -0.59114,1.72906 0.0184,4.27626 0.26186,1.05574 0.76736,2.08643 z m -26.85252,8.49992 q 1.02752,0.2043 1.69785,-0.12446 0.69575,-0.34122 0.89009,-0.66317 0.16426,0.33494 0.008,0.79861 -0.1458,0.4209 -0.7126,0.69889 -0.54123,0.26544 -1.31284,0.3228 1.13504,2.44909 1.6409,5.36728 0.49157,2.89309 0.15269,5.20195 -0.35143,2.2829 -1.51153,2.85186 -1.16009,0.56895 -2.22121,-0.0297 -1.13792,-0.68935 -2.04848,-2.54596 -0.51818,-1.05657 -0.98388,-2.33152 -0.38965,7.2914 -2.11693,8.13853 -1.70148,0.83447 -3.1179,-2.05359 -1.46645,-2.99006 -1.66579,-7.11339 -0.0901,-3.31378 0.87762,-3.94894 0.49023,-0.24042 0.75529,0.30004 0.0568,0.89757 0.17487,2.3128 0.10462,1.38783 0.596,4.34523 0.51696,2.94486 1.12362,4.18184 0.59435,1.21185 1.13557,0.94642 0.67064,-0.32891 1.02605,-3.18979 0.38152,-2.87369 0.40214,-5.57039 l 0.0595,-2.6827 q 0.0134,-1.79795 0.58076,-2.0762 0.56711,-0.27813 0.83217,0.26234 1.06992,6.15913 2.56176,9.20095 0.69552,1.41815 1.52045,1.01357 0.92808,-0.45516 1.18758,-2.46917 0.27261,-2.05255 -0.25815,-4.83011 -0.51832,-2.81671 -1.69395,-5.21378 l -0.0747,-0.15224 q -1.01258,-0.17386 -1.84406,-0.69527 -0.83021,-0.51827 -1.00791,-0.88061 -0.1904,-0.38822 -0.005,-0.85697 0.18187,-0.47636 0.56857,-0.66602 0.48946,-0.24005 1.30654,0.44707 0.80372,0.66063 1.47631,1.70663 z M 17.6483,75.44555 q -2.11398,1.03678 -3.74507,-2.28898 -0.97365,-1.98526 -1.15689,-4.83693 -0.26478,-3.99586 1.35792,-6.29505 0.70002,-0.98545 1.52495,-1.39003 0.82501,-0.40461 1.46451,-0.27442 0.66569,0.11734 0.97354,0.41963 l 0.31879,0.25915 q 0.13889,0.47959 -0.22193,0.65655 -0.41258,0.20234 -0.57982,0.0577 -0.15409,-0.17939 -0.29291,-0.27184 -0.15231,-0.11416 -0.55122,-0.21126 -0.41087,-0.11956 -0.77168,0.0574 -1.67575,0.82185 -1.56254,4.50865 0.16007,4.2389 1.6646,7.30661 0.75861,1.54679 1.37748,1.24327 0.49023,-0.24042 0.83544,-1.75254 0.3584,-1.55165 0.529,-3.68165 0.31044,-3.67077 0.34334,-6.27716 -0.0336,-2.28574 0.89444,-2.74091 0.48946,-0.24005 0.78066,0.3537 0.007,0.60105 0.0898,1.68309 0.0816,1.07901 0.80339,4.05088 0.72189,2.97183 2.02445,5.62772 1.30218,2.65513 2.10138,2.26317 0.30906,-0.15157 0.42898,-0.55978 0.13112,-0.38538 0.0723,-1.02701 -0.0605,-0.31973 0.22269,-0.45861 0.10276,-0.0504 0.19186,3.3e-4 0.0906,0.05 0.12693,0.25882 0.0363,0.20882 0.0585,0.57566 0.0356,0.39802 -0.1374,1.15429 -0.14751,0.74281 -0.61148,0.97036 -1.08275,0.53102 -2.37081,-0.59558 -1.26253,-1.13998 -2.2108,-3.07348 -0.94826,-1.93349 -1.5368,-3.85171 l -0.25806,0.12656 q -0.53045,7.19993 -2.18032,8.00909 z M 10.10761,69.96506 Q 9.127997,70.4455 8.078561,68.30572 7.484589,67.09462 7.430374,65.80956 q -1.007167,2.38069 -1.1369,7.59367 -0.142799,5.18633 0.476932,6.44996 0.153066,0.3121 -0.259514,0.51444 -0.747516,0.36661 -1.746553,-1.67041 -1.883833,-3.8411 -2.640351,-7.33988 -0.756144,-3.49801 0.352417,-4.0417 0.490225,-0.24042 0.770224,0.33049 0.659852,4.34508 2.078886,8.54257 l 0.180409,-0.0885 q -0.276139,-5.84492 0.922698,-9.79086 0.685115,-2.25486 1.87094,-2.83644 0.258053,-0.12656 0.487247,-0.0501 0.255075,0.0638 0.370808,0.29974 -0.09081,0.27117 -0.173396,0.75551 -0.08259,0.48433 0.151337,2.06842 0.218977,1.55555 1.002602,3.15335 0.1008,0.20552 -0.0278,0.26862 z m -28.80073,8.01722 q -0.95389,0.46782 -1.61132,-0.87268 -0.65744,-1.34051 -0.0747,-3.67358 0.95492,-3.92169 4.86469,-6.38313 l 1.38051,-0.77149 q 4.691995,-2.30114 8.638958,0.3997 2.388837,1.67552 3.855286,4.66559 0.607038,1.23774 1.0708788,2.7053 1.50293,4.95523 0.2604394,9.52978 -1.3613282,5.04927 -5.4861402,7.07224 -4.099006,2.01032 -6.332712,0.25966 -0.6896,-0.55889 -1.08086,-1.35665 -0.40469,-0.82516 -0.40862,-1.94224 0.0414,-2.06756 1.5108,-2.78824 0.12865,-0.0631 0.2292,0.0765 0.11675,0.10327 0.11529,0.29285 0.0214,0.17838 -0.10574,0.24072 -0.87654,0.4299 -0.96443,1.88097 -0.021,1.00087 0.30795,1.6715 0.32854,0.66987 0.8651,1.11118 1.684414,1.3477 4.803733,-0.18214 3.531898,-1.73218 4.623501,-6.74455 0.984933,-4.51244 -0.416672,-9.26146 -0.437465,-1.54471 -1.057196,-2.80833 -1.377969,-2.80965 -3.589474,-4.1236 -2.952842,-1.78231 -6.536272,-0.0249 -4.4857,2.19997 -5.24904,6.31666 -0.37568,2.1031 0.28176,3.4436 0.26506,0.54047 0.49723,0.4266 0.0993,0.59342 -0.39088,0.83384 z m 8.50402,7.94956 q -1.92191,-3.91875 -3.03383,-7.94579 -1.12499,-4.05368 -1.16871,-6.68671 -0.031,-2.67138 0.9229,-3.13921 0.41258,-0.20234 0.61418,0.20871 0.0159,2.9668 1.09898,7.39232 1.95388,8.09206 3.547261,11.34094 0.164266,0.33493 -0.196551,0.51189 Q -9.178267,87.9933 -10.19,85.9304 Z" inkscape:connector-curvature="0" />
</g>
<g id="designBottomGenerator" sodipodi:insensitive="true">
<use height="100%" width="100%" id="bottom1" transform="translate(-100,-100)" xlink:href="#designBottom" y="0" x="0" />
<use height="100%" width="100%" id="bottom2" transform="translate(0,-100)" xlink:href="#designBottom" y="0" x="0" />
<use height="100%" width="100%" id="bottom3" transform="translate(100,-100)" xlink:href="#designBottom" y="0" x="0" />
-<use height="100%" width="100%" id="bottom4" transform="translate(-100,0)" xlink:href="#designBottom" y="0" x="0" />
+<use height="100%" width="100%" id="bottom4" transform="translate(-100)" xlink:href="#designBottom" y="0" x="0" />
<use height="100%" width="100%" id="bottom5" xlink:href="#designBottom" y="0" x="0" />
-<use height="100%" width="100%" id="bottom6" transform="translate(100,0)" xlink:href="#designBottom" y="0" x="0" />
+<use height="100%" width="100%" id="bottom6" transform="translate(100)" xlink:href="#designBottom" y="0" x="0" />
<use height="100%" width="100%" id="bottom7" transform="translate(-100,100)" xlink:href="#designBottom" y="0" x="0" />
<use height="100%" width="100%" id="bottom8" transform="translate(0,100)" xlink:href="#designBottom" y="0" x="0" />
<use transform="translate(100,100)" height="100%" width="100%" id="bottom9" xlink:href="#designBottom" y="0" x="0" />
@@ -69,31 +85,14 @@
<use height="100%" width="100%" id="top1" transform="translate(-100,-100)" xlink:href="#designTop" y="0" x="0" />
<use height="100%" width="100%" id="top2" transform="translate(0,-100)" xlink:href="#designTop" y="0" x="0" />
<use height="100%" width="100%" id="top3" transform="translate(100,-100)" xlink:href="#designTop" y="0" x="0" />
-<use height="100%" width="100%" id="top4" transform="translate(-100,0)" xlink:href="#designTop" y="0" x="0" />
+<use height="100%" width="100%" id="top4" transform="translate(-100)" xlink:href="#designTop" y="0" x="0" />
<use height="100%" width="100%" id="top5" xlink:href="#designTop" y="0" x="0" />
-<use height="100%" width="100%" id="top6" transform="translate(100,0)" xlink:href="#designTop" y="0" x="0" />
+<use height="100%" width="100%" id="top6" transform="translate(100)" xlink:href="#designTop" y="0" x="0" />
<use height="100%" width="100%" id="top7" transform="translate(-100,100)" xlink:href="#designTop" y="0" x="0" />
<use height="100%" width="100%" id="top8" transform="translate(0,100)" xlink:href="#designTop" y="0" x="0" />
<use transform="translate(100,100)" height="100%" width="100%" id="top9" xlink:href="#designTop" y="0" x="0" />
</g>
</g>
-<g id="infoGroup" sodipodi:insensitive="true">
-<text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:23.6686153px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:Verdana;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" x="-326.82172" y="-349.80621" id="text8664" sodipodi:linespacing="125%"><tspan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'" sodipodi:role="line" id="tspan8666" x="-326.82172" y="-349.80621">Seamless pattern</tspan></text>
-<flowRoot xml:space="preserve" id="infoText" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.75px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" transform="translate(-709.3014,-231.7039)"><flowRegion id="flowRegion11597"><rect ry="0.9706131" id="rect11599" width="491.7114" height="324.9937" x="383.7567" y="-110.4523" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.75px;font-family:sans-serif;-inkscape-font-specification:sans-serif" /></flowRegion><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara6756">Use the layers &quot;<flowSpan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Cantarell;-inkscape-font-specification:'Cantarell Bold'" id="flowSpan7476">Pattern Foreground</flowSpan>&quot; and &quot;<flowSpan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Cantarell;-inkscape-font-specification:'Cantarell Bold'" id="flowSpan7478">Pattern Background</flowSpan>&quot; on the pattern page to create your design. The separation into two layers will make it easier for you to create and edit overlapping content like a foreground drawing with a background fill.</flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7456" /><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7458">The layer named &quot;<flowSpan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Cantarell;-inkscape-font-specification:'Cantarell Bold'" id="flowSpan7480">Pattern</flowSpan>&quot; is for using the seamless pattern, copying it to other documents, adding opacity etc. </flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7460">Select the group on the page, and use <flowSpan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Cantarell;-inkscape-font-specification:'Cantarell Bold'" id="flowSpan7484">Object-&gt;Pattern-&gt;Objects to Pattern</flowSpan> to convert your creation into a fill pattern.</flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7462" /><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7464">The layer &quot;<flowSpan style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Cantarell;-inkscape-font-specification:'Cantarell Bold'" id="flowSpan7482">Preview Background</flowSpan>&quot; provides an easy way to preview your creation if it contains transparency.</flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7466">Changing this layer's visibility will not alter the pattern.</flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7468" /><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7470">If an object is moved outside the pattern/page limits, it will be difficult to select it. </flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7472">To move it back onto the page, select the object using the rubberband selection (click and drag a selection box) with the selection tool.</flowPara><flowPara style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.5px;font-family:Cantarell;-inkscape-font-specification:Cantarell" id="flowPara7474">Then move it back onto the page, using the arrow keys or the &quot;Align and Distribute&quot; dialog (Shift+Ctrl+A).</flowPara></flowRoot><path sodipodi:nodetypes="cccc" inkscape:connector-curvature="0" id="path19539" d="m -334.4906,-359.49 -26.1704,0 0,411.00566 229.6052,0" style="color:#000000;text-decoration:none;text-decoration-line:none;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:3.7795277;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-end:url(#Arrow2Mend);enable-background:accumulate" />
-</g>
-<g id="textPreview" sodipodi:insensitive="true">
-<path d="m -29.56541,100 0,-7.16704 2.00731,0 0,4.51126 1.91761,0 0,-4.24223 2.00731,0 0,4.24223 4.36647,0 0,2.65578 -10.2987,0 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9845" inkscape:connector-curvature="0" />
-<path d="m -22.7433,87.81814 q 0,0.77256 0.26214,1.16575 0.26214,0.38628 0.77256,0.38628 0.46906,0 0.73808,-0.3104 0.26214,-0.31731 0.26214,-0.87604 0,-0.6967 -0.49667,-1.17266 -0.50355,-0.47596 -1.25547,-0.47596 l -0.28278,0 0,1.28303 z m -0.93124,-3.7732 4.40783,0 0,2.49017 -1.14504,0 q 0.70359,0.49666 1.02773,1.11747 0.31735,0.62082 0.31735,1.51066 0,1.20024 -0.69671,1.95213 -0.70359,0.74498 -1.82103,0.74498 -1.35893,0 -1.99355,-0.93123 -0.63462,-0.93812 -0.63462,-2.93854 l 0,-1.45547 -0.19316,0 q -0.58628,0 -0.8553,0.46216 -0.2759,0.46217 -0.2759,1.44168 0,0.79327 0.15859,1.47617 0.15868,0.6829 0.47603,1.26923 l -1.88321,0 q -0.19317,-0.79327 -0.28966,-1.59344 -0.10355,-0.80016 -0.10355,-1.60033 0,-2.09008 0.82778,-3.01441 0.8209,-0.93123 2.67642,-0.93123 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9847" inkscape:connector-curvature="0" />
-<path d="m -26.75105,75.72598 1.87625,0 q -0.33111,0.79327 -0.49658,1.53136 -0.16556,0.73808 -0.16556,1.39338 0,0.7036 0.17932,1.04849 0.17243,0.338 0.53803,0.338 0.29663,0 0.45531,-0.25522 0.15858,-0.26212 0.23453,-0.93122 l 0.0624,-0.43458 q 0.2415,-1.89694 0.79329,-2.55225 0.55189,-0.65531 1.73142,-0.65531 1.23474,0 1.85551,0.91054 0.62086,0.91053 0.62086,2.7178 0,0.76568 -0.12419,1.58654 -0.11722,0.81396 -0.35872,1.67621 l -1.87624,0 q 0.35872,-0.73809 0.53803,-1.51067 0.17941,-0.77947 0.17941,-1.57963 0,-0.72429 -0.20005,-1.08988 -0.20004,-0.3656 -0.59325,-0.3656 -0.33111,0 -0.4897,0.25524 -0.16555,0.24832 -0.25525,1.00019 l -0.055,0.43458 q -0.20692,1.64862 -0.76568,2.31082 -0.55868,0.66221 -1.69684,0.66221 -1.22787,0 -1.82112,-0.84156 -0.59325,-0.84155 -0.59325,-2.57984 0,-0.6829 0.10355,-1.43477 0.10346,-0.75188 0.32415,-1.63483 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9849" inkscape:connector-curvature="0" />
-<path d="m -29.18596,70.67666 2.19351,0 0,-2.54535 1.7659,0 0,2.54535 3.27654,0 q 0.53804,0 0.7312,-0.21383 0.1862,-0.21384 0.1862,-0.84846 l 0,-1.26922 1.7659,0 0,2.11768 q 0,1.46237 -0.60701,2.07628 -0.61398,0.60703 -2.07629,0.60703 l -3.27654,0 0,1.22784 -1.7659,0 0,-1.22784 -2.19351,0 0,-2.46948 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9851" inkscape:connector-curvature="0" />
-<path d="m -20.38415,59.23292 4.05599,0 0,2.46948 -10.66429,0 0,-2.46948 1.13128,0 q -0.67598,-0.51044 -0.99334,-1.13127 -0.32423,-0.62081 -0.32423,-1.42788 0,-1.42787 1.13826,-2.3453 1.13119,-0.91744 2.91782,-0.91744 1.78654,0 2.92471,0.91744 1.13128,0.91743 1.13128,2.3453 0,0.80707 -0.31735,1.42788 -0.32414,0.62083 -1.00013,1.13127 z m -5.00108,-1.64171 q 0,0.79327 0.58637,1.22093 0.5794,0.42078 1.6762,0.42078 1.09671,0 1.68308,-0.42078 0.5794,-0.42766 0.5794,-1.22093 0,-0.79327 -0.5794,-1.20715 -0.5794,-0.42078 -1.68308,-0.42078 -1.10368,0 -1.68317,0.42078 -0.5794,0.41388 -0.5794,1.20715 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9853" inkscape:connector-curvature="0" />
-<path d="m -24.88856,45.83706 q -0.1518,0.3242 -0.22077,0.6484 -0.0761,0.31731 -0.0761,0.64151 0,0.95193 0.61389,1.46927 0.6071,0.51045 1.74526,0.51045 l 3.55932,0 0,2.46948 -7.72574,0 0,-2.46948 1.26923,0 q -0.7588,-0.47595 -1.10367,-1.08988 -0.35185,-0.62081 -0.35185,-1.48306 0,-0.12416 0.0138,-0.26902 0.009,-0.14486 0.0413,-0.42078 l 2.23496,-0.007 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9855" inkscape:connector-curvature="0" />
-<path d="m -23.15027,36.88348 0.7036,0 0,5.77361 q 0.86914,-0.0897 1.30372,-0.62772 0.43457,-0.53804 0.43457,-1.50375 0,-0.77948 -0.22765,-1.59344 -0.23453,-0.82086 -0.70359,-1.6831 l 1.90385,0 q 0.33111,0.87604 0.49667,1.75208 0.17243,0.87604 0.17243,1.75209 0,2.09698 -1.06231,3.26274 -1.06919,1.15886 -2.99368,1.15886 -1.89009,0 -2.97304,-1.13817 -1.08304,-1.14506 -1.08304,-3.14547 0,-1.82107 1.0968,-2.91095 1.0968,-1.09678 2.93167,-1.09678 z m -0.8209,2.53846 q -0.70359,0 -1.13119,0.41388 -0.43458,0.40698 -0.43458,1.06918 0,0.71739 0.40697,1.16576 0.40009,0.44836 1.1588,0.55873 l 0,-3.20755 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9857" inkscape:connector-curvature="0" />
-<path d="m -26.99245,35.99364 0,-2.46947 5.33907,-1.92454 -5.33907,-1.91764 0,-2.47637 7.72574,3.04201 0,2.7109 -7.72574,3.03511 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9859" inkscape:connector-curvature="0" />
-<path d="m -26.99245,25.80534 0,-2.46948 7.72574,0 0,2.46948 -7.72574,0 z m -3.00753,0 0,-2.46948 2.01419,0 0,2.46948 -2.01419,0 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9861" inkscape:connector-curvature="0" />
-<path d="m -23.15027,13.23722 0.7036,0 0,5.77361 q 0.86914,-0.0897 1.30372,-0.62772 0.43457,-0.53805 0.43457,-1.50376 0,-0.77947 -0.22765,-1.59344 -0.23453,-0.82085 -0.70359,-1.6831 l 1.90385,0 q 0.33111,0.87604 0.49667,1.75208 0.17243,0.87605 0.17243,1.75209 0,2.09698 -1.06231,3.26275 -1.06919,1.15885 -2.99368,1.15885 -1.89009,0 -2.97304,-1.13816 -1.08304,-1.14506 -1.08304,-3.14548 0,-1.82106 1.0968,-2.91094 1.0968,-1.09678 2.93167,-1.09678 z m -0.8209,2.53845 q -0.70359,0 -1.13119,0.41389 -0.43458,0.40697 -0.43458,1.06918 0,0.71738 0.40697,1.16575 0.40009,0.44837 1.1588,0.55874 l 0,-3.20756 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9863" inkscape:connector-curvature="0" />
-<path d="m -26.99245,12.06456 0,-2.400495 5.32522,-1.29682 -5.32522,-1.303718 0,-2.062494 5.2701,-1.29682 -5.2701,-1.303717 0,-2.4004958732508 L -19.26671,2.034903 l 0,2.697109 -5.31147,1.303717 5.31147,1.296819 0,2.697112 -7.72574,2.0349 z" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" id="path9865" inkscape:connector-curvature="0" />
-</g>
</g>
<inkscape:_templateinfo id="_templateinfo10">
<inkscape:_name id="_name12">Seamless Pattern</inkscape:_name>
diff --git a/share/extensions/setup_typography_canvas.py b/share/extensions/setup_typography_canvas.py
index a1000f2d1..209c9757f 100755
--- a/share/extensions/setup_typography_canvas.py
+++ b/share/extensions/setup_typography_canvas.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/simplepath.py b/share/extensions/simplepath.py
index 514dd4666..5d99e46e7 100644
--- a/share/extensions/simplepath.py
+++ b/share/extensions/simplepath.py
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
import re, math
diff --git a/share/extensions/simplestyle.py b/share/extensions/simplestyle.py
index ca33e68a4..32328a40d 100644
--- a/share/extensions/simplestyle.py
+++ b/share/extensions/simplestyle.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
svgcolors={
diff --git a/share/extensions/simpletransform.py b/share/extensions/simpletransform.py
index 8b6f46935..f6f68d2be 100644
--- a/share/extensions/simpletransform.py
+++ b/share/extensions/simpletransform.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
barraud@math.univ-lille1.fr
This code defines several functions to make handling of transform
diff --git a/share/extensions/spirograph.py b/share/extensions/spirograph.py
index e702344a5..02cb02bcd 100755
--- a/share/extensions/spirograph.py
+++ b/share/extensions/spirograph.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex, simplestyle, math
from simpletransform import computePointInNode
diff --git a/share/extensions/split.py b/share/extensions/split.py
index 18d4327fe..4e83b3d33 100755
--- a/share/extensions/split.py
+++ b/share/extensions/split.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/straightseg.py b/share/extensions/straightseg.py
index f18658012..9222ed5b5 100755
--- a/share/extensions/straightseg.py
+++ b/share/extensions/straightseg.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import math, inkex, simplepath, sys
diff --git a/share/extensions/summersnight.py b/share/extensions/summersnight.py
index fbf88fe92..7af4bb571 100755
--- a/share/extensions/summersnight.py
+++ b/share/extensions/summersnight.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
# standard library
diff --git a/share/extensions/svg_and_media_zip_output.py b/share/extensions/svg_and_media_zip_output.py
index 20a5dac18..c5963b721 100755
--- a/share/extensions/svg_and_media_zip_output.py
+++ b/share/extensions/svg_and_media_zip_output.py
@@ -26,7 +26,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
TODOs
- fix bug: not saving existing .zip after a Collect for Output is run
diff --git a/share/extensions/svgcalendar.py b/share/extensions/svgcalendar.py
index a4269f5d7..9f221a807 100755
--- a/share/extensions/svgcalendar.py
+++ b/share/extensions/svgcalendar.py
@@ -25,7 +25,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
__version__ = "0.3"
diff --git a/share/extensions/svgfont2layers.py b/share/extensions/svgfont2layers.py
index 48100e3f5..1a392c72c 100755
--- a/share/extensions/svgfont2layers.py
+++ b/share/extensions/svgfont2layers.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/tar_layers.py b/share/extensions/tar_layers.py
index 3707af1f8..3ba5aa55e 100755
--- a/share/extensions/tar_layers.py
+++ b/share/extensions/tar_layers.py
@@ -14,7 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
"""
An extension to export multiple svg files from a single svg file containing layers.
diff --git a/share/extensions/test/Makefile.am b/share/extensions/test/Makefile.am
index 7ff68083d..cd1929a7f 100644
--- a/share/extensions/test/Makefile.am
+++ b/share/extensions/test/Makefile.am
@@ -6,6 +6,7 @@
EXTRA_DIST = \
addnodes.test.py \
chardataeffect.test.py \
+ color_randomize_test.py \
coloreffect.test.py \
create_test_from_template.sh \
dots.test.py \
diff --git a/share/extensions/test/color_randomize.test.py b/share/extensions/test/color_randomize.test.py
new file mode 100755
index 000000000..d8549a35a
--- /dev/null
+++ b/share/extensions/test/color_randomize.test.py
@@ -0,0 +1,123 @@
+#!/usr/bin/env python
+'''
+Unit test file for ../color_randomize.py
+--
+If you want to help, read the python unittest documentation:
+http://docs.python.org/library/unittest.html
+'''
+
+import os
+import sys
+import unittest
+
+sys.path.append('..') # this line allows to import the extension code
+from color_randomize import *
+
+def extract_hsl(e,rgb):
+ r = int(rgb[:2], 16)
+ g = int(rgb[2:4], 16)
+ b = int(rgb[4:6], 16)
+ return e.rgb_to_hsl(r/255.0, g/255.0, b/255.0)
+
+
+class ColorRandomizeBasicTest(unittest.TestCase):
+ def setUp(self):
+ self.e=C()
+
+ def test_default_values(self):
+ """ The default ranges are set to 0, and thus the color and opacity should not change. """
+ args = ['svg/empty-SVG.svg']
+ self.e.affect(args, False)
+ col = self.e.colmod(128, 128, 255)
+ self.assertEqual("8080ff", col)
+ opac = self.e.opacmod(5)
+ self.assertEqual(5, opac)
+
+
+class ColorRandomizeColorModificationTest(unittest.TestCase):
+ def setUp(self):
+ self.e=C()
+
+ def test_no_change(self):
+ """ The user selected 0% values, and thus the color should not change. """
+ args = ['-y 0', '-t 0', '-m 0', 'svg/empty-SVG.svg']
+ self.e.affect(args, False)
+ col = self.e.colmod(128, 128, 255)
+ self.assertEqual("8080ff", col)
+
+ def test_random_hue(self):
+ """ Random hue only. Saturation and lightness not changed. """
+ args = ['-y 50','-t 0','-m 0','svg/empty-SVG.svg']
+ self.e.affect(args, False)
+ hsl = extract_hsl(self.e, self.e.colmod(150, 100, 200))
+ self.assertEqual([0.47, 0.59], [round(hsl[1], 2), round(hsl[2], 2)])
+
+ @unittest.skip("Inaccurate convertion")
+ def test_random_lightness(self):
+ """ Random lightness only. Hue and saturation not changed. """
+ args = ['-y 0', '-t 0', '-m 50', 'svg/empty-SVG.svg']
+ self.e.affect(args, False)
+ hsl = extract_hsl(self.e, self.e.colmod(150, 100, 200))
+ # Lightness change also affects hue and saturation...
+ #self.assertEqual(0.75, round(hsl[0], 2))
+ #self.assertEqual(0.48, round(hsl[1], 2))
+
+ def test_random_saturation(self):
+ """ Random saturation only. Hue and lightness not changed. """
+ args = ['-y 0', '-t 50', '-m 0', 'svg/empty-SVG.svg']
+ self.e.affect(args, False)
+ hsl = extract_hsl(self.e, self.e.colmod(150, 100, 200))
+ self.assertEqual([0.75, 0.59], [round(hsl[0], 2), round(hsl[2], 2)])
+
+ def test_range_limits(self):
+ """ The maximum hsl values should be between 0 and 100% of their maximum """
+ args = ['-y 100', '-t 100', '-m 100', 'svg/empty-SVG.svg']
+ self.e.affect(args, False)
+ hsl = extract_hsl(self.e, self.e.colmod(156, 156, 156))
+ self.assertLessEqual([hsl[0], hsl[1], hsl[2]], [1, 1, 1])
+ self.assertGreaterEqual([hsl[0], hsl[1], hsl[2]], [0, 0, 0])
+
+
+class ColorRandomizeOpacityModificationTest(unittest.TestCase):
+ def setUp(self):
+ self.e=C()
+
+ def test_no_change(self):
+ """ The user selected 0% opacity range, and thus the opacity should not change. """
+ args = ['-o 0', 'svg/empty-SVG.svg']
+ self.e.affect(args, False)
+ opac = self.e.opacmod(0.15)
+ self.assertEqual(0.15, opac)
+
+ def test_range_min_limit(self):
+ """ The opacity value should be greater than 0 """
+ args = ['-o 100', 'svg/empty-SVG.svg']
+ self.e.affect(args, False)
+ opac = self.e.opacmod(0)
+ self.assertGreaterEqual(opac, "0")
+
+ def test_range_max_limit(self):
+ """ The opacity value should be lesser than 1 """
+ args = ['-o 100', 'svg/empty-SVG.svg']
+ self.e.affect(args, False)
+ opac = self.e.opacmod(1)
+ self.assertLessEqual(opac, "1")
+
+ def test_non_float_opacity(self):
+ """ Non-float opacity value not changed """
+ args = ['-o 100', 'svg/empty-SVG.svg']
+ self.e.affect(args, False)
+ opac = self.e.opacmod("toto")
+ self.assertLessEqual(opac, "toto")
+
+if __name__ == '__main__':
+ #unittest.main()
+ suite = unittest.TestLoader().loadTestsFromTestCase(ColorRandomizeBasicTest)
+ unittest.TextTestRunner(verbosity=2).run(suite)
+ suite = unittest.TestLoader().loadTestsFromTestCase(ColorRandomizeColorModificationTest)
+ unittest.TextTestRunner(verbosity=2).run(suite)
+ suite = unittest.TestLoader().loadTestsFromTestCase(ColorRandomizeOpacityModificationTest)
+ unittest.TextTestRunner(verbosity=2).run(suite)
+
+
+# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 fileencoding=utf-8 textwidth=99
diff --git a/share/extensions/test/run-all-extension-tests b/share/extensions/test/run-all-extension-tests
index aa20c8c7b..e7faf672a 100755
--- a/share/extensions/test/run-all-extension-tests
+++ b/share/extensions/test/run-all-extension-tests
@@ -35,24 +35,32 @@ has_py_coverage=false
py_cover_files=$( $MKTEMP )
failed_tests=$( $MKTEMP )
-if coverage.py -e >/dev/null 2>/dev/null; then
+if coverage.py erase >/dev/null 2>/dev/null; then
has_py_coverage=true
cover_py_cmd=coverage.py
else
- if coverage -e >/dev/null 2>/dev/null; then
+ if coverage erase >/dev/null 2>/dev/null; then
has_py_coverage=true
cover_py_cmd=coverage
+ else
+ if python-coverage erase >/dev/null 2>/dev/null; then
+ has_py_coverage=true
+ cover_py_cmd=python-coverage
+ fi
fi
fi
+if $has_py_coverage; then
+ echo -e "\nRunning tests with coverage"
+fi
#if $has_py_coverage; then
# $cover_py_cmd -e
#fi
function run_py_test() {
- echo -e "\n>> Testing $1"
+ echo -e "\n>>>>>> Testing $1 <<<<<<\n"
if $has_py_coverage; then
- if ! $cover_py_cmd -x "$1.test.py"; then
+ if ! $cover_py_cmd run -a "$1.test.py"; then
echo "$1" >> $failed_tests
fi
echo "../$1.py" >> $py_cover_files
@@ -77,7 +85,7 @@ else
SED_EXTENDED='sed -E' # BSD sed (e.g. on Mac OS X)
fi
-echo "sed regex command: $SED_EXTENDED"
+echo -e "sed regex command: $SED_EXTENDED\n"
# ---------------------------------------------------------------------
@@ -89,7 +97,7 @@ done
if $has_py_coverage; then
echo -e "\n>> Coverage Report:"
- cat $py_cover_files | xargs $cover_py_cmd -r
+ cat $py_cover_files | xargs $cover_py_cmd report
fi
fail=false
diff --git a/share/extensions/triangle.py b/share/extensions/triangle.py
index ecd977d40..32bd2a1db 100755
--- a/share/extensions/triangle.py
+++ b/share/extensions/triangle.py
@@ -29,7 +29,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/voronoi.py b/share/extensions/voronoi.py
index 8661bc9bf..ac2c13f8f 100755..100644
--- a/share/extensions/voronoi.py
+++ b/share/extensions/voronoi.py
@@ -395,6 +395,8 @@ class Edge(object):
else:
# set formula of line, with y fixed to 1
newedge.b = 1.0
+ if dy <= 0:
+ dy = 0.01
newedge.a = dx/dy
newedge.c /= dy
diff --git a/share/extensions/voronoi2svg.inx b/share/extensions/voronoi2svg.inx
index d86ebd819..c07dbb8e5 100644
--- a/share/extensions/voronoi2svg.inx
+++ b/share/extensions/voronoi2svg.inx
@@ -18,6 +18,12 @@
<_item value="Automatic from seeds">Automatic from selected objects</_item>
</param>
<param name="show-clip-box" type="boolean" _gui-text="Show the bounding box"></param>
+ <_param name="Delaunay Options" type="description" appearance="header">Options for Delaunay Triangulation</_param>
+ <param name="delaunay-fill-options" _gui-text="Triangles color" type="optiongroup">
+ <_option value="delaunay-no-fill">Default (Stroke black and no fill)</_option>
+ <_option value="delaunay-fill">Triangles with item color</_option>
+ <_option value="delaunay-fill-random">Triangles with item color (random on apply)</_option>
+ </param>
</page>
<page name="help" _gui-text="Help">
<_param name="help_text" type="description">Select a set of objects. Their centroids will be used as the sites of the Voronoi diagram. Text objects are not handled.</_param>
diff --git a/share/extensions/voronoi2svg.py b/share/extensions/voronoi2svg.py
index 26a89393c..d4740b7f5 100755..100644
--- a/share/extensions/voronoi2svg.py
+++ b/share/extensions/voronoi2svg.py
@@ -36,6 +36,7 @@ import simplestyle
import simplepath
import simpletransform
import voronoi
+import random
inkex.localize()
@@ -76,7 +77,13 @@ class Voronoi2svg(inkex.Effect):
default = False,
dest='showClipBox',
help = 'Set this to true to write the bounding box')
-
+ self.OptionParser.add_option(
+ '--delaunay-fill-options',
+ action = 'store',
+ type = 'string',
+ default = "delaunay-no-fill",
+ dest='delaunayFillOptions',
+ help = 'Set the Delaunay triangles color options')
#}}}
#{{{ Clipping a line by a bounding box
@@ -191,7 +198,8 @@ class Voronoi2svg(inkex.Effect):
#}}}
def effect(self):
-
+ #saveout = sys.stdout
+ #sys.stdout = sys.stderr
#{{{ Check that elements have been selected
if len(self.options.ids) == 0:
@@ -203,15 +211,19 @@ class Voronoi2svg(inkex.Effect):
#{{{ Drawing styles
linestyle = {
- 'stroke' : '#000000',
- 'stroke-width' : str(self.unittouu('1px')),
- 'fill' : 'none'
+ 'stroke' : '#000000',
+ 'stroke-width' : str(self.unittouu('1px')),
+ 'fill' : 'none',
+ 'stroke-linecap' : 'round',
+ 'stroke-linejoin' : 'round'
}
-
+
facestyle = {
- 'stroke' : '#ff0000',
- 'stroke-width' : str(self.unittouu('1px')),
- 'fill' : 'none'
+ 'stroke' : '#000000',
+ 'stroke-width' : str(self.unittouu('1px')),
+ 'fill' : 'none',
+ 'stroke-linecap' : 'round',
+ 'stroke-linejoin' : 'round'
}
#}}}
@@ -231,6 +243,7 @@ class Voronoi2svg(inkex.Effect):
pts = []
nodes = []
seeds = []
+ fills = []
for id in self.options.ids:
@@ -244,6 +257,20 @@ class Voronoi2svg(inkex.Effect):
if trans:
simpletransform.applyTransformToPoint(trans,pt)
pts.append(Point(pt[0],pt[1]))
+ fill = 'none'
+ if self.options.delaunayFillOptions != "delaunay-no-fill":
+ if node.attrib.has_key('style'):
+ style = node.get('style') # fixme: this will break for presentation attributes!
+ if style:
+ declarations = style.split(';')
+ for i,decl in enumerate(declarations):
+ parts = decl.split(':', 2)
+ if len(parts) == 2:
+ (prop, val) = parts
+ prop = prop.strip().lower()
+ if prop == 'fill':
+ fill = val.strip()
+ fills.append(fill)
seeds.append(Point(cx,cy))
#}}}
@@ -327,6 +354,9 @@ class Voronoi2svg(inkex.Effect):
if self.options.diagramType != 'Voronoi':
triangles = voronoi.computeDelaunayTriangulation(seeds)
+ i = 0;
+ if self.options.delaunayFillOptions == "delaunay-fill":
+ random.seed("inkscape")
for triangle in triangles:
p1 = seeds[triangle[0]]
p2 = seeds[triangle[1]]
@@ -335,11 +365,20 @@ class Voronoi2svg(inkex.Effect):
['L',[p2.x,p2.y]],
['L',[p3.x,p3.y]],
['Z',[]]]
+ if self.options.delaunayFillOptions == "delaunay-fill" or self.options.delaunayFillOptions == "delaunay-fill-random":
+ facestyle = {
+ 'stroke' : fills[triangle[random.randrange(0, 2)]],
+ 'stroke-width' : str(self.unittouu('0.005px')),
+ 'fill' : fills[triangle[random.randrange(0, 2)]],
+ 'stroke-linecap' : 'round',
+ 'stroke-linejoin' : 'round'
+ }
path = inkex.etree.Element(inkex.addNS('path','svg'))
path.set('d',simplepath.formatPath(cmds))
path.set('style',simplestyle.formatStyle(facestyle))
groupDelaunay.append(path)
-
+ i += 1;
+ #sys.stdout = saveout
#}}}
diff --git a/share/extensions/web-set-att.py b/share/extensions/web-set-att.py
index b224ed9aa..0dafcb974 100755
--- a/share/extensions/web-set-att.py
+++ b/share/extensions/web-set-att.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# local library
import inkwebeffect
diff --git a/share/extensions/web-transmit-att.py b/share/extensions/web-transmit-att.py
index 414eb12ea..bae6956b2 100755
--- a/share/extensions/web-transmit-att.py
+++ b/share/extensions/web-transmit-att.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# local library
import inkwebeffect
diff --git a/share/extensions/webslicer_create_group.py b/share/extensions/webslicer_create_group.py
index dd48c3e96..47e5f706f 100755
--- a/share/extensions/webslicer_create_group.py
+++ b/share/extensions/webslicer_create_group.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# local library
from webslicer_effect import *
diff --git a/share/extensions/webslicer_create_rect.py b/share/extensions/webslicer_create_rect.py
index b4e6858af..b68cd9ad8 100755
--- a/share/extensions/webslicer_create_rect.py
+++ b/share/extensions/webslicer_create_rect.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# local library
from webslicer_effect import *
diff --git a/share/extensions/webslicer_effect.py b/share/extensions/webslicer_effect.py
index d91d0ce85..acb78fcbd 100755
--- a/share/extensions/webslicer_effect.py
+++ b/share/extensions/webslicer_effect.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import inkex
diff --git a/share/extensions/webslicer_export.py b/share/extensions/webslicer_export.py
index a8a3c67ba..47db5369c 100755
--- a/share/extensions/webslicer_export.py
+++ b/share/extensions/webslicer_export.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
# standard library
import os
diff --git a/share/extensions/whirl.py b/share/extensions/whirl.py
index 7ee9cc0a2..93e04c60d 100755
--- a/share/extensions/whirl.py
+++ b/share/extensions/whirl.py
@@ -14,7 +14,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
'''
import math, inkex, cubicsuperpath
from simpletransform import computePointInNode
diff --git a/share/extensions/wireframe_sphere.py b/share/extensions/wireframe_sphere.py
index bda06af21..64a1266b6 100755
--- a/share/extensions/wireframe_sphere.py
+++ b/share/extensions/wireframe_sphere.py
@@ -45,7 +45,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
######VERSION HISTORY#####
Ver. Date Notes