mikroSDK Reference Manual
gl.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2023 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 
45 #ifndef _GL_H_
46 #define _GL_H_
47 
48 #include "gl_types.h"
49 #include "../../../generic.h"
50 #include "gl_colors.h"
51 #include "gl_text.h"
52 #include "gl_shapes.h"
53 #include "gl_image.h"
54 
55 #ifdef __cplusplus
56 extern "C"{
57 #endif
58 
156 void gl_set_driver(gl_driver_t *driver);
157 
172 void gl_clear(gl_color_t color);
173 
192 
226 bool gl_set_crop_borders(gl_coord_t left, gl_coord_t right, gl_coord_t top, gl_coord_t bottom);
227 
240 void gl_set_font(const uint8_t *font);
241 
242 
259 
260 
279 void gl_set_pen(gl_color_t color, uint16_t width);
280 
295 void gl_set_pen_color(gl_color_t color);
296 
311 void gl_set_pen_width(uint16_t width);
312 
313 
331 void gl_set_inner_pen(uint16_t width_inside_object);
332 
342 uint16_t gl_get_inner_pen();
343 
358 void gl_set_outer_pen(uint16_t width_outside_object);
359 
369 uint16_t gl_get_outer_pen();
370 
371 
388 
389 
405 void gl_set_brush_color(gl_color_t color);
406 
423 
440 
457 
473 void gl_set_font_background(bool enable);
474 
487 uint16_t gl_get_screen_width();
488 
501 uint16_t gl_get_screen_height();
502 
503 #ifdef __cplusplus
504 } // extern "C"
505 #endif
506  // glgroup // glgroup // apigroup
510 
511 #endif // _GL_H_
512 // ------------------------------------------------------------------------- END
gl_set_pen_color
void gl_set_pen_color(gl_color_t color)
Sets the active pen's color.
gl_brush_style_t
gl_brush_style_t
Definition: gl_types.h:57
gl_set_font_background_color
void gl_set_font_background_color(gl_color_t background)
Sets the active background color for texts.
gl_set_font_orientation
void gl_set_font_orientation(gl_font_orientation_t orientation)
Sets the active font orientation.
gl_set_font
void gl_set_font(const uint8_t *font)
Initialize the active font.
gl_driver_t
The context structure for storing driver configuration.
Definition: gl_types.h:145
gl_set_brush_color
void gl_set_brush_color(gl_color_t color)
Sets active brush color.
gl_set_brush_color_from
void gl_set_brush_color_from(gl_color_t color)
Sets the active start color.
gl_set_pen_width
void gl_set_pen_width(uint16_t width)
Sets the active pen width.
gl_get_inner_pen
uint16_t gl_get_inner_pen()
Returns the inner width of active pen.
gl_get_screen_height
uint16_t gl_get_screen_height()
Returns the height of the display.
gl_types.h
Declaration of types for Graphic Library.
gl_set_driver
void gl_set_driver(gl_driver_t *driver)
Sets the driver to the active state and enables drawing on whole display.
gl_get_screen_width
uint16_t gl_get_screen_width()
Returns the width of the display.
gl_set_crop_borders
bool gl_set_crop_borders(gl_coord_t left, gl_coord_t right, gl_coord_t top, gl_coord_t bottom)
Initialize borders for drawing on display.
gl_get_outer_pen
uint16_t gl_get_outer_pen()
Returns the outer width of active pen.
gl_shapes.h
API for different shape drawing.
gl_clear_inside_borders
void gl_clear_inside_borders(gl_color_t color)
Paint display within crop borders.
gl_coord_t
int16_t gl_coord_t
Definition: gl_types.h:102
gl_set_font_background
void gl_set_font_background(bool enable)
Sets active indicator for text background.
gl_set_brush_style
void gl_set_brush_style(gl_brush_style_t style)
Sets active brush style.
gl_clear
void gl_clear(gl_color_t color)
Paint whole display.
gl_text.h
API for text drawing.
gl_set_brush_color_to
void gl_set_brush_color_to(gl_color_t color)
Sets the active end color.
gl_color_t
uint16_t gl_color_t
Definition: gl_colors.h:55
gl_image.h
API for image drawing.
gl_font_orientation_t
gl_font_orientation_t
Definition: gl_types.h:83
gl_set_pen
void gl_set_pen(gl_color_t color, uint16_t width)
Sets the active pen width and color.
gl_set_outer_pen
void gl_set_outer_pen(uint16_t width_outside_object)
Sets width of outer part of active pen.
gl_colors.h
Definition of colors. Here predefined colors can be found.
gl_set_inner_pen
void gl_set_inner_pen(uint16_t width_inside_object)
Sets width of inner part of active pen.