CG-50 Python drawing framework. Early Access.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
KikooDX 489ce78e50 (example.py) Better example 1 month ago
.gitignore Initial commit 1 month ago
LICENSE Initial commit 1 month ago
README.md (README.md) Constants 1 month ago
example.py (example.py) Better example 1 month ago
sprito.py (sprito.py) New wait_until_ac function 1 month ago

README.md

Sprito

CG-50 Python drawing framework

Drawing functions

rect(x: int, y: int, w: int, h: int, color: tuple) -> None : Draw a rectangle with the given color from (x;y) of size w (width) times h (height).

fill_screen(color: tuple) -> None : Fill the screen with the given color.

invert_pixel(x: int, y: int) -> None : Invert the pixel color at (x;y).

invert_rect(x: int, y: int, w: int, h: int) -> None : Invert all the pixels of the rectangle from (x;y) of size w (width) times h (height).

store_rect(x: int, y: int, w:int, h: int) -> SpriteRaw : Store all the pixels of the given area in a SpriteRaw.

Constants

C_BLACK, C_WHITE, C_RED, C_GREEN, C_BLUE, C_YELLOW, C_PURPLE, C_CYAN.

PALLET_STR, PALLET_BYTE.

Sprite classes (WIP)

SpriteIndexed : indexed sprite. Draw using pallets.

SpriteRaw : raw sprite, usually heavier than an indexed sprite but faster to draw.