negative shadow offset
This commit is contained in:
parent
eeb156b9e9
commit
6155bdcd7d
|
@ -172,8 +172,8 @@ def get_shadowed_text(text, font, offset, color, antialias=True, shadow_color=(0
|
|||
foreground = font.render(text, antialias, color)
|
||||
background = font.render(text, antialias, shadow_color)
|
||||
alpha = SRCALPHA if antialias else 0
|
||||
surface = Surface((foreground.get_width() + offset[0],
|
||||
foreground.get_height() + offset[1]), alpha)
|
||||
surface = Surface((foreground.get_width() + abs(offset[0]),
|
||||
foreground.get_height() + abs(offset[1])), alpha)
|
||||
if not antialias:
|
||||
surface.set_colorkey(colorkey)
|
||||
surface.fill(colorkey)
|
||||
|
|
Loading…
Reference in New Issue