mikroSDK Reference Manual
gl.h
Go to the documentation of this file.
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
141
148#ifndef _GL_H_
149#define _GL_H_
150
151#include "gl_types.h"
152#include "generic_pointer.h"
153#include "gl_colors.h"
154#include "gl_text.h"
155#include "gl_shapes.h"
156#include "gl_image.h"
157
169#ifdef __cplusplus
170extern "C"{
171#endif
172
188
197
211
223
255
283
304void gl_set_font(const uint8_t *font);
305
334
364void gl_set_pen(gl_color_t color, uint16_t width);
365
387
410void gl_set_pen_width(uint16_t width);
411
449void gl_set_inner_pen(uint16_t width_inside_object);
450
473
491void gl_set_outer_pen(uint16_t width_outside_object);
492
500
512
523
534
545
556
565void gl_set_font_background(bool enable);
566
577
588
589#ifdef __cplusplus
590} // extern "C"
591#endif
592
593 // glgroup
594 // apigroup
595
596#endif // _GL_H_
597// ------------------------------------------------------------------------- END
Definition of colors. Here predefined colors can be found.
uint16_t gl_color_t
Definition gl_colors.h:56
API for image drawing. Here can be found functions for getting information about image or drawing it.
API for different shape drawing. All function provided here requires setting parameters before call....
API for text drawing. After setting desired font (generated by NECTO Studio) drawing and taking infor...
Declaration of types for Graphic Library.
int16_t gl_coord_t
Definition gl_types.h:104
gl_font_orientation_t
Definition gl_types.h:86
gl_brush_style_t
Definition gl_types.h:60
void gl_set_pen_color(gl_color_t color)
Sets the active pen's color to color.
uint16_t gl_get_inner_pen()
Returns the inner width of active pen.
void gl_clear(gl_color_t color)
Paint hole display with color. If driver is not set then function do nothing.
void gl_set_font_orientation(gl_font_orientation_t orientation)
Sets the active font orientation to orientation.
void gl_set_driver(gl_driver_t *driver)
Sets the driver to the active state and enables drawing on whole display.
void gl_set_brush_style(gl_brush_style_t style)
Sets active brush style to style.
void gl_set_font(const uint8_t *font)
Initialize the active font to font. Active font is used for every text drawing.
void gl_set_pen_width(uint16_t width)
Sets the active pen width to width. This affects every future drawing of shape by displaying pen so t...
void gl_set_font_background_color(gl_color_t background)
Sets the active background color for texts to background.
void gl_set_brush_color(gl_color_t color)
Sets active brush color to color.
void gl_set_inner_pen(uint16_t width_inside_object)
Sets width of inner part of active pen to width_inside_object. The old width of the pen drew on the o...
void gl_set_brush_color_from(gl_color_t color)
Sets the active start color to color.
void gl_set_pen(gl_color_t color, uint16_t width)
Sets the active pen width to width and its color to color. This affects every future drawing of shape...
bool gl_set_crop_borders(gl_coord_t left, gl_coord_t top, gl_coord_t bottom, gl_coord_t right)
Initialize borders for drawing on display.
void gl_set_font_background(bool enable)
Sets active indicator for text backround to enable.
void gl_set_outer_pen(uint16_t width_outside_object)
Sets width of outer part of active pen to width_outside_object. The old width of the pen drew on the ...
uint16_t gl_get_outer_pen()
Returns the outer width of active pen.
void gl_set_brush_color_to(gl_color_t color)
Sets the active end color to color.
uint16_t gl_get_screen_width()
Returns the width of the display.
uint16_t gl_get_screen_height()
Returns the height of the display.
The context structure for storing driver configuration.
Definition gl_types.h:148