LifeLua 30-05-2025
Documentation for LifeLua
|
Drawing library. More...
Functions | |
nil | draw.swapbuffers (color color) |
nil | draw.text (number x, number y, string text, color color, number size, font font) |
number | draw.textwidth (string text, number size, font font) |
number | draw.textheight (string text, number size, font font) |
nil | draw.rect (number x, number y, number width, number height, color color, color outline) |
nil | draw.circle (number x, number y, number radius, color color) |
nil | draw.line (number start_x, number start_y, number endx, number endy, color color) |
nil | draw.pixel (number x, number y, color color) |
nil | draw.gradientrect (number x, number y, number width, number height, color top_left, color top_right, color bottom_left, color bottom_right) |
nil | draw.vdoublegradientrect (number x, number y, number width, number height, color top, color center, color bottom) |
nil | draw.hdoublegradientrect (number x, number y, number width, number height, color top, color center, color bottom) |
nil | draw.enableclip (boolean enable) |
nil | draw.cliprect (number x, number y, number width, number height) |
Uses vita2d
nil draw.circle | ( | number | x, |
number | y, | ||
number | radius, | ||
color | color ) |
Draws a circle on the screen
nil draw.cliprect | ( | number | x, |
number | y, | ||
number | width, | ||
number | height ) |
Clips a rectangle, useful for clipping text
nil draw.enableclip | ( | boolean | enable | ) |
Enables or disables clipping
nil draw.gradientrect | ( | number | x, |
number | y, | ||
number | width, | ||
number | height, | ||
color | top_left, | ||
color | top_right, | ||
color | bottom_left, | ||
color | bottom_right ) |
Draws a gradient rectangle on the screen
nil draw.hdoublegradientrect | ( | number | x, |
number | y, | ||
number | width, | ||
number | height, | ||
color | top, | ||
color | center, | ||
color | bottom ) |
Draws a double horizontal gradient rectangle on the screen
nil draw.line | ( | number | start_x, |
number | start_y, | ||
number | endx, | ||
number | endy, | ||
color | color ) |
Draws a line on the screen
nil draw.pixel | ( | number | x, |
number | y, | ||
color | color ) |
Draws a pixel on the screen
nil draw.rect | ( | number | x, |
number | y, | ||
number | width, | ||
number | height, | ||
color | color, | ||
color | outline ) |
Draws a rectangle on the screen
nil draw.swapbuffers | ( | color | color | ) |
Swaps the buffers. Needed for the drawing functions above it to show.
color | Optional color, default will be black |
nil draw.text | ( | number | x, |
number | y, | ||
string | text, | ||
color | color, | ||
number | size, | ||
font | font ) |
Draws text on the screen
size | The size argument can be also a font, if so, then the size will be the next argument |
number draw.textheight | ( | string | text, |
number | size, | ||
font | font ) |
Gets the text height as displayed on the screen
size | The size argument can be also a font, if so, then the size will be the next argument |
number draw.textwidth | ( | string | text, |
number | size, | ||
font | font ) |
Gets the text width as displayed on the screen
size | The size argument can be also a font, if so, then the size will be the next argument |
nil draw.vdoublegradientrect | ( | number | x, |
number | y, | ||
number | width, | ||
number | height, | ||
color | top, | ||
color | center, | ||
color | bottom ) |
Draws a double vertical gradient rectangle on the screen