🖌️Renderer

Table to work with renderer.

SetDrawColor(r [?]: integer, g [?]: integer, b [?]: integer, a [?]: integer): nil

Name
Type
Description

r [?]

integer

Red color. (default: 255)

g [?]

integer

Green color. (default: 255)

b [?]

integer

Blue color. (default: 255)

a [?]

integer

Alpha color. (default: 255)

Sets the color of the renderer.


DrawLine(x0: integer, y0: integer, x1: integer, y1: integer): nil

Name
Type
Description

x0

integer

X coordinate of the first point.

y0

integer

Y coordinate of the first point.

x1

integer

X coordinate of the second point.

y1

integer

Y coordinate of the second point.

Draws a line.


DrawPolyLine(points: table): nil

Name
Type
Description

points

table

Table of points.

Draws a polyline.


DrawPolyLineFilled(points: table): nil

Name
Type
Description

points

table

Table of points.

Draws a filled polyline.


DrawFilledRect(x: integer, y: integer, w: integer, h: integer): nil

Name
Type
Description

x

integer

X coordinate of the rectangle.

y

integer

Y coordinate of the rectangle.

w

integer

Width of the rectangle.

h

integer

Height of the rectangle.

Draws a filled rectangle.


DrawOutlineRect(x: integer, y: integer, w: integer, h: integer): nil

Name
Type
Description

x

integer

X coordinate of the rectangle.

y

integer

Y coordinate of the rectangle.

w

integer

Width of the rectangle.

h

integer

Height of the rectangle.

Draws an outlined rectangle.


DrawOutlineCircle(x: integer, y: integer, r: integer, s: integer): nil

Name
Type
Description

x

integer

X coordinate of the circle.

y

integer

Y coordinate of the circle.

r

integer

Radius of the circle.

s

integer

Segments of the circle.

Draws an outlined circle.


DrawFilledCircle(x: integer, y: integer, r: integer): nil

Name
Type
Description

x

integer

X coordinate of the circle.

y

integer

Y coordinate of the circle.

r

integer

Radius of the circle.

Draws a filled circle.


DrawOutlineRoundedRect(x: integer, y: integer, w: integer, h: integer, radius: integer): nil

Name
Type
Description

x

integer

X coordinate of the rectangle.

y

integer

Y coordinate of the rectangle.

w

integer

Width of the rectangle.

h

integer

Height of the rectangle.

radius

integer

Radius of the rectangle.

Draws an outlined rounded rectangle.


DrawFilledRoundedRect(x: integer, y: integer, w: integer, h: integer, radius: integer): nil

Name
Type
Description

x

integer

X coordinate of the rectangle.

y

integer

Y coordinate of the rectangle.

w

integer

Width of the rectangle.

h

integer

Height of the rectangle.

radius

integer

Radius of the rectangle.

Draws a filled rounded rectangle.


DrawOutlineTriangle(points: table): nil

Name
Type
Description

points

table

Table of points.

Draws an outlined triangle.


DrawFilledTriangle(points: table): nil

Name
Type
Description

points

table

Table of points.

Draws a filled triangle.


DrawTexturedPolygon(points: table, texture: integer): nil

Name
Type
Description

points

table

Table of points.

texture

integer

Texture handle.

Draws a textured polygon.


LoadFont(name: string, size: integer, flags: integer, weight: integer): integer

Name
Type
Description

name

string

Name of the font.

size

integer

Size of the font.

flags

integer

Font flags.

weight

integer

Font weight.

Loads a font.


DrawText(font: integer, x: integer, y: integer, text: string): nil

Name
Type
Description

font

integer

Font handle.

x

integer

X coordinate of the text.

y

integer

Y coordinate of the text.

text

string

Text to draw.

Draws a text.


WorldToScreen(pos: Vector): integer, integer, boolean

Name
Type
Description

pos

World coordinates.

Converts world coordinates to screen coordinates. Returns x, y and visible.


