Changeset 9171 for src/django_gheat


Ignore:
Timestamp:
May 9, 2011, 5:44:46 PM (14 years ago)
Author:
rick
Message:

Get rid of Deprication warning, caused as alpha cannot be a float.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/website/tile.py

    r9166 r9171  
    5858    alpha_per_radius = float(2.55 * (100 - transparancy)) / radius
    5959    for r in range(radius,1,-1):
    60       alpha = (radius - r) * alpha_per_radius
     60      alpha = int((radius - r) * alpha_per_radius)
    6161      pygame.draw.circle(new_surf,colour + (alpha,),center,r,0)
    6262    self.surf.blit(new_surf,(0,0),special_flags=pygame.BLEND_RGBA_MAX)
Note: See TracChangeset for help on using the changeset viewer.