I've done:
class SDLThread:
def __init__(self,screen):
self.m_bKeepGoing = self.m_bRunning = False
self.screen = screen
self.color = (255,0,0)
self.rect = (10,10,100,100)
def Start(self):
self.m_bKeepGoing = self.m_bRunning = True
thread.star
I was told about Surface.get_buffer() which returns a BufferProxy object,
and after some poking around in help() and other documentation I'm still
confused about how to actually use it. (I see the bufferproxy file is a .so
file, so will I have to use some C fun to do anything more with it other
tha
Thanks, that worked.
TDH
On Saturday 12 April 2008 22:20, Ian Mallett wrote:
> To center the window do...
> os.environ['SDL_VIDEO_CENTERED'] = '1'
> ...before pygame.init()
>
> To center a rectangle inside the window, the top left is...
> x = (ScreenWidth/2) - (RectWidth/2)
> y = (ScreenHeight/2)
There really should be a way to increase the resolution with this
algorithm... grrr.
I
Mark Halegua wrote:
I want to center a rect on the screen. I know the formula for doing this
based on the size of the rect and the screen resolution, but don't know how
to specify where the rect starts on the screen.
I've looked at the documentation, but don't see how to do this.
this code
To center the window do...
os.environ['SDL_VIDEO_CENTERED'] = '1'
...before pygame.init()
To center a rectangle inside the window, the top left is...
x = (ScreenWidth/2) - (RectWidth/2)
y = (ScreenHeight/2) - (RectHeight/2)
TopLeftOfRect = (x,y)
HTH,
Ian
I want to center a rect on the screen. I know the formula for doing this
based on the size of the rect and the screen resolution, but don't know how
to specify where the rect starts on the screen.
I've looked at the documentation, but don't see how to do this.
this code is what I'm using to c
Marcus von Appen wrote:
On, Sat Apr 12, 2008, Marcus von Appen wrote:
[...]
Here's a second version of the patch that should improve the
pixels_alpha() method as well. It'd be great if you could give it a try,
too.
Regards
Marcus
I just realized that the pixels3d() isn't supposed to return
On 11 Apr 2008 at 21:33, Marcus von Appen wrote:
Is there some case where blitting a surface on itself might be
desired
or necessary? If not, I'll add a simple check that tests the passed
surface on equality and let blit() throw an exception, if both are
the same.
Its also used by effects, as
On, Sat Apr 12, 2008, Marcus von Appen wrote:
[...]
Here's a second version of the patch that should improve the
pixels_alpha() method as well. It'd be great if you could give it a try,
too.
Regards
Marcus
Index: lib/_numpysurfarray.py
10 matches
Mail list logo