mikroSDK Reference Manual
gl_shapes.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 
44 #ifndef _GL_SHAPES_H_
45 #define _GL_SHAPES_H_
46 
47 #include "gl_types.h"
48 
49 #ifdef __cplusplus
50 extern "C"{
51 #endif
52 
85 void gl_draw_rect(gl_coord_t top_left_x, gl_coord_t top_left_y, gl_uint_t width, gl_uint_t height);
86 
103 void gl_draw_rect_rounded(gl_coord_t top_left_x, gl_coord_t top_left_y, gl_uint_t width, gl_uint_t height, gl_uint_t radius);
104 
119 
136 
151 void gl_draw_circle(gl_coord_t x0, gl_coord_t y0, gl_uint_t radius);
152 
168 void gl_draw_ellipse(gl_coord_t x0, gl_coord_t y0, gl_uint_t half_a, gl_uint_t half_b);
169 
189 void gl_draw_arc(gl_coord_t x, gl_coord_t y, gl_uint_t radius, gl_angle_t start, gl_angle_t end);
190 
191 #ifdef __cplusplus
192 } // extern "C"
193 #endif
194  // shapesgl // glgroup // apigroup
198 
199 #endif // _GL_SHAPES_H_
200 // ------------------------------------------------------------------------- END
gl_draw_ellipse
void gl_draw_ellipse(gl_coord_t x0, gl_coord_t y0, gl_uint_t half_a, gl_uint_t half_b)
Draw ellipse to the display driver using previously set pen and brush.
gl_draw_rect
void gl_draw_rect(gl_coord_t top_left_x, gl_coord_t top_left_y, gl_uint_t width, gl_uint_t height)
Draw a rectangle on display.
gl_types.h
Declaration of types for Graphic Library.
gl_draw_line
void gl_draw_line(gl_coord_t x1, gl_coord_t y1, gl_coord_t x2, gl_coord_t y2)
Draw a line on the display.
gl_coord_t
int16_t gl_coord_t
Definition: gl_types.h:102
gl_draw_rect_rounded
void gl_draw_rect_rounded(gl_coord_t top_left_x, gl_coord_t top_left_y, gl_uint_t width, gl_uint_t height, gl_uint_t radius)
Draw a rounded rectangle on display.
gl_uint_t
uint16_t gl_uint_t
Definition: gl_types.h:91
gl_angle_t
uint16_t gl_angle_t
Definition: gl_types.h:95
gl_draw_circle
void gl_draw_circle(gl_coord_t x0, gl_coord_t y0, gl_uint_t radius)
Draw a circle on display.
gl_draw_arc
void gl_draw_arc(gl_coord_t x, gl_coord_t y, gl_uint_t radius, gl_angle_t start, gl_angle_t end)
Draw an arc on display.
gl_draw_point
void gl_draw_point(gl_coord_t x, gl_coord_t y)
Draw a point on display.