Commit ·
a92047f
1
Parent(s): 2250791
0-coin: draw the '0' as an open ring instead of a filled glyph
Browse filesThe text '0' with its outline filled the centre and looked like a solid dot. Replace it
with a hollow oval ring so it reads as an unfilled zero.
431 unmodified lines432433434435436437438439440441431 unmodified lineselif value < 0:d.ellipse([cx - r, cy - r, cx + r, cy + r], fill=(231, 76, 60), outline=(150, 40, 30), width=3)tcol = (255, 235, 235)else: # 0: pale coin with a dark outline (readable on any bg)d.ellipse([cx - r, cy - r, cx + r, cy + r], fill=(228, 228, 232),outline=(20, 20, 24), width=3)tcol = (20, 20, 24)text(d, cx, cy - 9, label, size=17, bold=True, fill=tcol, center=True, outline=True)431 unmodified lines432433434435436437438439440441442443431 unmodified lineselif value < 0:d.ellipse([cx - r, cy - r, cx + r, cy + r], fill=(231, 76, 60), outline=(150, 40, 30), width=3)tcol = (255, 235, 235)else: # 0: pale coin; the "0" is an OPEN ring (not filled)d.ellipse([cx - r, cy - r, cx + r, cy + r], fill=(228, 228, 232),outline=(20, 20, 24), width=3)rw, rh = int(r * 0.34), int(r * 0.48) # oval ring -> reads as a hollow "0"d.ellipse([cx - rw, cy - rh, cx + rw, cy + rh], outline=(20, 20, 24), width=3)returntext(d, cx, cy - 9, label, size=17, bold=True, fill=tcol, center=True, outline=True)
sprites.py+4-2