GSDP:GAM100/CProcessing/CP Image
From Inside
< GSDP:GAM100 | CProcessing
CP_Image
Description
CP_Image is a type that can be used to store loaded images. Use CP_Image_Load() to load an image and CP_Image_Draw() to display them.
Example
void update()
{
// Set the background color to blue
CP_Settings_Background(CP_Color_Create(60, 120, 255, 255));
// Load an image from the assets folder and store it in a PImage
CP_Image img1 = CP_Image_Load("./Assets/image.png");
// Display the image at the mouse position
CP_Image_Draw(img1, CP_Input_GetMouseX(), CP_Input_GetMouseY(), 100, 100, 255);
}