Texture
A 2D texture that can be rendered to the screen.
-
Texture(file_path: str)
-
Texture(pixel_array: PixelArray)
Properties
Name | Description | Type |
---|---|---|
flip | Whether the texture is flipped horizontally and/or vertically | Flip |
angle | The rotation angle of the texture in radians | float |
size | The original width and height of the texture | Vec2 |
alpha | The alpha modulation of the texture (0.0 to 1.0) | float |
tint | The color tint applied to the texture during rendering | Color |
Methods
Get Rect
get_rect() → Rect
Get the rectangle of the texture.
Returns
Rect
: The dimensions of the texture as a Rect.
Make Additive
make_additive() → None
Set the texture's blending mode to additive.
Make Multiply
make_multiply() → None
Set the texture's blending mode to multiply.
Make Normal
make_normal() → None
Set the texture's blending mode to normal.