Banjo API 1.0.0-rc.2
Low-level C99 game development API
Loading...
Searching...
No Matches
drawing_2d.c File Reference
#include <banjo/app.h>
#include <banjo/bitmap.h>
#include <banjo/draw.h>
#include <banjo/event.h>
#include <banjo/log.h>
#include <banjo/main.h>
#include <banjo/pixel.h>
#include <banjo/system.h>
#include <banjo/window.h>
Include dependency graph for drawing_2d.c:

Go to the source code of this file.

Enumerations

enum  { CANVAS_W = 500 , CANVAS_H = 500 }

Functions

static void on_draw (struct bj_window *w, struct bj_render_target *target, const struct bj_rect *dirty, void *user_data)
void draw (bj_bitmap *bmp)
static void * setup (struct bj_app *app, void *init_data)
static void step (struct bj_app *app, struct bj_tick_info tick, void *user_data)
static void teardown (struct bj_app *app, void *user_data)
int main (int argc, char *argv[])

Variables

bj_windowwindow = 0
static bj_bitmapcanvas = 0

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CANVAS_W 
CANVAS_H 

Definition at line 123 of file drawing_2d.c.

Function Documentation

◆ draw()

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 279 of file drawing_2d.c.

◆ on_draw()

void on_draw ( struct bj_window * w,
struct bj_render_target * target,
const struct bj_rect * dirty,
void * user_data )
static

Definition at line 226 of file drawing_2d.c.

◆ setup()

void * setup ( struct bj_app * app,
void * init_data )
static

Definition at line 236 of file drawing_2d.c.

◆ step()

void step ( struct bj_app * app,
struct bj_tick_info tick,
void * user_data )
static

Definition at line 262 of file drawing_2d.c.

◆ teardown()

void teardown ( struct bj_app * app,
void * user_data )
static

Definition at line 272 of file drawing_2d.c.

Variable Documentation

◆ canvas

bj_bitmap* canvas = 0
static
Examples
drawing_2d.c.

Definition at line 124 of file drawing_2d.c.

Referenced by on_draw(), setup(), and teardown().

◆ window

bj_window* window = 0

Definition at line 116 of file drawing_2d.c.