My favorites
▼
|
Sign in
pyqrnative
Native Python QR code generation library
Project Home
Wiki
Issues
Source
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
5
attachment: pyqr.diff
(1.1 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- PyQRNative.py (revision 24)
+++ PyQRNative.py (working copy)
@@ -37,9 +37,10 @@
return self.data
class QRCode:
- def __init__(self, typeNumber, errorCorrectLevel):
+ def __init__(self, typeNumber, errorCorrectLevel, boxSize=10):
self.typeNumber = typeNumber
self.errorCorrectLevel = errorCorrectLevel
+ self.boxSize = boxSize
self.modules = None
self.moduleCount = 0
self.dataCache = None
@@ -119,7 +120,7 @@
def createMovieClip(self):
raise Exception("Method not relevant to Python port")
def makeImage(self):
- boxsize = 10 #pixels per box
+ boxsize = self.boxSize #pixels per box
offset = 4 #boxes as border
pixelsize = (self.getModuleCount() + offset + offset) * boxsize
@@ -131,7 +132,7 @@
if (self.isDark(r, c) ):
x = (c + offset) * boxsize
y = (r + offset) * boxsize
- b = [(x,y),(x+boxsize,y+boxsize)]
+ b = [(x,y),(x+boxsize-1,y+boxsize-1)]
d.rectangle(b,fill="black")
del d
return im
Powered by
Google Project Hosting