#include "gapi.h"
#include <stdint.h>
Go to the source code of this file.
|
| struct | gmImage |
| | Structure representing an image with handle and dimensions. More...
|
|
| gmImage | gm_image_open (const char *path) |
| | Loads an image from a file path.
|
| void | gm_image_draw (gmImage i, double x, double y, double w, double h) |
| | Draws an entire image at the specified position and size.
|
| void | gm_image_draw_part (gmImage i, int slice_x, int slice_y, int slice_width, int slice_height, double x, double y, double w, double h) |
| | Draws a part of an image at the specified position and size.
|
◆ gm_image_draw()
| void gm_image_draw |
( |
gmImage | i, |
|
|
double | x, |
|
|
double | y, |
|
|
double | w, |
|
|
double | h ) |
Draws an entire image at the specified position and size.
- Parameters
-
| i | The image to draw. |
| x | The x-coordinate to draw at. |
| y | The y-coordinate to draw at. |
| w | The width to draw the image. |
| h | The height to draw the image. |
◆ gm_image_draw_part()
| void gm_image_draw_part |
( |
gmImage | i, |
|
|
int | slice_x, |
|
|
int | slice_y, |
|
|
int | slice_width, |
|
|
int | slice_height, |
|
|
double | x, |
|
|
double | y, |
|
|
double | w, |
|
|
double | h ) |
Draws a part of an image at the specified position and size.
- Parameters
-
| i | The image to draw from. |
| slice_x | The x-coordinate of the slice to draw from the image. |
| slice_y | The y-coordinate of the slice to draw from the image. |
| slice_width | The width of the slice to draw from the image. |
| slice_height | The height of the slice to draw from the image. |
| x | The x-coordinate to draw at. |
| y | The y-coordinate to draw at. |
| w | The width to draw the slice. |
| h | The height to draw the slice. |
◆ gm_image_open()
| gmImage gm_image_open |
( |
const char * | path | ) |
|
Loads an image from a file path.
- Parameters
-
| path | The file path to the image. |
- Returns
- A gmImage structure containing the loaded image and its properties.