[Python] How do I get polygon rect without drawing it? [duplicate]

Discussão em 'Python' iniciado por Stack, Agosto 25, 2025.

  1. Stack

    Stack Membro Participativo

    How do I get polygon rect without drawing it?

    I want to get the rect of a polygon without drawing it, I know about pygame.Rect but to my knowledge it cannot do polygons, only regular rectangles.

    Is there any way to do this?

    I have tried to research it and this is what I found on the official pygame documentation:

    Rect(width, height) -> Rect
    Rect((left, top), (width, height)) -> Rect
    Rect(object) -> Rect


    I know how to use the top two, but I don't know how to use the bottom one, does it support polygons?

    Continue reading...

Compartilhe esta Página