Changeset 9174 for src/django_gheat/website/tile.py
- Timestamp:
- May 10, 2011, 1:56:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/website/tile.py
r9172 r9174 58 58 alpha_per_radius = float(2.55 * (100 - transparancy)) / radius 59 59 for r in range(radius,1,-1): 60 alpha = int((radius - r) * alpha_per_radius) 61 pygame.draw.circle(new_surf,colour + (alpha,),center,r,0) 60 alpha = min(255,int((radius - r) * alpha_per_radius)) 61 combined_colour = colour + (alpha,) 62 pygame.draw.circle(new_surf,combined_colour,center,r,0) 62 63 self.surf.blit(new_surf,(0,0),special_flags=pygame.BLEND_RGBA_MAX) 63 64
Note:
See TracChangeset
for help on using the changeset viewer.