update doc/*/scripting/ui.md

This commit is contained in:
MihailRis 2025-11-22 17:55:04 +03:00
parent 38c364b369
commit 1ac615baef
2 changed files with 2 additions and 0 deletions

View File

@ -194,6 +194,7 @@ Here, *color* can be specified in the following ways:
| data:blit(src: Canvas, dst_x: int, dst_y: int) | draws the src canvas at the specified coordinates |
| data:clear() | clears the canvas |
| data:clear(*color*) | fills the canvas with the specified RGBA color |
| data:rect(x: int, y: int, w: int, h: int, *color*) | fills the rectangle with the specified RGBA color |
| data:update() | applies changes to the canvas and uploads it to the GPU |
| data:set_data(data: Bytearray | table<int>) | replaces pixel data (width * height * 4 numbers) |
| data:get_data() | creates a Bytearray object with the image's pixel data |

View File

@ -194,6 +194,7 @@ document["worlds-panel"]:clear()
| data:blit(src: Canvas, dst_x: int, dst_y: int) | рисует src-холст на указанных координатах |
| data:clear() | очищает холст |
| data:clear(*цвет*) | заполняет холст указанным RGBA цветом |
| data:rect(x: int, y: int, w: int, h: int, *цвет*) | заполняет прямоугольник указанным RGBA цветом |
| data:update() | применяет изменения и загружает холст в видеопамять |
| data:set_data(data: bytearray | table<int>) | заменяет данные пикселей (ширина * высота * 4 чисел) |
| data:get_data() | создаёт объект Bytearray с пиксельными данными изображения |