Render
Fields
This class has no fields.
Functions
LoadImage
Name |
Type |
Description |
image |
bytes |
Image |
Return value
Name |
Type |
Description |
image |
Image* |
|
Http.Get('https://i.pinimg.com/originals/3c/d3/53/3cd353fb3a66309a75f664857456a2fe.png', function(status, body)
local image = Render.LoadImage(body)
end)
LoadImageFromFile
Name |
Type |
Description |
path |
string |
Path to image |
Return value
Name |
Type |
Description |
image |
Image* |
|
local image = Render.LoadImageFromFile('C:/MemeSense/resources/image.png')
Image
Name |
Type |
Description |
image |
Image* |
Image |
pos |
Vector2 |
Position |
size |
Vector2 |
Image size |
rounding |
float |
Image rounding (not required) |
color |
Color |
Image color modulation (not required) |
local image = Render.LoadImageFromFile('C:/MemeSense/resources/image.png')
Cheat.RegisterCallback('draw', function()
Render.Image(image, Vector2.new(100.0, 100.0), Vector2.new(128.0, 128.0))
end)
InitFont
Font flags: b = bold i = italic r = no anti-aliasing
Name |
Type |
Description |
name |
string |
Font name |
size |
int |
Font size |
flags |
string |
Font flags |
local font = Render.InitFont("arial", 32)
CalcTextSize
Name |
Type |
Description |
font |
Font* |
Text font |
text |
string |
Text |
local text_size = Render.CalcTextSize(font, 'MemeSense')
Text
Name |
Type |
Description |
font |
Font* |
Text font |
pos |
Vector2 |
Text position |
color |
Color |
Text color |
text |
string |
Text |
outlined |
bool |
Text outline |
centered |
bool |
Text centered |
Render.Text(font, Vector2.new(100.0, 100.0), Color.new(1.0, 1.0, 1.0, 1.0), 'MemeSense')
WorldToScreen
Name |
Type |
Description |
vec |
Vector |
3-dimensional position |
Return value
Name |
Type |
Description |
vec |
Vector2 |
2-dimensional position or nil |
local screen_pos = Render.WorldToScreen(Vector.new(0, 0, 0))
Line
Render.Line(Vector2.new(100.0, 100.0), Vector2.new(200.0, 100.0), Color.new(1.0, 1.0, 1.0, 1.0))
PolyLine
Name |
Type |
Description |
clr |
Color |
Line color |
vec |
Vector2 |
Variadic vector (there can be an infinite number of vectors) |
Render.PolyLine(Color.new(1.0, 1.0, 1.0, 1.0), Vector2.new(100.0, 100.0), Vector2.new(100.0, 200.0), Vector2.new(300.0, 300.0))
PolyFilled
Name |
Type |
Description |
clr |
Color |
Line color |
vec |
Vector2 |
Variadic vector (there can be an infinite number of vectors) |
Render.PolyFilled(Color.new(1.0, 1.0, 1.0, 1.0), Vector2.new(100.0, 100.0), Vector2.new(100.0, 200.0), Vector2.new(300.0, 300.0))
Circle
Name |
Type |
Description |
center |
Vector2 |
Center of the circle |
clr |
Color |
Circle color |
radius |
float |
Radius |
seg |
int |
Amount of segments |
width |
int |
Circle thickness |
Render.Circle(Vector2.new(100.0, 100.0), Color.new(1.0, 1.0, 1.0, 1.0), 32.0, 60)
CircleFilled
Name |
Type |
Description |
center |
Vector2 |
Center of the circle |
clr |
Color |
Circle color |
radius |
float |
Radius |
seg |
int |
Amount of segments |
Render.CircleFilled(Vector2.new(100.0, 100.0), Color.new(1.0, 1.0, 1.0, 1.0), 32.0, 60)
Rectangle
Render.Rectangle(Vector2.new(100.0, 100.0), Vector2.new(200.0, 200.0), Color.new(1.0, 1.0, 1.0, 1.0))
FilledRectangle
Render.FilledRectangle(Vector2.new(100.0, 100.0), Vector2.new(200.0, 200.0), Color.new(1.0, 1.0, 1.0, 1.0))
RectFilledMultiColor
Name |
Type |
Description |
start |
Vector2 |
- |
end |
Vector2 |
- |
col_upr_left |
Color |
Color top left |
col_upr_right |
Color |
Color top right |
col_bot_right |
Color |
Color bottom right |
col_bot_left |
Color |
Color bottom left |
Render.RectFilledMultiColor(Vector2.new(100.0, 100.0), Vector2.new(200.0, 200.0), Color.new(1.0, 1.0, 1.0, 1.0), Color.new(0.0, 0.0, 0.0, 1.0), Color.new(0.0, 0.0, 0.0, 1.0), Color.new(1.0, 1.0, 1.0, 1.0))