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 struct bj_bitmap* bitmap,
41 int x0,
42 int y0,
43 int x1,
44 int y1,
45 uint32_t pixel
46);
47
67 struct bj_bitmap* bitmap,
68 const struct bj_rect* area,
69 uint32_t pixel
70);
71
91 struct bj_bitmap* bitmap,
92 const struct bj_rect* area,
93 uint32_t pixel
94);
95
117 struct bj_bitmap* 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
148 struct bj_bitmap* bitmap,
149 int x0,
150 int y0,
151 int x1,
152 int y1,
153 int x2,
154 int y2,
155 uint32_t color
156);
157
170 struct bj_bitmap* bitmap,
171 int cx,
172 int cy,
173 int radius,
174 uint32_t color
175);
176
189 struct bj_bitmap* bitmap,
190 int cx,
191 int cy,
192 int radius,
193 uint32_t color
194);
195
210 struct bj_bitmap* bitmap,
211 size_t count,
212 const int* x,
213 const int* y,
214 bj_bool loop,
215 uint32_t color
216);
217
218
219#endif
General-purpose definitions for Banjo API.
Header file for Bitmap type.
Recoverable error handling.
#define BANJO_EXPORT
Definition api.h:155
uint32_t bj_bool
Boolean type used throughout the Banjo API.
Definition api.h:249
struct bj_bitmap bj_bitmap
Definition api.h:331
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.
Represents a rectangle with position and dimensions.
Definition rect.h:19
Header file for general pixel manipulation facilities.
Defines the struct bj_rect struct representing a rectangle with position and dimensions.