Banjo API 0.0.1
Multi-purpose C99 API
Loading...
Searching...
No Matches
draw.h
Go to the documentation of this file.
1
11#pragma once
12#include <banjo/api.h>
13#include <banjo/bitmap.h>
14#include <banjo/error.h>
15#include <banjo/pixel.h>
16#include <banjo/rect.h>
17
38BANJO_EXPORT void bj_bitmap_draw_line(
39 bj_bitmap* p_bitmap,
40 int x0,
41 int y0,
42 int x1,
43 int y1,
44 uint32_t pixel
45);
46
65BANJO_EXPORT void bj_bitmap_draw_rectangle(
66 bj_bitmap* p_bitmap,
67 const bj_rect* p_area,
68 uint32_t pixel
69);
70
90 bj_bitmap* p_bitmap,
91 const bj_rect* p_area,
92 uint32_t pixel
93);
94
115BANJO_EXPORT void bj_bitmap_draw_triangle(
116 bj_bitmap* p_bitmap,
117 int x0,
118 int y0,
119 int x1,
120 int y1,
121 int x2,
122 int y2,
123 uint32_t color
124);
125
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:40
void bj_bitmap_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_bitmap_draw_rectangle(bj_bitmap *p_bitmap, const bj_rect *p_area, uint32_t pixel)
Draws a rectangle in the given bitmap.
void bj_bitmap_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_bitmap_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.
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.