Skip to content

Commit

Permalink
28
Browse files Browse the repository at this point in the history
  • Loading branch information
villares committed Nov 29, 2024
1 parent 4c8f9ba commit 5e53f8e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Binary file added 2024/sketch_2024_11_28/sketch_2024_11_28.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions 2024/sketch_2024_11_28/sketch_2024_11_28.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

def setup():
global img_c
size(446, 454)
img_a = load_image('xfce.png')
img_b = load_image('manjaro.png')
img_c = create_graphics(width, height)
H = 10
img_c.begin_draw()
cols = width // H
rows = height // H
for i in range(cols):
x = i * H
for j in range(rows):
y = j * H
if (i + j) % 2:
img = img_a.get_pixels(x, y, H, H)
else:
img = img_b.get_pixels(x, y, H, H)
image(img, x, y)
img_c.end_draw()

def draw():
image(img_c, 0, 0)

def key_pressed():
save_frame('out.png')


0 comments on commit 5e53f8e

Please sign in to comment.