- [NEW] draw.mode(), amb modes NORMAL, PATTERN, AND, OR, XOR i NOT

- [NEW] Ara per a pintar en pattern hi ha que dir-ho en draw.mode(), no es automatic al ficar un pattern.
- [NEW] Nous modes de pintat booleans. AND, OR i XOR fan l'operació pixel_actual = pixel_actual OP color_especificat. NOT no usa el color especificat, nomes fa un NOT del pixel actual.
This commit is contained in:
2026-02-24 11:03:21 +01:00
parent 9581ce67fd
commit fc962b4e18
5 changed files with 85 additions and 2 deletions

View File

@@ -164,7 +164,15 @@ function view.origin(x, y) end
---Convert screen position to viewport position
function view.tolocal(x, y) end
---@class draw
---@field draw.NORMAL number
---@field draw.PATTERN number
---@field draw.AND number
---@field draw.OR number
---@field draw.XOR number
---@field draw.NOT number
draw = {}
---@param x1 number
@@ -301,6 +309,18 @@ function draw.text(text, x, y, color) end
---Draw text to (x,y) using the specified color
function draw.text(text, x, y, color) end
---@param mode number
---Specify the mode for the drawing functions
function draw.mode(mode) end
draw.NORMAL = 0
draw.PATTERN = 1
draw.AND = 2
draw.OR = 3
draw.XOR = 4
draw.NOT = 5
---@class shader
shader = {}