[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] Re: Antialiased draw functions



Nat Pryce wrote:
> Talking of antialising and Pygame...  does Pygame support the antialiased
> line, circle and ellipse drawing functions from SDL_gfx? Is there any plan
> to?  I'd love an AA ellipse function for my current project, as it's a
> simple way of generating nice looking shadows for isometric 3D sprites.

yeah, i just noticed the SDL_gfx library. it is combined from many 
different little SDL utility libraries out there (like SDL_gfxPrimtives 
and SDL_rotozoom). it does some cool drawing functions, like 
antialiasing and alphablends. they've also added some MMX-enhanced image 
filters.

unfortunately these functions are also what i based a lot of the 
pygame.draw functions on currently. remember all the problems with the 
circle and ellipse functions? ugh, my circles are 'pretty much' fixed, 
but i believe the problems still remain in SDL_gfx. the docs also 
mention the filter functions are very much 'untested'. hmmm

i'm also afraid the draw functions are very slow? early on 
SDL_gfxPrimitives adopted the line drawing from pygame, since it was 
about 10x faster than the one they were using. haven't done any testing 
on the other drawing primitives.

the SDL_gfx has a lot of cool functions, i'm afraid it's kind of a 
"grab-bag" of code though. most of it ugly and hard to work with.


on another note.. as for generating ellipse shadows for your sprites. 
just create a nice pretty ellipse in gimp with all the alpha and edges 
you want. if you need multiple sizes, transform.size() will be able to 
get good results with those types of images. this will also look better 
than a drawn ellipse (even with aa)


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org