[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] PGU and Text Boxes



Brian, Yep, I followed the instruction you mentioned, but it doenst work =(


On 5/10/06, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
On 5/10/06, andrew baker <failrate@xxxxxxxxx> wrote:
> Don't use center as a keyword.  Don't use a keyword.
>
> get_rect
>  Surface.get_rect() -> rect
> Returns a new rectangle covering the entire surface. This rectangle will
> always start at 0, 0 with a width. and height the same size as the image.
>
>
> In fact, it looks like get_rect() doesn't take ANY arguments.
>
Hmm... I think you are right about get_rect not taking arguments, but
where are you getting those docs? the ones at pygame.org (incorrectly)
say you can supply keyword arguments:
http://www.pygame.org/docs/ref/surface.html#Surface.get_rect

"You can pass keyword argument values to this function. These named
values will be applied to the attributes of the Rect before it is
returned. An example would be 'mysurf.get_rect(center=(100,100))' to
create a rectangle for the Surface centered at a given position."