qrcode.py

Created by laurent-cortot

Created on December 13, 2019

817 Bytes

Dessin d’un viseur de QRCode


from kandinsky import *

# Valeurs pour espace grahique NumWorks
xMax = 320
yMax = 240 - 20

CCInt = 100
EpSel = 10
lCoin = (CCInt + 2 * EpSel) * 3//8

xDeb=(xMax-(CCInt + 2 * EpSel)) // 2
yDeb=(yMax-(CCInt + 2 * EpSel)) // 2

fill_rect(xDeb+EpSel,yDeb+EpSel, CCInt, CCInt, color(255,0,0))

fill_rect(xDeb,yDeb,lCoin,EpSel,color(0,0,255))
fill_rect(xDeb,yDeb,EpSel,lCoin,color(0,0,255))
fill_rect(xDeb+2*EpSel+CCInt-lCoin,yDeb,lCoin,EpSel,color(0,0,255))
fill_rect(xDeb+EpSel+CCInt,yDeb,EpSel,lCoin,color(0,0,255))

fill_rect(xDeb,yDeb+EpSel+CCInt,lCoin,EpSel,color(0,0,255))
fill_rect(xDeb,yDeb+CCInt+2*EpSel-lCoin,EpSel,lCoin,color(0,0,255))
fill_rect(xDeb+2*EpSel+CCInt-lCoin,yDeb+EpSel+CCInt,lCoin,EpSel,color(0,0,255))
fill_rect(xDeb+EpSel+CCInt,yDeb+2*EpSel+CCInt-lCoin,EpSel,lCoin,color(0,0,255))

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.