diff options
| author | Alvin Penner <penner@vaxxine.com> | 2010-02-28 22:40:23 +0000 |
|---|---|---|
| committer | Alvin Penner <penner@vaxxine.com> | 2010-02-28 22:40:23 +0000 |
| commit | 17d6841c21bda1e2af7d08273586fe0fa769e861 (patch) | |
| tree | dd21ba913aec28b754b80168a8876f318c3bd6e4 /share/extensions/Barcode | |
| parent | Compilation fixes for Windows 64-bit by Fridrich (diff) | |
| download | inkscape-17d6841c21bda1e2af7d08273586fe0fa769e861.tar.gz inkscape-17d6841c21bda1e2af7d08273586fe0fa769e861.zip | |
patch by Horst Schottky for LP 529114
Fixed bugs:
- https://launchpad.net/bugs/529114
(bzr r9119)
Diffstat (limited to 'share/extensions/Barcode')
| -rw-r--r-- | share/extensions/Barcode/Code128.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/share/extensions/Barcode/Code128.py b/share/extensions/Barcode/Code128.py index 42342c400..2f0b327ed 100644 --- a/share/extensions/Barcode/Code128.py +++ b/share/extensions/Barcode/Code128.py @@ -2,6 +2,7 @@ Copyright (C) 2007 Martin Owens Debugged by Ralf Heinecke & Martin Siepmann 09/07/2007 +Debugged by Horst Schottky Feb. 27. 2010 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 @@ -51,7 +52,7 @@ class Object(Barcode): # Split up into sections of numbers, or charicters # This makes sure that all the charicters are encoded # In the best way posible for Code128 - for datum in re.findall(r'(?:(?:\d\d){2,})|.', text): + for datum in re.findall(r'(?:(?:\d\d){2,})|(?:^\d\d)|.', text): if len(datum) == 1: block = block + datum else: @@ -96,7 +97,7 @@ class Object(Barcode): i = pos if pos: - num = num + (math.abs(num - 102) * 2) + num = 204 - num else: i = 1 |
