Classes | |
struct | n_GTextAttributes |
Macros | |
#define | n_graphics_text_layout_get_content_size(a, b, c, d) (n_graphics_text_layout_get_content_size_with_attributes((a), (b), (c), (d), NULL)); |
Typedefs | |
typedef enum n_GTextOverflowMode | n_GTextOverflowMode |
typedef enum n_GTextAlignment | n_GTextAlignment |
Enumerations | |
enum | n_GTextOverflowMode { n_GTextOverflowModeWordWrap = 0, n_GTextOverflowModeTrailingEllipsis, n_GTextOverflowModeFill } |
enum | n_GTextAlignment { n_GTextAlignmentLeft = 0, n_GTextAlignmentCenter, n_GTextAlignmentRight } |
Functions | |
struct n_GTextAttributes | __attribute__ ((__packed__)) n_GTextAttributes |
n_GTextAttributes * | n_graphics_text_attributes_create (void) |
void | n_graphics_text_attributes_destroy (n_GTextAttributes *text_attributes) |
void | n_graphics_text_attributes_enable_screen_text_flow (n_GTextAttributes *text_attributes, uint8_t inset) |
void | n_graphics_text_attributes_restore_default_paging (n_GTextAttributes *text_attributes) |
void | n_graphics_text_attributes_enable_paging (n_GTextAttributes *text_attributes, n_GPoint moduloed_origin, n_GRect pageable_area) |
void | n_graphics_draw_text (n_GContext *ctx, const char *text, n_GFont const font, const n_GRect box, const n_GTextOverflowMode overflow_mode, const n_GTextAlignment alignment, n_GTextAttributes *text_attributes) |
n_GSize | n_graphics_text_layout_get_content_size_with_attributes (const char *text, n_GFont const font, const n_GRect box, const n_GTextOverflowMode overflow_mode, const n_GTextAlignment alignment, n_GTextAttributes *text_attributes) |
Renders text.
#define n_graphics_text_layout_get_content_size | ( | a, | |
b, | |||
c, | |||
d | |||
) | (n_graphics_text_layout_get_content_size_with_attributes((a), (b), (c), (d), NULL)); |
Macro for reverse-compatibility for attributeless content size querying.
typedef enum n_GTextAlignment n_GTextAlignment |
Determines how text is aligned within a line.
typedef enum n_GTextOverflowMode n_GTextOverflowMode |
Determines how line wrapping is handled.
enum n_GTextAlignment |
Determines how text is aligned within a line.
enum n_GTextOverflowMode |
Determines how line wrapping is handled.
struct n_GTextAttributes __attribute__ | ( | (__packed__) | ) |
Represents data relevant to rendering text on non-rectangular screens or with paging.
void n_graphics_draw_text | ( | n_GContext * | ctx, |
const char * | text, | ||
n_GFont const | font, | ||
const n_GRect | box, | ||
const n_GTextOverflowMode | overflow_mode, | ||
const n_GTextAlignment | alignment, | ||
n_GTextAttributes * | text_attributes | ||
) |
Draw text with given paramters.
n_GTextAttributes* n_graphics_text_attributes_create | ( | void | ) |
Creates a n_GTextAttributes struct.
void n_graphics_text_attributes_destroy | ( | n_GTextAttributes * | text_attributes | ) |
Destroys a n_GTextAttributes struct.
void n_graphics_text_attributes_enable_paging | ( | n_GTextAttributes * | text_attributes, |
n_GPoint | moduloed_origin, | ||
n_GRect | pageable_area | ||
) |
Enables paging for a given n_GTextAttributes struct.
void n_graphics_text_attributes_enable_screen_text_flow | ( | n_GTextAttributes * | text_attributes, |
uint8_t | inset | ||
) |
Enables screen text flow in a n_GTextAttributes struct.
void n_graphics_text_attributes_restore_default_paging | ( | n_GTextAttributes * | text_attributes | ) |
Resets paging behavior of a given n_GTextAttributes struct to default.
n_GSize n_graphics_text_layout_get_content_size_with_attributes | ( | const char * | text, |
n_GFont const | font, | ||
const n_GRect | box, | ||
const n_GTextOverflowMode | overflow_mode, | ||
const n_GTextAlignment | alignment, | ||
n_GTextAttributes * | text_attributes | ||
) |
Query dimensions of a given text block.