Re: [pygame] Problem in PyGame.SurfArray

2011-08-26 Thread Ian Mallett
On Fri, Aug 26, 2011 at 5:36 PM, Lenard Lindstrom wrote: > Implemented with changeset 0d2f059b5e4a. Float values are rounded with > numpy.rint. Issue #81 closed. Thanks!

Re: [pygame] Problem in PyGame.SurfArray

2011-08-26 Thread Lenard Lindstrom
On 25/08/11 06:31 PM, Lenard Lindstrom wrote: On 25/08/11 03:02 PM, Ian Mallett wrote: On Thu, Aug 25, 2011 at 1:05 AM, Lenard Lindstrom > wrote: Hi, The behavior here was to truncate the float value into an int. But if that is what you are talking about, th

Re: [pygame] rendering anti-alias in argument color with transparency

2011-08-26 Thread Aaron Brady
On Fri, Aug 26, 2011 at 12:11 PM, Lenard Lindstrom wrote: > On 26/08/11 04:25 AM, Aaron Brady wrote: >> >> I'd like to know if anti-aliased objects, in particular the edges of >> lines and fonts, can be rendered using transparency instead of >> directly blended colors.  Specifically, can the funct

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread Lenard Lindstrom
On 26/08/11 12:04 PM, René Dudfield wrote: On Fri, Aug 26, 2011 at 8:52 PM, Lenard Lindstrom > wrote: Generally, yes. But the examples highlight specific modules. And on Debian squeeze the alsa sound system keeps printing annoying buffer underflow messages to

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread René Dudfield
On Fri, Aug 26, 2011 at 8:52 PM, Lenard Lindstrom wrote: > Generally, yes. But the examples highlight specific modules. And on Debian > squeeze the alsa sound system keeps printing annoying buffer underflow > messages to the console when the mixer module is initialized but not used. > > Lenard >

Re: SysFont wrongly italicizes text on XP, was Re: [pygame] BUG: SysFont hangs when loading certain fonts (with cause and fix ideas)

2011-08-26 Thread Lenard Lindstrom
On 26/08/11 11:29 AM, René Dudfield wrote: Hi, I noticed another SysFont issue is the issue tracker: "SysFont wrongly italicizes text on XP" https://bitbucket.org/pygame/pygame/issue/64/sysfont-wrongly-italicizes-text-on-xp Is anyone on Windows XP able to confirm that the script below shows

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread Lenard Lindstrom
On 26/08/11 11:32 AM, René Dudfield wrote: On Fri, Aug 26, 2011 at 8:28 PM, Lenard Lindstrom > wrote: Hi, The "pygame.init('display', ...) is redundant. The exclude list would be useful for omitting an unused, costly, module. But in general I agree that c

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread Christopher Night
On Fri, Aug 26, 2011 at 2:28 PM, Lenard Lindstrom wrote: > The "pygame.init('display', ...) is redundant. The exclude list would be > useful for omitting an unused, costly, module. But in general I agree that > calling init() only on those modules that are used is good programming > practice. The

Re: SysFont wrongly italicizes text on XP, was Re: [pygame] BUG: SysFont hangs when loading certain fonts (with cause and fix ideas)

2011-08-26 Thread Ian Mallett
I can confirm that results are *different* from the example (i.e., not italicized), on Windows 7.

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread René Dudfield
On Fri, Aug 26, 2011 at 8:28 PM, Lenard Lindstrom wrote: > Hi, > > The "pygame.init('display', ...) is redundant. The exclude list would be > useful for omitting an unused, costly, module. But in general I agree that > calling init() only on those modules that are used is good programming > pract

SysFont wrongly italicizes text on XP, was Re: [pygame] BUG: SysFont hangs when loading certain fonts (with cause and fix ideas)

