[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] multi-width aalines and aacircles



Hi,

very cool module :)

I uploaded some png's for people to see:
http://rene.f0o.com/~rene/stuff/aapolygon.png
http://rene.f0o.com/~rene/stuff/aacircle.png



However, with ubuntu SDL_gfx I get this error:

>>> import pygame.gfxdraw
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/python2.5/site-packages/pygame/gfxdraw.so: undefined symbol: arcRGBA

I guess arcRGBA isn't in the version I have... which is version 2.0.13 - a pretty a old SDL_gfx (current is 2.0.19pre).


So... I'll try and start submitting bug reports to distros for them to update SDL_gfx.  However that won't help us for 1-2 years -- by the time they process the bug report, then finally get around to packaging the newer version - then time for people to upgrade their distros...  Also, I think we'll probably try and get some newer fixes into SDL_gfx, so for now including it with pygame is probably better.

Instead, can we include SDL_gfx parts in with pygame?  including the whole directory in src/SDL_gfx/ .

I changed Setup to this, which compiled and worked:

GFX = src/SDL_gfx/SDL_gfxBlitFunc.c src/SDL_gfx/SDL_gfxPrimitives.c
gfxdraw src/gfxdraw.c $(SDL) $(GFX) $(DEBUG)


Instead of including it in src/... we could put it in branch/SDL_gfx and put a svn external to src/SDL_gfx   (SDL_gfx doesn't appear to use public version control).  Or we could just include the needed files needed.  I think a branch with svn external to src/SDL_gfx would be best... then it's nicely separated.  Then when we release a source tar.gz/.zip we include it with the pygame sources.


cheers,






On Thu, Mar 26, 2009 at 6:33 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
You can see for yourself:

http://www3.telus.net/len_l/pygame/gfx_antialiasing.tar.gz

Because of a bug aapolygon_gfx.py will not work with the gfx enabled Windows binaries I have provide. The latest Pygame out of SVN is needed. But you can still look at the images I took from a screen shot.

Lenard


Lenard Lindstrom wrote:
The results actually look good though, if one first draws the outline, then the filled version. Circles not quit so good, but better than with no anti-aliasing.

Lenard

RB[0] wrote:
You could do a filled polygon and then an aa one around it...
But I think then you'd be getting a lot slower...

On Wed, Mar 25, 2009 at 1:44 PM, Lenard Lindstrom <len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx>> wrote:

   The aa polygon is not filled, and the filled polygon does no aa.

   Lenard


   René Dudfield wrote:

       good idea.

       there's an aa-polygon in sdl gfx


       On Wed, Mar 25, 2009 at 5:38 PM, Greg Ewing
       <greg.ewing@xxxxxxxxxxxxxxxx
       <mailto:greg.ewing@xxxxxxxxxxxxxxxx>> wrote:
                   Lenard Lindstrom wrote:

                             Yes, but we still need an aaline algorithm with line
               width.
                               Find an aa polygon algorithm and then use it to
           draw line-shaped polygons.

             




--
Lenard Lindstrom
<len-l@xxxxxxxxx>