MCPcopy Index your code
hub / github.com/geekcomputers/Python / draw_gradient_text

Function draw_gradient_text

Street_Fighter/src/main.py:161–168  ·  view source on GitHub ↗

Draws a gradient text by layering multiple text surfaces with slight offsets.

(text, font, x, y, colors)

Source from the content-addressed store, hash-verified

159
160
161def draw_gradient_text(text, font, x, y, colors):
162 """
163 Draws a gradient text by layering multiple text surfaces with slight offsets.
164 """
165 offset = 2
166 for i, color in enumerate(colors):
167 img = font.render(text, True, color)
168 screen.blit(img, (x + i * offset, y + i * offset))
169
170
171def main_menu():

Callers 2

main_menuFunction · 0.85
scores_screenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected