hal_gfx_font.h File Reference

Header file containing functions prototypes of Graphics library. More...

#include "hal_gfx_hal.h"
+ Include dependency graph for hal_gfx_font.h:

Go to the source code of this file.

Classes

struct  hal_gfx_kern_pair_t
 Font Kerning setting Structure. More...
 
struct  hal_gfx_glyph_t
 Font glyph setting Structure. More...
 
struct  hal_gfx_font_range_t
 Font range setting Structure. More...
 
struct  hal_gfx_font_t
 Font setting Structure. More...
 

Macros

#define HAL_GFX_ALIGNX_LEFT   (0x00U)
 Align horizontally to the left. More...
 
#define HAL_GFX_ALIGNX_RIGHT   (0x01U)
 Align horizontally to the right. More...
 
#define HAL_GFX_ALIGNX_CENTER   (0x02U)
 Align horizontally centered. More...
 
#define HAL_GFX_ALIGNX_JUSTIFY   (0x03U)
 Justify horizontally. More...
 
#define HAL_GFX_ALIGNX_MASK   (0x03U)
 Horizontal alignment mask. More...
 
#define HAL_GFX_ALIGNY_TOP   (0x00U)
 Align vertically to the top. More...
 
#define HAL_GFX_ALIGNY_BOTTOM   (0x04U)
 Align vertically to the bottom. More...
 
#define HAL_GFX_ALIGNY_CENTER   (0x08U)
 Align vertically centered. More...
 
#define HAL_GFX_ALIGNY_JUSTIFY   (0x0cU)
 Justify vertically. More...
 
#define HAL_GFX_ALIGNY_MASK   (0x0cU)
 Vertical alignment mask. More...
 
#define HAL_GFX_TEXT_WRAP   (0x10U)
 Use text wrapping. More...
 

Functions

void hal_gfx_bind_font (hal_gfx_font_t *font)
 Bind the font to use in future hal_gfx_print() calls. More...
 
int hal_gfx_string_get_bbox (const char *str, int *w, int *h, int max_w, uint32_t wrap)
 Get the bounding box's width and height of a string. More...
 
void hal_gfx_print (const char *str, int x, int y, int w, int h, uint32_t fg_col, uint32_t align)
 Print pre-formatted text. More...
 
void hal_gfx_print_to_position (const char *str, int *pos_x, int *pos_y, int x, int y, int w, int h, uint32_t fg_col, uint32_t align)
 Print pre-formatted text. More...
 

Detailed Description

Header file containing functions prototypes of Graphics library.

Author
BLE Driver Team
Attention
Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file hal_gfx_font.h.