2011-08-26 Thread René Dudfield
Hi, I noticed another SysFont issue is the issue tracker: "SysFont wrongly italicizes text on XP" https://bitbucket.org/pygame/pygame/issue/64/sysfont-wrongly-italicizes-text-on-xp Is anyone on Windows XP able to confirm that the script below shows italic fonts when ran? The screen shot her

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread Lenard Lindstrom
On 26/08/11 11:15 AM, René Dudfield wrote: On Fri, Aug 26, 2011 at 8:10 PM, Lenard Lindstrom > wrote: An exclude list for pygame.init() : pygame.init(exclude=['movie', ]) That is feasible. And with no keyword argument: pygame.init('display', 'mix

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread René Dudfield
On Fri, Aug 26, 2011 at 8:10 PM, Lenard Lindstrom wrote: > An exclude list for pygame.init() : > > pygame.init(exclude=['movie', ]) > > That is feasible. And with no keyword argument: > > pygame.init('display', 'mixer', ...) > > only those modules are initialized. > > pygame.init() > > would

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread Lenard Lindstrom
An exclude list for pygame.init() : pygame.init(exclude=['movie', ]) That is feasible. And with no keyword argument: pygame.init('display', 'mixer', ...) only those modules are initialized. pygame.init() would continue to initialize everything. If this looks good I will add it to the wi

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread John Jameson
Actually, come to think of it I meant to say (with tongue in cheek) "pygame.init_all_but(XXX)" not "from pygame import all but xxx" but what you are suggesting is probably a good idea too (I guess, I'm just starting with pygame). On 8/26/11 10:05 AM, "Lenard Lindstrom" wro

Re: [pygame] rendering anti-alias in argument color with transparency

2011-08-26 Thread Lenard Lindstrom
On 26/08/11 04:25 AM, Aaron Brady wrote: I'd like to know if anti-aliased objects, in particular the edges of lines and fonts, can be rendered using transparency instead of directly blended colors. Specifically, can the function calls draw 4- tuples of ( r, g, b ) specified in the arguments, plu

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread Lenard Lindstrom
Hi John, I have experimented with lazy importing of Pygame modules. Modules are only loaded when directly accessed. It does decrease Pygame startup time. I am considering adding it to Pygame 1.9.2. If there is interest I can make it a priority. The main roadblock was making lazy imports optio

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread John Jameson
Yes, thanks, this did help on one little program so far. If I knew which package(s) were really slow at loading then it'd be great if there were a python command like "from pygame import all but xxx" ;-) From: Jack Anderson Reply-To: Date: Fri, 26 Aug 2011 09:30:35 -0700 To: Subject:

Re: [pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread Jack Anderson
Init() from my understanding is just a shortcut to call all of the initialization functions on the main pygame packages, it is likely a specific pygame package which is causing the slowdown, try calling the init() functions on only the packages you need, i.e. display, mixer, etc. And see if that he

[pygame] very slow pygame.init() under Snow Leopard

2011-08-26 Thread John Jameson
I have a new Macbook Pro running 10.6 Snow Leopard and when I run any pygame code that calls pygame.init() it takes literally about 10 seconds to complete the call. Other examples, like "Samegame" are quite elaborate but don't call init() and start up immediately. Any thoughts anyone? I installed

Re: [pygame] Re: rendering anti-alias in argument color with transparency

2011-08-26 Thread Ian Mallett
It just occurred to me that the simplest way to do this is to draw several normal circles, somewhat jittered on different surfaces, and then average them all together.

Re: [pygame] Re: rendering anti-alias in argument color with transparency

2011-08-26 Thread Aaron Brady
On Fri, Aug 26, 2011 at 7:41 AM, René Dudfield wrote: > Hey, > > Can you try doing a fill to your surface first? > > > I guess it's likely a bug in the drawing code. > > Here is the wrapper source for the circle function... > > https://bitbucket.org/pygame/pygame/src/427a9ac7bd91/src/gfxdraw.c#cl-

Re: [pygame] patch: build against frameworks or regular libraries on OS X

2011-08-26 Thread René Dudfield
On Wed, Aug 17, 2011 at 10:37 AM, Ben Willmore wrote: > On Mac OS X, libraries can be installed either as frameworks (e.g. by the > system and MacPorts) or as regular libraries (e.g. by hand, homebrew, or > fink). Pygame's config_darwin.py assumes that frameworks are installed. I > modified confi

Re: [pygame] Re: rendering anti-alias in argument color with transparency

2011-08-26 Thread René Dudfield
Hey, Can you try doing a fill to your surface first? I guess it's likely a bug in the drawing code. Here is the wrapper source for the circle function... https://bitbucket.org/pygame/pygame/src/427a9ac7bd91/src/gfxdraw.c#cl-404 and here is the C code... https://bitbucket.org/pygame/pygame/sr

[pygame] Re: rendering anti-alias in argument color with transparency

2011-08-26 Thread Aaron Brady
On Aug 26, 6:34 am, René Dudfield wrote: [snip] > > I'd like to know if anti-aliased objects, in particular the edges of > > lines and fonts, can be rendered using transparency instead of > > directly blended colors.  Specifically, can the function calls draw 4- > > tuples of ( r, g, b ) specified

Re: [pygame] rendering anti-alias in argument color with transparency

2011-08-26 Thread René Dudfield
On Fri, Aug 26, 2011 at 1:25 PM, Aaron Brady wrote: > Hello, > > I've done a lot of pygame. > > http://home.comcast.net/~castironpi-misc/pathfinding.1314246907.png > http://home.comcast.net/~castironpi-misc/raster.1313242414.png > http://home.comcast.net/~castironpi-misc/bezier_motion.1291142199.

[pygame] rendering anti-alias in argument color with transparency

2011-08-26 Thread Aaron Brady
Hello, I've done a lot of pygame. http://home.comcast.net/~castironpi-misc/pathfinding.1314246907.png http://home.comcast.net/~castironpi-misc/raster.1313242414.png http://home.comcast.net/~castironpi-misc/bezier_motion.1291142199.png And some including C extensions. http://home.comcast.net/~ca