GetScreenSize(): integer, integer

Returns screen size.


GetTextSize(font: integer, text: string): integer, integer

Name
Type
Description

font

integer

Font handle.

text

string

Text to measure.

Returns text size.


LoadImage(path: string): integer

Name
Type
Description

path

string

Path to the image.

Loads an image. Returns image handle.


DrawImage(handle: integer, x: integer, y: integer, w: integer, h: integer): nil

Name
Type
Description

handle

integer

Image handle.

x

integer

X coordinate of the image.

y

integer

Y coordinate of the image.

w

integer

Width of the image.

h

integer

Height of the image.

Draws an image.


DrawImageCentered(handle: integer, x: integer, y: integer, w: integer, h: integer): nil

Name
Type
Description

handle

integer

Image handle.

x

integer

X coordinate of the image.

y

integer

Y coordinate of the image.

w

integer

Width of the image.

h

integer

Height of the image.

Draws an image centered.


GetImageSize(handle: integer): integer, integer

Name
Type
Description

handle

integer

Image handle.

Returns image size.


DrawFilledRectFade(x0: integer, y0: integer, x1: integer, y1: integer, alpha0: integer, alpha1: integer, bHorizontal: boolean): nil

Name
Type
Description

x0

integer

X coordinate of the rectangle.

y0

integer

Y coordinate of the rectangle.

x1

integer

X coordinate of the rectangle.

y1

integer

Y coordinate of the rectangle.

alpha0

integer

Alpha of the first point.

alpha1

integer

Alpha of the second point.

bHorizontal

boolean

Horizontal fade.

Draws a filled rectangle with fade.


DrawFilledGradRect(x0: integer, y0: integer, x1: integer, y1: integer, r: integer, g: integer, b: integer, a: integer, r2: integer, g2: integer, b2: integer, a2: integer, bHorizontal: boolean): nil

Name
Type
Description

x0

integer

X coordinate of the rectangle.

y0

integer

Y coordinate of the rectangle.

x1

integer

X coordinate of the rectangle.

y1

integer

Y coordinate of the rectangle.

r

integer

Red color of the first point.

g

integer

Green color of the first point.

b

integer

Blue color of the first point.

a

integer

Alpha color of the first point.

r2

integer

Red color of the second point.

g2

integer

Green color of the second point.

b2

integer

Blue color of the second point.

a2

integer

Alpha color of the second point.

bHorizontal

boolean

Horizontal gradient.

Draws a filled gradient rectangle.


DrawGlow(x0: integer, y0: integer, w: integer, h: integer, thickness: integer, obj_rounding: integer): nil

Name
Type
Description

x0

integer

X coordinate of the rectangle.

y0

integer

Y coordinate of the rectangle.

w

integer

Width of the rectangle.

h

integer

Height of the rectangle.

thickness

integer

Thickness of the glow.

obj_rounding

integer

Rounding of the glow.

Draws a glow.


DrawBlur(x0: number, y0: number, w: number, h: number, strength: number, rounding: number, alpha: number): nil

Name
Type
Description

x0

number

X coordinate of the rectangle.

y0

number

Y coordinate of the rectangle.

w

number

Width of the rectangle.

h

number

Height of the rectangle.

strength

number

Strength of the blur.

rounding

number

Rounding of the blur.

alpha

number

Alpha of the blur.

Draws a blur.


PushClip(x: integer, y: integer, w: integer, h: integer, intersect: boolean): nil

Name
Type
Description

x

integer

X coordinate of the rectangle.

y

integer

Y coordinate of the rectangle.

w

integer

Width of the rectangle.

h

integer

Height of the rectangle.

intersect

boolean

Intersect with the previous clip.

Pushes a clip rect.


PopClip(): nil

Pops a clip rect.


DrawCenteredNotification(text: string, duration: number): nil

Name
Type
Description

text

string

Text to draw.

duration

number

Duration of the notification.

Draws a centered notification.

Last updated