Welcome
Installation
Getting Started
User Interaction
Build a Game #1
Build a Game #2
Build a Game #3
Colours
Coordinates
API Reference
Globals
Window
Camera
Mouse
Key
Rect
Image
Text
Shape
Line
Screen
Sound
Base
Rect
The Rect class is for rendering rectangles.
It is a subclass of Base.
__init__(x = 0, y = 0, width = 50, height = 50, angle = 0, color = BLACK)
Call the rectangle initialiser.
x: floatThe x position of the rectangle
y: floatThe y position of the rectangle
width: floatThe width of the rectangle
height: floatThe height of the rectangle
angle: floatThe rotation of the rectangle
color: float, float, float, floatThe colour of the rectangle
width: float
The width of the rectangle.
height: float
The height of the rectangle.
size: float, float
The size of the rectangle.
x: floatThe width of the rectangle
y: floatThe height of the rectangle