Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
draw.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2026 Maƫl FEURGARD
3 *
4 * This file is part of paparazzi.
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 *
21 */
22
28#ifndef DRAW_H
29#define DRAW_H
30
38
50
57
63
64static inline void DRAW_set_opacity(uint8_t* color, enum Draw_opacity op) {*color = ((*color) & 0b00111111) + ((op & 0b11) << 6);}
65static inline void DRAW_set_line_color(uint8_t* color, enum Draw_colorcode code) {*color = ((*color) & 0b11000111) + ((code & 0b111) << 3);}
66static inline void DRAW_set_fill_color(uint8_t* color, enum Draw_colorcode code) {*color = ((*color) & 0b11111000) + (code & 0b111);}
68{
69 return ((op & 0b11) << 6) + ((line & 0b111) << 3) + (fill & 0b111);
70}
72{
73 return ((line & 0b111) << 3);
74}
75
76#endif // DRAW_H
static uint8_t DRAW_make_line(enum Draw_colorcode line)
Definition draw.h:71
static void DRAW_set_line_color(uint8_t *color, enum Draw_colorcode code)
Definition draw.h:65
static void DRAW_set_fill_color(uint8_t *color, enum Draw_colorcode code)
Definition draw.h:66
static uint8_t DRAW_make_color(enum Draw_opacity op, enum Draw_colorcode line, enum Draw_colorcode fill)
Definition draw.h:67
Draw_colorcode
Definition draw.h:40
@ DRAW_MAGENTA
Definition draw.h:46
@ DRAW_GREEN
Definition draw.h:43
@ DRAW_BLACK
Definition draw.h:41
@ DRAW_BLUE
Definition draw.h:45
@ DRAW_YELLOW
Definition draw.h:44
@ DRAW_WHITE
Definition draw.h:48
@ DRAW_RED
Definition draw.h:42
@ DRAW_CYAN
Definition draw.h:47
Draw_shape
Definition draw.h:52
@ DRAW_LINE
Definition draw.h:55
@ DRAW_POLYGON
Definition draw.h:54
@ DRAW_CIRCLE
Definition draw.h:53
Draw_opacity
Definition draw.h:32
@ DRAW_OPACITY_LIGHT
Definition draw.h:34
@ DRAW_OPACITY_OPAQUE
Definition draw.h:36
@ DRAW_OPACITY_TRANSPARENT
Definition draw.h:33
@ DRAW_OPACITY_MEDIUM
Definition draw.h:35
static void DRAW_set_opacity(uint8_t *color, enum Draw_opacity op)
Definition draw.h:64
Draw_status
Definition draw.h:59
@ DRAW_CREATE
Definition draw.h:60
@ DRAW_DELETE
Definition draw.h:61
uint16_t foo
Definition main_demo5.c:58
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.