[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] draw.rect question real simple
Ok kool I sort of thought so. Thanks for the quick reply.
More questions coming soon :).
On 9/10/07, Kris Schnee <
kschnee@xxxxxxxxxx> 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.