|
LifeLua 21-08-2025
Documentation for LifeLua, a Lua interpreter for the PS Vita
|
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.gradientline (number start_x, number start_y, number endx, number endy, color start_color, color end_color) |
| nil | draw.polyline (number x1, number y1, color color1, number x2, number y2, color color2,...) |
| 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_left, color top_right, color center_left, color center_right, color bottom_left, color bottom_right) |
| nil | draw.hdoublegradientrect (number x, number y, number width, number height, color left_top, color center_top, color right_top, color left_bottom, color center_bottom, color right_bottom) |
| nil | draw.enableclip (boolean enable) |
| nil | draw.radialcircle (number x, number y, number radius, color center, color edge, number smoothness) |
| nil | draw.cliprect (number x, number y, number width, number height) |
| nil | draw.clipcircle (number x, number y, number radius) |
| nil | draw.triangle (number x, number y, number x2, number y2, number x3, number y3, color c1, color c2, color c3) |
Uses vita2d
| nil draw.circle | ( | number | x, |
| number | y, | ||
| number | radius, | ||
| color | color ) |
Draws a circle on the screen
| nil draw.clipcircle | ( | number | x, |
| number | y, | ||
| number | radius ) |
Circle scrissor, same behavior as cliprect, but as a circle
| nil draw.cliprect | ( | number | x, |
| number | y, | ||
| number | width, | ||
| number | height ) |
Rectangle scrissor, useful for clipping text, & masking stuff
| nil draw.enableclip | ( | boolean | enable | ) |
Enables or disables clipping/masking
| nil draw.gradientline | ( | number | start_x, |
| number | start_y, | ||
| number | endx, | ||
| number | endy, | ||
| color | start_color, | ||
| color | end_color ) |
Draws a gradient line on the screen
| 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 | left_top, | ||
| color | center_top, | ||
| color | right_top, | ||
| color | left_bottom, | ||
| color | center_bottom, | ||
| color | right_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.polyline | ( | number | x1, |
| number | y1, | ||
| color | color1, | ||
| number | x2, | ||
| number | y2, | ||
| color | color2, | ||
| ... ) |
Draws a polyline on the screen Can have as many points as you want, but two points are required
| nil draw.radialcircle | ( | number | x, |
| number | y, | ||
| number | radius, | ||
| color | center, | ||
| color | edge, | ||
| number | smoothness ) |
Draws a radial (gradient) circle
| smoothness | smoothness of the radial circle, higher = smoother, optional, default is 64, maximum 100 |
| 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.triangle | ( | number | x, |
| number | y, | ||
| number | x2, | ||
| number | y2, | ||
| number | x3, | ||
| number | y3, | ||
| color | c1, | ||
| color | c2, | ||
| color | c3 ) |
Draws a triangle.
| c2 | optional |
| c3 | optional |
| nil draw.vdoublegradientrect | ( | number | x, |
| number | y, | ||
| number | width, | ||
| number | height, | ||
| color | top_left, | ||
| color | top_right, | ||
| color | center_left, | ||
| color | center_right, | ||
| color | bottom_left, | ||
| color | bottom_right ) |
Draws a double vertical gradient rectangle on the screen