Add card border
This commit is contained in:
parent
373d15c542
commit
cfb6cfb54c
1 changed files with 12 additions and 6 deletions
18
main.py
18
main.py
|
|
@ -19,13 +19,13 @@ def main():
|
||||||
|
|
||||||
def draw_card_face(color, symbol):
|
def draw_card_face(color, symbol):
|
||||||
with Image(filename='assets/wozard-card.png') as img:
|
with Image(filename='assets/wozard-card.png') as img:
|
||||||
img = draw_symbol(img, symbol, color, 90, 130)
|
draw_symbol(img, symbol, color, 100, 150)
|
||||||
img = draw_symbol(img, symbol, color, int(img.width - 90), 130)
|
draw_symbol(img, symbol, color, int(img.width - 100), 150)
|
||||||
img.flip() # Make mirrored text
|
img.flip() # Make mirrored text
|
||||||
img = draw_symbol(img, symbol, color, 90, 130)
|
draw_symbol(img, symbol, color, 100, 150)
|
||||||
img = draw_symbol(img, symbol, color, int(img.width - 100), 130)
|
draw_symbol(img, symbol, color, int(img.width - 100), 150)
|
||||||
img = draw_rune(img, color)
|
draw_rune(img, color)
|
||||||
|
draw_card_trim(img)
|
||||||
draw_mask(img, color)
|
draw_mask(img, color)
|
||||||
save_img(img, color, symbol)
|
save_img(img, color, symbol)
|
||||||
|
|
||||||
|
|
@ -53,6 +53,12 @@ def draw_rune(img, color):
|
||||||
|
|
||||||
return img
|
return img
|
||||||
|
|
||||||
|
def draw_card_trim(img):
|
||||||
|
with Image(filename='assets/card-trim.png') as trim:
|
||||||
|
img.composite(trim)
|
||||||
|
|
||||||
|
return img
|
||||||
|
|
||||||
def draw_mask(img, color):
|
def draw_mask(img, color):
|
||||||
# Mask with a pink outline. This pink outline is this replaced
|
# Mask with a pink outline. This pink outline is this replaced
|
||||||
# with a transparency layer before being returned
|
# with a transparency layer before being returned
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue