From 6df95c31221f26f02631a538b358c586f22dcae6 Mon Sep 17 00:00:00 2001 From: Hugo H Date: Thu, 25 Dec 2025 20:32:05 +0000 Subject: [PATCH] Add API Reference --- API-Reference.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 API-Reference.md diff --git a/API-Reference.md b/API-Reference.md new file mode 100644 index 0000000..6d9dae1 --- /dev/null +++ b/API-Reference.md @@ -0,0 +1,30 @@ +The following functions are provided by the library: + +## Drawing Functions + +|Function|Description| +|---|---| +|s.cls(color=0)|Clear screen| +|s.rectfill(x, y, w, h, color=0)|Filled rectangle| +|s.circfill(x, y, r, color=0)|Filled circle| +|s.line(x1, y1, x2, y2, color=0)|Line segment| +|s.text(x, y, message, color=3, size="normal")|Text rendering| + +## Transformations and styles + +|Function|Description| +|---|---| +|s.push() / s.pop()|State stack| +|s.translate(x, y)|Move origin| +|s.rotate(radians)|Rotate origin| +|s.alpha(value)|Change global transparency (0.0-1.0)| + +## Input and utilities + +|Function|Description| +| --- | --- | +|s.iskeydown(key)|Keyboard state| +|s.rand(min=0, max=1)|Random float| +|s.randi(min=0, max=1)|Random integer| + +