![]() |
Lua Player Plus Vita
Documentation of lpp-vita
|
Module that handles 2D rendering. More...
Enumerations | |
| enum | ImageFilter { FILTER_POINT , FILTER_LINEAR } |
| Image filters to use with Graphics.setImageFilters. More... | |
| enum | MemType { MEM_VRAM , MEM_PHYCONT_RAM , MEM_RAM } |
| Memory types usable for allocated images. More... | |
Functions | |
| int | Graphics::createImage (int width, int height, int color, MemType type) |
| Create an empty image. | |
| void | Graphics::debugPrint (number x, number y, string text, int color) |
| Print a text on screen using system font. | |
| void | Graphics::drawImage (number x, number y, int img, int color) |
| Draw an image. | |
| void | Graphics::drawImageExtended (number x, number y, int img, int x_start, int y_start, number width, number height, number rad, number x_scale, number y_scale, int color) |
| Draw an image with several effects. | |
| void | Graphics::drawLine (number x1, number x2, number y1, number y2, int color) |
| Draw a line. | |
| void | Graphics::drawPartialImage (number x, number y, int img, int x_start, int y_start, number width, number height, int color) |
| Draw a part of an image. | |
| void | Graphics::drawPixel (number x, number y, int color, int image) |
| Draw a pixel. | |
| void | Graphics::drawRotateImage (number x, number y, int img, number rad, int color) |
| Draw a rotated image. | |
| void | Graphics::drawScaleImage (number x, number y, int img, number x_scale, number y_scale, int color) |
| Draw a scaled image. | |
| void | Graphics::fillCircle (number x, number y, number rad, int color) |
| Draw a circle. | |
| void | Graphics::fillEmptyRect (number x1, number x2, number y1, number y2, int color) |
| Draw an empty rectangle. | |
| void | Graphics::fillRect (number x1, number x2, number y1, number y2, int color) |
| Draw a rectangle. | |
| void | Graphics::freeImage (int img) |
| Free a loaded image. | |
| int | Graphics::getImageFramesNum (int img) |
| Gets the number of frames of a loaded animated image. | |
| int | Graphics::getImageHeight (int img) |
| Get an image height. | |
| int | Graphics::getImageWidth (int img) |
| Get an image width. | |
| int | Graphics::getPixel (int x, int y, int img) |
| Get a pixel color from a loaded image. | |
| void | Graphics::initBlend (void) |
| Initialize drawing phase. | |
| void | Graphics::initRescaler (int x, int y, number x_scale, number y_scale) |
| Initialize a rescaler. | |
| int | Graphics::loadAnimatedImage (string filename) |
| Load a .gif animated image. | |
| int | Graphics::loadImage (string filename, MemType type) |
| Load a .png/.jpg/.bmp image. | |
| void | Graphics::loadImageAsync (string filename) |
| Load a .png/.jpg/.bmp image (asynchronous). | |
| void | Graphics::overloadImage (int image, int offset, int size, string data) |
| Copies pixels to a loaded image. | |
| void | Graphics::saveImage (int img, string filename, ImgFmt format) |
| Save a loaded image to a .png/.bmp image. | |
| void | Graphics::setImageFilters (int img, ImageFilter min_filter, ImageFilter mag_filter) |
| Set filters to use for a given image. | |
| void | Graphics::setImageFrame (int img, int frame) |
| Set current active frame for a loaded animated image. | |
| void | Graphics::termBlend (void) |
| Terminate drawing phase. | |
| void | Graphics::termRescaler (void) |
| Terminate a rescaler. | |
Module that handles 2D rendering.
| enum ImageFilter |
Image filters to use with Graphics.setImageFilters.
| Enumerator | |
|---|---|
| FILTER_POINT | Point filter. |
| FILTER_LINEAR | Linear filter. |
| enum MemType |
| int Graphics::createImage | ( | int | width, |
| int | height, | ||
| int | color, | ||
| MemType | type | ||
| ) |
Create an empty image.
| width | - Image width. |
| height | - Image height. |
| color | - A valid color (See Color) (optional). |
| type | - Memory type to use for the image (optional). |
| void Graphics::debugPrint | ( | number | x, |
| number | y, | ||
| string | text, | ||
| int | color | ||
| ) |
Print a text on screen using system font.
| x | - X coordinate of the text position in pixels. |
| y | - Y coordinate of the text position in pixels. |
| text | - Text to print. |
| color | - A valid color (See Color). |
| void Graphics::drawImage | ( | number | x, |
| number | y, | ||
| int | img, | ||
| int | color | ||
| ) |
Draw an image.
| x | - X coordinate of the image in pixels. |
| y | - Y coordinate of the image in pixels. |
| img | - A valid image ID. |
| color | - Image tint color (See Color) (optional). |
| void Graphics::drawImageExtended | ( | number | x, |
| number | y, | ||
| int | img, | ||
| int | x_start, | ||
| int | y_start, | ||
| number | width, | ||
| number | height, | ||
| number | rad, | ||
| number | x_scale, | ||
| number | y_scale, | ||
| int | color | ||
| ) |
Draw an image with several effects.
| x | - X coordinate of the image in pixels. |
| y | - Y coordinate of the image in pixels. |
| img | - A valid image ID. |
| x_start | - Image X coordinate for the partial drawing. |
| y_start | - Image Y coordinate for the partial drawing. |
| width | - Partial drawing width. |
| height | - Partial drawing height. |
| rad | - Rotation radius. |
| x_scale | - Scale value for X parameter. |
| y_scale | - Scale value for Y parameter. |
| color | - Image tint color (See Color) (optional). |
| void Graphics::drawLine | ( | number | x1, |
| number | x2, | ||
| number | y1, | ||
| number | y2, | ||
| int | color | ||
| ) |
Draw a line.
| x1 | - Starting X coordinate of the line in pixels. |
| x2 | - Ending X coordinate of the line in pixels. |
| y1 | - Starting Y coordinate of the line in pixels. |
| y2 | - Ending Y coordinate of the line in pixels. |
| color | - A valid color (See Color). |
| void Graphics::drawPartialImage | ( | number | x, |
| number | y, | ||
| int | img, | ||
| int | x_start, | ||
| int | y_start, | ||
| number | width, | ||
| number | height, | ||
| int | color | ||
| ) |
Draw a part of an image.
| x | - X coordinate of the image in pixels. |
| y | - Y coordinate of the image in pixels. |
| img | - A valid image ID. |
| x_start | - Image X coordinate for the partial drawing. |
| y_start | - Image Y coordinate for the partial drawing. |
| width | - Partial drawing width. |
| height | - Partial drawing height. |
| color | - Image tint color (See Color) (optional). |
| void Graphics::drawPixel | ( | number | x, |
| number | y, | ||
| int | color, | ||
| int | image | ||
| ) |
Draw a pixel.
| x | - X coordinate of the pixel position in pixels. |
| y | - Y coordinate of the pixel position in pixels. |
| color | - A valid color (See Color). |
| image | - Image to draw on (optional). |
| void Graphics::drawRotateImage | ( | number | x, |
| number | y, | ||
| int | img, | ||
| number | rad, | ||
| int | color | ||
| ) |
Draw a rotated image.
| x | - X coordinate of the image in pixels. |
| y | - Y coordinate of the image in pixels. |
| img | - A valid image ID. |
| rad | - Rotation radius. |
| color | - Image tint color (See Color) (optional). |
| void Graphics::drawScaleImage | ( | number | x, |
| number | y, | ||
| int | img, | ||
| number | x_scale, | ||
| number | y_scale, | ||
| int | color | ||
| ) |
Draw a scaled image.
| x | - X coordinate of the image in pixels. |
| y | - Y coordinate of the image in pixels. |
| img | - A valid image ID. |
| x_scale | - Scale value for X parameter. |
| y_scale | - Scale value for Y parameter. |
| color | - Image tint color (See Color) (optional). |
| void Graphics::fillCircle | ( | number | x, |
| number | y, | ||
| number | rad, | ||
| int | color | ||
| ) |
Draw a circle.
| x | - X coordinate of the circle in pixels. |
| y | - Y coordinate of the circle in pixels. |
| rad | - Radius size of the circle. |
| color | - A valid color (See Color). |
| void Graphics::fillEmptyRect | ( | number | x1, |
| number | x2, | ||
| number | y1, | ||
| number | y2, | ||
| int | color | ||
| ) |
Draw an empty rectangle.
| x1 | - Starting X coordinate of the rectangle in pixels. |
| x2 | - Ending X coordinate of the rectangle in pixels. |
| y1 | - Starting Y coordinate of the rectangle in pixels. |
| y2 | - Ending Y coordinate of the rectangle in pixels. |
| color | - A valid color (See Color). |
| void Graphics::fillRect | ( | number | x1, |
| number | x2, | ||
| number | y1, | ||
| number | y2, | ||
| int | color | ||
| ) |
Draw a rectangle.
| x1 | - Starting X coordinate of the rectangle in pixels. |
| x2 | - Ending X coordinate of the rectangle in pixels. |
| y1 | - Starting Y coordinate of the rectangle in pixels. |
| y2 | - Ending Y coordinate of the rectangle in pixels. |
| color | - A valid color (See Color). |
| void Graphics::freeImage | ( | int | img | ) |
Free a loaded image.
| img | - A valid image ID. |
| int Graphics::getImageFramesNum | ( | int | img | ) |
Gets the number of frames of a loaded animated image.
| img | - A valid image ID. |
| int Graphics::getImageHeight | ( | int | img | ) |
Get an image height.
| img | - A valid image ID. |
| int Graphics::getImageWidth | ( | int | img | ) |
Get an image width.
| img | - A valid image ID. |
| int Graphics::getPixel | ( | int | x, |
| int | y, | ||
| int | img | ||
| ) |
Get a pixel color from a loaded image.
| x | - X coordinate of the pixel. |
| y | - Y coordinate of the pixel. |
| img | - A valid image ID. |
| void Graphics::initBlend | ( | void | ) |
Initialize drawing phase.
| void Graphics::initRescaler | ( | int | x, |
| int | y, | ||
| number | x_scale, | ||
| number | y_scale | ||
| ) |
Initialize a rescaler.
| x | - X coordinate of the rescaler output. |
| y | - Y coordinate of the rescaler output. |
| x_scale | - Scale value for X parameter. |
| y_scale | - Scale value for Y parameter. |
| int Graphics::loadAnimatedImage | ( | string | filename | ) |
Load a .gif animated image.
| filename | - Name of the file to open. |
| int Graphics::loadImage | ( | string | filename, |
| MemType | type | ||
| ) |
Load a .png/.jpg/.bmp image.
| filename | - Name of the file to open. |
| type | - Memory type to use for the image (optional). |
| void Graphics::loadImageAsync | ( | string | filename | ) |
Load a .png/.jpg/.bmp image (asynchronous).
| filename | - Name of the file to open. |
| void Graphics::overloadImage | ( | int | image, |
| int | offset, | ||
| int | size, | ||
| string | data | ||
| ) |
Copies pixels to a loaded image.
| image | - Image to copies pixels onto. |
| offset | - Offset in bytes to which to copies pixels. |
| size | - Size in bytes of the pixels to copy. |
| data | - Pixels to copy. |
| void Graphics::saveImage | ( | int | img, |
| string | filename, | ||
| ImgFmt | format | ||
| ) |
Save a loaded image to a .png/.bmp image.
| img | - A valid image ID. |
| filename | - The filename of the screenshot output. |
| format | - The format to use for the output file (optional). |
| void Graphics::setImageFilters | ( | int | img, |
| ImageFilter | min_filter, | ||
| ImageFilter | mag_filter | ||
| ) |
Set filters to use for a given image.
| img | - A valid image ID. |
| min_filter | - Min filter to use. |
| mag_filter | - Mag filter to use. |
| void Graphics::setImageFrame | ( | int | img, |
| int | frame | ||
| ) |
Set current active frame for a loaded animated image.
| img | - A valid image ID. |
| frame | - The frame to set as active. |
| void Graphics::termBlend | ( | void | ) |
Terminate drawing phase.
| void Graphics::termRescaler | ( | void | ) |
Terminate a rescaler.