Banjo API 0.0.1
C99 game development API
Loading...
Searching...
No Matches
draw.h
Go to the documentation of this file.
1
11#ifndef BJ_DRAW_H
12#define BJ_DRAW_H
13#include <banjo/api.h>
14#include <banjo/bitmap.h>
15#include <banjo/error.h>
16#include <banjo/pixel.h>
17#include <banjo/rect.h>
18
40 bj_bitmap* p_bitmap,
41 int x0,
42 int y0,
43 int x1,
44 int y1,
45 uint32_t pixel
46);
47
67 bj_bitmap* p_bitmap,
68 const bj_rect* p_area,
69 uint32_t pixel
70);
71
91 bj_bitmap* p_bitmap,
92 const bj_rect* p_area,
93 uint32_t pixel
94);
95
117 bj_bitmap* p_bitmap,
118 int x0,
119 int y0,
120 int x1,
121 int y1,
122 int x2,
123 int y2,
124 uint32_t color
125);
126
139 bj_bitmap* p_bitmap,
140 int cx,
141 int cy,
142 int radius,
143 uint32_t color
144);
145
158 bj_bitmap* p_bitmap,
159 int cx,
160 int cy,
161 int radius,
162 uint32_t color
163);
164
179 bj_bitmap* p_bitmap,
180 size_t count,
181 const int* x,
182 const int* y,
183 bj_bool loop,
184 uint32_t color
185);
186
187
188#endif
General-purpose definitions for Banjo API.
Header file for Bitmap type.
Recoverable error handling.
struct bj_bitmap_t bj_bitmap
Typedef for the bj_bitmap struct.
Definition bitmap.h:60
#define BANJO_EXPORT
Definition api.h:139
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:276
void bj_draw_line(bj_bitmap *p_bitmap, int x0, int y0, int x1, int y1, uint32_t pixel)
Draws a line of pixels in the given bitmap.
void bj_draw_circle(bj_bitmap *p_bitmap, int cx, int cy, int radius, uint32_t color)
Draw the outline of a circle onto a bitmap.
void bj_draw_rectangle(bj_bitmap *p_bitmap, const bj_rect *p_area, uint32_t pixel)
Draws a rectangle in the given bitmap.
void bj_draw_filled_circle(bj_bitmap *p_bitmap, int cx, int cy, int radius, uint32_t color)
Draw a filled circle onto a bitmap.
void bj_draw_filled_rectangle(bj_bitmap *p_bitmap, const bj_rect *p_area, uint32_t pixel)
Draws a filled rectangle in the given bitmap.
void bj_draw_triangle(bj_bitmap *p_bitmap, int x0, int y0, int x1, int y1, int x2, int y2, uint32_t color)
Draws the edges of a triangle given its 3 corners.
void bj_draw_polyline(bj_bitmap *p_bitmap, size_t count, const int *x, const int *y, bj_bool loop, uint32_t color)
Draw a polyline from C-style coordinate arrays.
struct bj_rect_t bj_rect
Typedef for bj_rect_t.
Definition rect.h:15
Header file for general pixel manipulation facilities.
Defines the bj_rect struct representing a rectangle with position and dimensions.