-
Notifications
You must be signed in to change notification settings - Fork 0
/
draw_shapes.h
69 lines (63 loc) · 1.49 KB
/
draw_shapes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* @file draw_shapes.h
* @author Lukas Nejezchleb ([email protected])
* @brief Module with functions to draw shapes to the frame buffer
* @version 0.1
* @date 2021-05-04
*
* @copyright Copyright (c) 2021
*
*/
#ifndef DRAW_SHAPES_H
#define DRAW_SHAPES_H
#include "data_structures.h"
/**
* @brief Draws the circle with center at x,y with given radius
*
* @param frame
* @param x
* @param y
* @param radius
* @param color
*/
void draw_circle(fb_data *frame, int x, int y, int radius, uint16_t color);
/**
* @brief Draws rectangle with left upper corner at x,y
*
* @param frame
* @param x
* @param y
* @param width
* @param height
* @param color
*/
void draw_rectangle(fb_data *frame, int x, int y, int width, int height, uint16_t color);
/**
* @brief Draws given colour across the whole frame buffer
*
* @param frame
* @param color
*/
void set_background(fb_data *frame, uint16_t color);
/**
* @brief Draws an ghost at x,y, bitmap of ghost is also in this function
*
* @param frame
* @param x
* @param y
* @param scale
* @param color
*/
void draw_ghost_shape(fb_data *frame, int x, int y, int scale, uint16_t color);
/**
* @brief Pacman facing given direction with his mouth
*
* @param frame
* @param x
* @param y
* @param radius
* @param color
* @param direction
*/
void draw_pacman_dir(fb_data *frame, int x, int y, int radius, uint16_t color, int direction);
#endif