scale pensize with grid

This commit is contained in:
Chris Proctor 2023-08-12 15:44:42 -04:00
parent 04dd780765
commit ff55612566
1 changed files with 4 additions and 4 deletions

View File

@ -16,9 +16,9 @@ from superturtle.movement import no_delay
import typeface
GRID_COLOR = "lightgrey"
GRID_SIZE = 1
GRID_SIZE = 0.1
LETTER_COLOR = "black"
LETTER_SIZE = 3
LETTER_SIZE = 0.3
LETTERS_PER_ROW = 7
ALPHABET = "abcdefghijklmnopqrstuvwxyz"
@ -48,10 +48,10 @@ def draw_proof_sheet(unit):
if i > 0 and i % LETTERS_PER_ROW == 0:
go_to_next_line(unit)
color(GRID_COLOR)
pensize(GRID_SIZE)
pensize(GRID_SIZE * unit)
draw_grid(unit)
color(LETTER_COLOR)
pensize(LETTER_SIZE)
pensize(LETTER_SIZE * unit)
letter_function = getattr(typeface, f"draw_letter_{letter}")
letter_function(unit)
fly((GRID_ROWS + 1) * unit)