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

Re: [pygame] Anti-aliasing problem



Pete Shinners <shredwheat@mediaone.net>:
>
> Magnus Lie Hetland wrote:
> > Attached to this mail, warts and all <wink>
> 
> i've looked over the code, and don't directly see anything that would 
> cause you problems with alpha. i was specifically looking for a 
> "convert()" call on the rendered text image, but that would be giving 
> you a solid box outline around the text, instead of just destroying the aa.
> 
> hmm, and i know you're not blitting to an 8bit display, since SDL 
> doesn't support blitting alpha surfaces to 8bit surfaces.
 
Strange... And the odd thing is that it *does* work to begin with...
it only stops working after a while. And I do blit an image onto the
screen in the beginning too... (Except that doesn't use transparency.)

The effect is really unfortunate, since the text looks extremely ugly
;}

> sorry magnus, i can't figure out the difference. it might help if i 
> could see the effect, but i can't see anything in the code that wouldn't 
> work as i'd expect here.

You mean a screenshot could help? (I could put the entire code
base/data dir in a tarball somewhere, if you'd like to try it out and
see if it's just my installation that's acting up or something...)

> also, a shredwheat helpful tip of the day...
>      textpos.centerx = screen.get_rect().centerx
>      textpos.centery = screen.get_rect().centery
> can become
>      textpos.center = screen.get_rect().center
 
Err... Yes, of course. Thanks. I've just been playing around with
various versions. (It's a bit like my PostScript code; messing around
with coordinate calculations until it's completely unreadable :)

(BTW, in case you're interested: I'm planning on using PyGame for
developing a small game in one of the chapters in my upcoming book
"Instant Python" :)

--
Magnus Lie Hetland                                  The Anygui Project
http://hetland.org                                  http://anygui.org
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org