X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=share%2Fextensions%2FBarcode%2FCode128.py;h=2f0b327ed44a988274efe53d1b390edca6ecb4d1;hb=52d62650393407fd50887902c99c6dec650d74ea;hp=42342c40043c7ebb04bd396ae5268046dc2ac5c1;hpb=b7ce264feafa1fd753a4bc30ebbf36261018b0dc;p=inkscape.git 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