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))