🖌ī¸Render

create_font

Creates font with given font identifier name

g_render.create_font(font identifier name, font name, size, font weight, flags)
//flags: 2=antialias, 4=outline, 8=dropshadow; 
// separate each flag with "|" upon utilizing multiple flags
g_render.create_font("MainFont", "Verdana", 12, 500, 2 | 8)

get_screen_size

Returns screen width and height

x = g_render.get_screen_size()[0] // width
y = g_render.get_screen_size()[1] // height

draw_rectangle_filled

Draws a solid filled rectangle at given position

g_render.draw_rectangle_filled(x, y, w, h, r, g, b, a)

draw_string

Draws a string at given position

g_render.draw_string(x, y, text, font identifier name, r, g, b, a)

get_text_width

Returns text width of given string

var width = g_render.get_text_width(text, font identifier name)

world_to_screen

x = g_render.world_to_screen( x, y, z )[0]

render_line

Draws a solid line from point a (x1, y1) to point b (x2, 72)

g_render.render_line(x1, y1, x2, y2, r, g, b, a)

render_circle

Draws a circle

g_render.render_circle(x, y, size, segments, r, g, b, a)

render_gradient_rect

Draws a gradient rectangle from given color A to given color B (r, g, b, a -> r2, g2, b2, a2)

g_render.render_gradient_rect(x, y, w, h, r, g, b, a, r2, g2, b2, a2, horizontal)

render_polygon

Draws a polygon between each given location

g_render.render_polygon( [ [ x, y], [ x, y], [ x, y] ], r, g, b, a)

Last updated