140int32_t
gm_draw_text(
double x,
double y,
const char *text,
const char *font,
190 for (
size_t i = 0; i < number; i++)
227 for (
size_t i = 0; i < number; i++)
250 for (
size_t i = 0; i < number; i++)
268 double y2_offset,
double x3_offset,
double y3_offset,
289 double x2_offset,
double y2_offset,
290 double x3_offset,
double y3_offset,
gmColor c) {
291 for (
size_t i = 0; i < number; i++)
315 for (
size_t i = 0; i < number; i++)
342 const char *font,
double font_size,
gmColor c) {
343 for (
size_t i = 0; i < number; i++)
@ GM_COLLIDER_RECT
Definition body.h:18
@ GM_COLLIDER_CIRCLE
Definition body.h:17
uint32_t gmColor
Type definition for color values, stored as a 32-bit unsigned integer. The color components are packe...
Definition color.h:13
int32_t gm_draw_circle(double center_x, double center_y, double radius, gmColor c)
Draws a circle.
Definition draw.h:84
void gm_draw_triangle_bodies(const gmBody *bodies, size_t number, double x2_offset, double y2_offset, double x3_offset, double y3_offset, gmColor c)
Draws an array of triangular physics bodies.
Definition draw.h:288
void gm_draw_circle_bodies(const gmBody *bodies, size_t number, gmColor c)
Draws an array of circular physics bodies.
Definition draw.h:226
int32_t gm_draw_text(double x, double y, const char *text, const char *font, double font_size, gmColor c)
Draws text centered at a point.
Definition draw.h:140
void gm_draw_rect_body(const gmBody *body, gmColor c)
Draws a rectangular physics body.
Definition draw.h:178
int32_t gm_draw_ellipse(double x, double y, double w, double h, gmColor c)
Draws an ellipse centered at a point.
Definition draw.h:98
int32_t gm_draw_rectangle(double x, double y, double w, double h, gmColor c)
Draws a rectangle centered at a point.
Definition draw.h:57
void gm_draw_ellipse_bodies(const gmBody *bodies, size_t number, gmColor c)
Draws an array of elliptical physics bodies.
Definition draw.h:249
void gm_draw_image_bodies(const gmBody *bodies, size_t number, gmImage img)
Draws the same image for an array of physics bodies.
Definition draw.h:314
void gm_draw_image_body(const gmBody *body, gmImage img)
Draws an image at a physics body's position.
Definition draw.h:301
int32_t gm_draw_line(double x1, double y1, double x2, double y2, double thickness, gmColor c)
Draws a line segment.
Definition draw.h:43
void gm_draw_round_rect_body(const gmBody *body, double radius, gmColor c)
Draws a rectangular physics body with rounded corners.
Definition draw.h:200
void gm_draw_text_body(const gmBody *body, const char *text, const char *font, double font_size, gmColor c)
Draws text at a physics body's position.
Definition draw.h:326
int32_t gm_draw_triangle(double x1, double y1, double x2, double y2, double x3, double y3, gmColor c)
Draws a triangle.
Definition draw.h:113
void gm_draw_ellipse_body(const gmBody *body, gmColor c)
Draws an elliptical physics body.
Definition draw.h:236
void gm_draw_triangle_body(const gmBody *body, double x2_offset, double y2_offset, double x3_offset, double y3_offset, gmColor c)
Draws a triangular physics body.
Definition draw.h:267
void gm_draw_text_bodies(const gmBody *bodies, size_t number, const char *text, const char *font, double font_size, gmColor c)
Draws the same text for an array of physics bodies.
Definition draw.h:341
int32_t gm_draw_rounded_rectangle(double x, double y, double w, double h, double r, gmColor c)
Draws a rectangle with rounded corners centered at a point.
Definition draw.h:71
void gm_draw_rect_bodies(const gmBody *bodies, size_t number, gmColor c)
Draws an array of rectangular physics bodies.
Definition draw.h:189
int gm_cache(unsigned int id)
Definition draw.h:26
int32_t gm_draw_image(gmImage img, double x, double y, double w, double h)
Draws an image centered at a point.
Definition draw.h:127
void gm_draw_circle_body(const gmBody *body, gmColor c)
Draws a circular physics body.
Definition draw.h:213
void gm_draw_body(const gmBody *body, gmColor c)
Draws a physics body based on its collider type.
Definition draw.h:158
Graphics API (GAPI) abstraction layer for Gama.
int32_t gapi_draw_rect(double x, double y, double w, double h, gmColor col)
Draws a filled rectangle on the screen.
int32_t gapi_draw_rounded_rect(double x, double y, double w, double h, double r, gmColor col)
Draws a filled rectangle with rounded corners on the screen.
int32_t gapi_draw_image(uint32_t handle, double x, double y, double width, double height)
Draws an image referenced by its handle on the screen.
int32_t gapi_draw_triangle(double x1, double y1, double x2, double y2, double x3, double y3, gmColor col)
Draws a filled triangle on the screen.
int32_t gapi_draw_text(double x, double y, double height, const char *txt, const char *font, uint8_t style, gmColor col)
Draws text on the screen.
int32_t gapi_draw_circle(double center_x, double center_y, double radius, gmColor col)
Draws a filled circle on the screen.
int32_t gapi_draw_ellipse(double x, double y, double w, double h, gmColor col)
Draws a filled ellipse on the screen.
int32_t gapi_draw_line(double x1, double y1, double x2, double y2, double thickness, gmColor col)
Draws a line segment on the screen.
Structure representing a physics body with properties for collision and movement.
Definition body.h:25
double width
Definition body.h:35
gmColliderType collider_type
Definition body.h:30
double height
Definition body.h:35
uint8_t is_active
Definition body.h:27
double radius
Definition body.h:35
gmPos position
Definition body.h:31
A handle to a GPU-managed image or texture.
Definition image.h:97
uint32_t handle
Definition image.h:98
double x
Definition position.h:9
double y
Definition position.h:9