89 const char *str,
size_t max_chars);
178 flags &= ~GP_ALIGN_HORIZ;
194 return gp_text(pixmap, style, x, y, flags, fg_color, bg_color, str);
203 const char *str,
size_t max_chars);
252 const
char *fmt, va_list va)
295 flags &= ~GP_ALIGN_HORIZ;
312 ret =
gp_vprint(pixmap, style, x, y, flags, fg_color, bg_color, fmt, va);
336 gp_pixel bg_color,
const char *str);
uint32_t gp_pixel
Pixel integer value.
int gp_coord
Integer type for coordinates i.e. x, y, ...
unsigned int gp_size
Integer type for sizes i.e. w, h, ...
A compiler dependent macros.
#define GP_FMT_PRINTF(fmt, list)
Expands to format printf attribute when supported by the compiler.
gp_size gp_vprint(gp_pixmap *pixmap, const gp_text_style *style, gp_coord x, gp_coord y, gp_text_flags flags, gp_pixel fg_color, gp_pixel bg_color, const char *fmt, va_list va)
Draws a string.
gp_size gp_text(gp_pixmap *pixmap, const gp_text_style *style, gp_coord x, gp_coord y, gp_text_flags flags, gp_pixel fg_color, gp_pixel bg_color, const char *str)
Draws a string.
gp_size gp_text_raw(gp_pixmap *pixmap, const gp_text_style *style, gp_coord x, gp_coord y, gp_text_flags flags, gp_pixel fg_color, gp_pixel bg_color, const char *str, size_t max_chars)
Draws a string.
static gp_size gp_print_xxy(gp_pixmap *pixmap, const gp_text_style *style, gp_coord x1, gp_coord x2, gp_coord y, gp_text_flags flags, gp_pixel fg_color, gp_pixel bg_color, const char *fmt,...)
Draws a string.
gp_size gp_glyph_draw(gp_pixmap *pixmap, const gp_text_style *style, gp_coord x, gp_coord y, int flags, gp_pixel fg_color, gp_pixel bg_color, uint32_t glyph)
Renders a single glyph.
void gp_text_clear(gp_pixmap *pixmap, const gp_text_style *style, gp_coord x, gp_coord y, gp_text_flags flags, gp_pixel bg_color, gp_size size)
Clears a rectangle that would be used to draw text of size pixels.
gp_text_flags
Text flags, mostly alignment.
@ GP_ALIGN_LEFT
Draws the text to the left of the point.
@ GP_ALIGN_RIGHT
Draws the text to the right of the point.
@ GP_TEXT_BEARING
Apply bearing before start of the string.
@ GP_VALIGN_BOTTOM
Alias for GP_VALIGN_BELOW.
@ GP_VALIGN_TOP
Alias for GP_VALIGN_ABOVE.
@ GP_VALIGN_BELOW
Draws the text below the point.
@ GP_TEXT_NOBG
Use pixmap background.
@ GP_VALIGN_VERT
Vertical alignment mask.
@ GP_ALIGN_CENTER
Centers the text at the point horizontally.
@ GP_VALIGN_ABOVE
Draws the text above the point.
@ GP_ALIGN_HORIZ
Horizontal alignment mask.
@ GP_VALIGN_BASELINE
Places the text baseline at the point.
@ GP_VALIGN_CENTER
Centers the text vertically at the point.
static gp_size gp_text_xxy(gp_pixmap *pixmap, const gp_text_style *style, gp_coord x1, gp_coord x2, gp_coord y, gp_text_flags flags, gp_pixel fg_color, gp_pixel bg_color, const char *str)
Draws a string.
gp_size gp_print(gp_pixmap *pixmap, const gp_text_style *style, gp_coord x, gp_coord y, gp_text_flags flags, gp_pixel fg_color, gp_pixel bg_color, const char *fmt,...)
Draws a string.