GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_markup_justify.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later
2/*
3 * Copyright (C) 2022-2023 Cyril Hrubis <metan@ucw.cz>
4 */
5
11#ifndef UTILS_GP_MARKUP_JUSTIFY_H
12#define UTILS_GP_MARKUP_JUSTIFY_H
13
14#include <utils/gp_markup.h>
15
25
37
50typedef unsigned int (*gp_markup_width_cb)(gp_markup_glyph *first, size_t len, void *priv);
51
52
62gp_markup_lines *gp_markup_justify(gp_markup *self, unsigned int line_width, gp_markup_width_cb width_callback, void *priv);
63
70
77
78#endif /* UTILS_GP_MARKUP_JUSTIFY_H */
A simple text markup format.
void gp_markup_justify_free(gp_markup_lines *self)
Frees justified lines.
gp_markup_lines * gp_markup_justify(gp_markup *self, unsigned int line_width, gp_markup_width_cb width_callback, void *priv)
Justifies text into lines.
unsigned int(* gp_markup_width_cb)(gp_markup_glyph *first, size_t len, void *priv)
A callback for text justification.
void gp_markup_justify_dump(gp_markup_lines *self)
Dumps justified lines into stdout, used for debugging.
A markup glyph.
Definition gp_markup.h:67
A markup line.
gp_markup_glyph * first
gp_markup_glyph * last
A markup lines.
gp_markup_line lines[]
unsigned int lines_cnt
A text markup.
Definition gp_markup.h:97