Banjo API 1.0.0-rc.2
Low-level C99 game development API
Loading...
Searching...
No Matches
draw.h
Go to the documentation of this file.
1
60#ifndef BJ_DRAW_H
61#define BJ_DRAW_H
62#include <banjo/api.h>
63#include <banjo/bitmap.h>
64#include <banjo/error.h>
65#include <banjo/pixel.h>
66#include <banjo/rect.h>
67
89 struct bj_bitmap* bitmap,
90 int x0,
91 int y0,
92 int x1,
93 int y1,
94 uint32_t pixel
95);
96
116 struct bj_bitmap* bitmap,
117 const struct bj_rect* area,
118 uint32_t pixel
119);
120
140 struct bj_bitmap* bitmap,
141 const struct bj_rect* area,
142 uint32_t pixel
143);
144
166 struct bj_bitmap* bitmap,
167 int x0,
168 int y0,
169 int x1,
170 int y1,
171 int x2,
172 int y2,
173 uint32_t color
174);
175
197 struct bj_bitmap* bitmap,
198 int x0,
199 int y0,
200 int x1,
201 int y1,
202 int x2,
203 int y2,
204 uint32_t color
205);
206
219 struct bj_bitmap* bitmap,
220 int cx,
221 int cy,
222 int radius,
223 uint32_t color
224);
225
238 struct bj_bitmap* bitmap,
239 int cx,
240 int cy,
241 int radius,
242 uint32_t color
243);
244
259 struct bj_bitmap* bitmap,
260 size_t count,
261 const int* x,
262 const int* y,
263 bj_bool loop,
264 uint32_t color
265);
266
267
268#endif
General-purpose definitions for Banjo API.
Header file for Bitmap type.
Recoverable error handling.
#define BANJO_EXPORT
Definition api.h:163
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:257
struct bj_bitmap bj_bitmap
Definition api.h:328
void bj_draw_rectangle(struct bj_bitmap *bitmap, const struct bj_rect *area, uint32_t pixel)
Draws a rectangle in the given bitmap.
void bj_draw_polyline(struct bj_bitmap *bitmap, size_t count, const int *x, const int *y, bj_bool loop, uint32_t color)
Draw a polyline from C-style coordinate arrays.
void bj_draw_triangle(struct bj_bitmap *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_filled_rectangle(struct bj_bitmap *bitmap, const struct bj_rect *area, uint32_t pixel)
Draws a filled rectangle in the given bitmap.
void bj_draw_filled_circle(struct bj_bitmap *bitmap, int cx, int cy, int radius, uint32_t color)
Draw a filled circle onto a bitmap.
void bj_draw_line(struct bj_bitmap *bitmap, int x0, int y0, int x1, int y1, uint32_t pixel)
Draws a line of pixels in the given bitmap.
void bj_draw_filled_triangle(struct bj_bitmap *bitmap, int x0, int y0, int x1, int y1, int x2, int y2, uint32_t color)
Draws a filled triangle given its 3 corners.
void bj_draw_circle(struct bj_bitmap *bitmap, int cx, int cy, int radius, uint32_t color)
Draw the outline of a circle onto a bitmap.
Axis-aligned rectangle: a top-left corner plus a width and height.
Definition rect.h:33
Header file for general pixel manipulation facilities.
Axis-aligned rectangle in pixel coordinates.