Skip to content
This repository was archived by the owner on May 23, 2020. It is now read-only.

Commit 1de4c6a

Browse files
committed
final commit
1 parent 5d3e13b commit 1de4c6a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

images/Thumbs.db

51 KB
Binary file not shown.

main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def undo():
263263
try:
264264
main_copy.blit(undo_list[-1], (0,0))
265265
redo_list.append(undo_list[-1])
266-
undo_list = undo_list[:-1]
266+
del undo_list[-1]
267267
except:
268268
pass
269269

@@ -273,8 +273,7 @@ def redo():
273273
global undo_list, redo_list
274274
try:
275275
main_copy.blit(redo_list[-1], (0,0))
276-
undo_list.append(redo_list[-1])
277-
redo_list = redo_list[:-1]
276+
undo_list.append(redo_list.pop())
278277
except:
279278
pass
280279

rdraw.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def pencil(surface, color, x, y, ox, oy, size):
1010
sx = ox - x
1111
sy = oy - y
1212
dist = int(max(abs(sx), abs(sy)))
13-
draw.circle(surface, color, (x, y), size // 2)
13+
draw.circle(surface, color, (x, y), size // 2) #Draw connected circles to form lines
1414
for i in range(dist):
1515
draw.circle(surface, color, (int(x + (i * sx) / dist), int(y + (i * sy) / dist)), size // 2)
1616

@@ -20,7 +20,7 @@ def eraser(surface, x, y, ox, oy, size):
2020
sx = ox - x
2121
sy = oy - y
2222
dist = int(max(abs(sx), abs(sy)))
23-
draw.circle(surface, (255,255,255), (x,y), size * 6)
23+
draw.circle(surface, (255,255,255), (x,y), size * 6) #Draw connected circles to form eraser
2424
for i in range(dist):
2525
draw.circle(surface, (255,255,255), (int(x + (i * sx) / dist), int(y + (i * sy) / dist)), size * 6)
2626

@@ -35,7 +35,7 @@ def brush(surface, color, x, y, ox, oy, size):
3535
sx = ox - x
3636
sy = oy - y
3737
dist = int(max(abs(sx), abs(sy)))
38-
surface.blit(brush_surface, (x - (size * 3), y - (size * 3)))
38+
surface.blit(brush_surface, (x - (size * 3), y - (size * 3))) #Draw connected surfaces with alpha value to form brush
3939
for i in range(dist):
4040
surface.blit(brush_surface, (int(x + (i * sx) / dist) - (size * 3), int(y + (i * sy) / dist) - (size * 3)))
4141

0 commit comments

Comments
 (0)