Re: [pygame] draw.rect question real simple

2007-09-10 Thread Lamonte Harris
Ok kool I sort of thought so.  Thanks for the quick reply.

More questions coming soon :).

On 9/10/07, Kris Schnee <[EMAIL PROTECTED]> wrote:
>
> Lamonte Harris wrote:
> > So basically pygame.draw.rect basically draws on the rect onto the
> > surface, so its not actually assigned to anything(such as a variable).
>
> Right; it just performs the action of drawing a rectangle on the
> specified surface. Note, though, that according to:
> http://pygame.org/docs/ref/draw.html#pygame.draw.rect
> the function returns a Rect object (nearly the same thing as a 4-entry
> tuple) which you can ignore. If you really wanted to know where the rect
> was drawn, you could capture that return value like so:
> spam = pygame.draw.rect(...)
> print spam
>
> In terms of it being "assigned to" something, it's a function of the
> pygame.draw module.
>


Re: [pygame] draw.rect question real simple

2007-09-10 Thread Kris Schnee

Lamonte Harris wrote:
So basically pygame.draw.rect basically draws on the rect onto the 
surface, so its not actually assigned to anything(such as a variable).


Right; it just performs the action of drawing a rectangle on the 
specified surface. Note, though, that according to:

http://pygame.org/docs/ref/draw.html#pygame.draw.rect
the function returns a Rect object (nearly the same thing as a 4-entry 
tuple) which you can ignore. If you really wanted to know where the rect 
was drawn, you could capture that return value like so:

spam = pygame.draw.rect(...)
print spam

In terms of it being "assigned to" something, it's a function of the 
pygame.draw module.


[pygame] draw.rect question real simple

2007-09-10 Thread Lamonte Harris
So basically pygame.draw.rect basically draws on the rect onto the surface,
so its not actually assigned to anything(such as a variable).