Fonction draw_string_bigger()
qui permet de dessiner un chaine agrandie.
Usage : draw_string_bigger(txt_string : str, x_position : int, y_position : int, size : int, <letter_color : tuple>, <background_color : tuple>)
Warning : don’t use a y position <20.
from kandinsky import * def draw_string_bigger(txt,ox,oy,size,*colors): x,y,s=lambda i:i%10,lambda i:i//10,size del size for n,char in enumerate(txt): buffer=[] for i in range(180):buffer.append(get_pixel(n*10+x(i),y(i))) draw_string(char,n*10,0,*colors) for i in range(180): fill_rect(ox+(x(i)+n*10)*s,oy+y(i)*s,s,s,get_pixel(n*10+x(i),y(i))) set_pixel(n*10+x(i),y(i),buffer[i]) draw_string_bigger ("text",0,20,4)