mikroSDK Reference Manual
gl_utils.h
1/****************************************************************************
2**
3** Copyright (C) 2024 MikroElektronika d.o.o.
4** Contact: https://www.mikroe.com/contact
5**
6** This file is part of the mikroSDK package
7**
8** Commercial License Usage
9**
10** Licensees holding valid commercial NECTO compilers AI licenses may use this
11** file in accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The MikroElektronika Company.
14** For licensing terms and conditions see
15** https://www.mikroe.com/legal/software-license-agreement.
16** For further information use the contact form at
17** https://www.mikroe.com/contact.
18**
19**
20** GNU Lesser General Public License Usage
21**
22** Alternatively, this file may be used for
23** non-commercial projects under the terms of the GNU Lesser
24** General Public License version 3 as published by the Free Software
25** Foundation: https://www.gnu.org/licenses/lgpl-3.0.html.
26**
27** The above copyright notice and this permission notice shall be
28** included in all copies or substantial portions of the Software.
29**
30** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31** OF MERCHANTABILITY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
32** TO THE WARRANTIES FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
34** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
35** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
36** OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37**
38****************************************************************************/
39
41
42#ifndef _GL_UTILS_H
43#define _GL_UTILS_H
44
45#include "gl_types.h"
46
47
48typedef struct
49{
50 gl_int_t top;
51 gl_int_t left;
52 gl_int_t bottom;
53 gl_int_t right;
54} gl_border_t;
55
60typedef struct
61{
62 const uint8_t *data_array;
63 gl_font_orientation_t orientation;
64 gl_color_t background_color;
65 bool background_on;
66} gl_font_t;
67
72typedef struct
73{
74 gl_color_t color;
75 gl_brush_style_t style;
76} gl_brush_t;
77
82typedef struct
83{
84 gl_color_t color;
85 uint16_t inner_width;
86 uint16_t outer_width;
87} gl_pen_t;
88
93typedef struct
94{
95 gl_color_t from;
96 gl_color_t to;
97} gl_gradient_color;
98
99typedef struct
100{
101 gl_driver_t driver;
102
103 gl_border_t crop_rect;
104
105 gl_pen_t pen;
106
107 gl_brush_t brush;
108
109 gl_gradient_color gradient_color;
110
111 gl_font_t font;
112} gl_t;
113
114
115typedef struct
116{
117 gl_point_t center; // 2 * 32bit
118 gl_uint_t radius; // 1 * 16bit
119 gl_angle_t start_angle; // 1 * 16bit
120 gl_angle_t end_angle; // 1 * 16bit
121} gl_arc_t;
122
123
124typedef struct
125{
126 uint8_t version;
127 uint8_t format;
128 uint16_t height;
129 uint16_t width;
130} gl_image_header_t;
131
132
133#endif // _GL_UTILS_H
134
uint16_t gl_color_t
Definition gl_colors.h:56
Declaration of types for Graphic Library.
int16_t gl_int_t
Definition gl_types.h:92
gl_font_orientation_t
Definition gl_types.h:86
gl_brush_style_t
Definition gl_types.h:60
uint16_t gl_uint_t
Definition gl_types.h:93
uint16_t gl_angle_t
Definition gl_types.h:97
The context structure for storing driver configuration.
Definition gl_types.h:148
The context structure for storing coordinates of the point.
Definition gl_types.h:111