Negative colors on wizard. Fixed saving for nothing cards and wiz cards
This commit is contained in:
parent
1a372dc3b5
commit
545f1c2a36
1 changed files with 9 additions and 2 deletions
11
main.py
11
main.py
|
|
@ -39,9 +39,15 @@ def draw_card_face(color, symbol):
|
||||||
draw_symbol(img, symbol, color.hex_val, 120, 190)
|
draw_symbol(img, symbol, color.hex_val, 120, 190)
|
||||||
draw_symbol(img, symbol, color.hex_val, int(img.width - 120), 190)
|
draw_symbol(img, symbol, color.hex_val, int(img.width - 120), 190)
|
||||||
draw_rune(img, color)
|
draw_rune(img, color)
|
||||||
draw_card_trim(img)
|
|
||||||
draw_mask(img)
|
draw_mask(img)
|
||||||
|
if (symbol == "W"):
|
||||||
|
img.negate(channel="rgb")
|
||||||
|
draw_card_trim(img)
|
||||||
save_img(img, color.asset, symbol)
|
save_img(img, color.asset, symbol)
|
||||||
|
if (symbol == "W"):
|
||||||
|
save_img(img, color.asset, 40)
|
||||||
|
if (symbol == "N"):
|
||||||
|
save_img(img, color.asset, 0)
|
||||||
|
|
||||||
def draw_symbol(img, symbol, hex_color, x, y):
|
def draw_symbol(img, symbol, hex_color, x, y):
|
||||||
with Drawing() as draw:
|
with Drawing() as draw:
|
||||||
|
|
@ -89,7 +95,8 @@ def draw_mask(img):
|
||||||
img.composite_channel('all_channels', mask, 'screen')
|
img.composite_channel('all_channels', mask, 'screen')
|
||||||
img.opaque_paint(target=Color("#c300ff"), fill=Color("transparent"), fuzz=0.4*img.quantum_range)
|
img.opaque_paint(target=Color("#c300ff"), fill=Color("transparent"), fuzz=0.4*img.quantum_range)
|
||||||
return img
|
return img
|
||||||
|
|
||||||
|
|
||||||
def save_img(img, color, symbol):
|
def save_img(img, color, symbol):
|
||||||
print('Created card {} {}'.format(color, symbol))
|
print('Created card {} {}'.format(color, symbol))
|
||||||
sizes = ['50', '25']
|
sizes = ['50', '25']
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue