LRaspi  2022.1
A Lua Player for Rasberry Pi
Screen module

Functions

bool lraspi_screen_isclosing ()
 Checks if the program will be closed. More...
 
int lraspi_screen_getwidth ()
 Gets the width of the screen. More...
 
int lraspi_screen_getheight ()
 Gets the height of the screen. More...
 
int lraspi_screen_getfps ()
 Gets the frames per second.
 
void lraspi_screen_setfps (int frame_per_seconds)
 Sets the frames per second.
 
float lraspi_screen_getdeltatime ()
 Gets the time in seconds since the last screen update.
 
void lraspi_screen_clear ()
 Clears the buffer using the default background colour and prepares the library to draw.
 
void lraspi_screen_flip ()
 Sets the library to stop drawing and show the buffer onto the screen.
 
void lraspi_screen_setdefault (lraspi_Image *image)
 Sets the render target to a image object. More...
 
lraspi_Imagelraspi_screen_getdefault ()
 Gets the current render image. More...
 

Detailed Description

Functions to manipulate screen.

Function Documentation

◆ lraspi_screen_getdefault()

lraspi_Image* lraspi_screen_getdefault ( )

Gets the current render image.

Returns
image An image object.

◆ lraspi_screen_getheight()

int lraspi_screen_getheight ( )

Gets the height of the screen.

Returns
int current screen height

◆ lraspi_screen_getwidth()

int lraspi_screen_getwidth ( )

Gets the width of the screen.

Returns
int current screen width

◆ lraspi_screen_isclosing()

bool lraspi_screen_isclosing ( )

Checks if the program will be closed.

Returns
true if the program will be close, false otherwise.

◆ lraspi_screen_setdefault()

void lraspi_screen_setdefault ( lraspi_Image image)

Sets the render target to a image object.

Note
All draws will be rendered in the image object and not be shown on the screen.
Parameters
imageAn image object. Set NULL to restart drawing on screen.