Synchronized example Python code in setup.py with main readme (related to commit 7e72bd8dfb).

pull/39/merge
Project Nayuki 6 years ago
parent 391c5fcc20
commit dae06a30aa

@ -97,11 +97,9 @@ Examples:
# Manual operation
segs = QrSegment.make_segments("3141592653589793238462643383")
qr1 = QrCode.encode_segments(segs, QrCode.Ecc.HIGH, 5, 5, 2, False)
border = 4
for y in range(-border, qr1.get_size() + border):
for x in range(-border, qr1.get_size() + border):
color = qr1.get_module(x, y) # False for white, True for black
# (... paint the module onto pixels ...)
for y in range(qr1.get_size()):
for x in range(qr1.get_size()):
(... paint qr1.get_module(x, y) ...)
More complete set of examples: https://github.com/nayuki/QR-Code-generator/blob/master/python/qrcodegen-demo.py .

Loading…
Cancel
Save