-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathImage.lua
More file actions
68 lines (60 loc) · 1.98 KB
/
Copy pathImage.lua
File metadata and controls
68 lines (60 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---@class Image
local Image = {}
---The logical width of the image.
---
---UV coordinates for a `SourceQuad` are based on this dimension.
---@return number
function Image:GetWidth()
end
---The logical height of the image.
---
---UV coordinates for a `SourceQuad` are based on this dimension.
---@return number
function Image:GetHeight()
end
---The number of pixels stored per row in memory, including any extra padding added for alignment. This value may be greater than Width.
---
---UV coordinates used in the shader are based on this dimension.
---@return number
function Image:GetPaddedWidth()
end
---The number of pixels rows in memory, including any extra padding added for alignment. This value may be greater than Height.
---
---UV coordinates used in the shader are based on this dimension.
---@return number
function Image:GetPaddedHeight()
end
---@return string
function Image:GetName()
end
---Returns the image content for the specified quad.
---
---The returned string contains raw binary data representing 32-bit floating-point values.
---
---Every group of 4 consecutive floats represents one pixel in RGBA order.
---@param x integer
---@param y integer
---@param width integer
---@param height integer
---@return string
function Image:GetTexelRegion(x, y, width, height)
end
---@param sourceQuad SourceQuad
---@param destinationQuad DestinationQuad
---@param kColor KColor
---@param color Color?
function Image:Render(sourceQuad, destinationQuad, kColor, color)
end
---The shaderParams are represented as a `table<string, (number | number[])>`.
---
---* Use a number for float attributes.
---* Use a numeric array (`number[]`) for vecN attributes, with N being the length.
---
---The function throws an error if any attribute is missing or has an invalid type.
---@param sourceQuad SourceQuad
---@param destinationQuad DestinationQuad
---@param kColor KColor
---@param shader Shader
---@param shaderParams table
function Image:RenderWithShader(sourceQuad, destinationQuad, kColor, shader, shaderParams)
end