z_text_size.py

Created by cent20

Created on March 30, 2023

600 Bytes

Teste différents textes avec différents espacement. Attention, les couleurs de fond de texte doivent être choisie avec soin et ce n’est pas le cas ici)


from kandinsky import *

draw_string("0123456789 ABCDEFGHIJKLMNOPQRSTUVW",0,0,(64,64,64),(0,250,0))

draw_string("0123456789 ABCDEFGHIJKLMNOPQRSTUVW",20,20,(64,64,64),(0,250,0))

fill_rect(1,20,18,18,(64,64,64))

draw_string("test hauteur ligne h=20",0,40,(64,64,64),(200,200,0))
draw_string("test hauteur ligne h=20",0,60,(64,64,64),(200,200,0))

draw_string("test hauteur ligne h=18",0,80,(64,64,64),(200,200,0))
draw_string("test Q hauteur ligne h=18",20,98,(64,0,64),(200,0,200))

"""
Le texte efface sur une hauteur de 18 pixel
et une largeur de 10 pixels par caractère.
"""

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.