Generated by Doxygen 1.8.14
Neographics
Text

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_GTextAttributesn_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)
 

Detailed Description

Renders text.

Macro Definition Documentation

◆ n_graphics_text_layout_get_content_size

#define n_graphics_text_layout_get_content_size (   a,
  b,
  c,
 
)    (n_graphics_text_layout_get_content_size_with_attributes((a), (b), (c), (d), NULL));

Macro for reverse-compatibility for attributeless content size querying.

Typedef Documentation

◆ n_GTextAlignment

Determines how text is aligned within a line.

◆ n_GTextOverflowMode

Determines how line wrapping is handled.

Enumeration Type Documentation

◆ n_GTextAlignment

Determines how text is aligned within a line.

◆ n_GTextOverflowMode

Determines how line wrapping is handled.

Function Documentation

◆ __attribute__()

struct n_GTextAttributes __attribute__ ( (__packed__)  )

Represents data relevant to rendering text on non-rectangular screens or with paging.

◆ n_graphics_draw_text()

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_graphics_text_attributes_create()

n_GTextAttributes* n_graphics_text_attributes_create ( void  )

Creates a n_GTextAttributes struct.

◆ n_graphics_text_attributes_destroy()

void n_graphics_text_attributes_destroy ( n_GTextAttributes text_attributes)

Destroys a n_GTextAttributes struct.

◆ n_graphics_text_attributes_enable_paging()

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.

◆ n_graphics_text_attributes_enable_screen_text_flow()

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.

◆ n_graphics_text_attributes_restore_default_paging()

void n_graphics_text_attributes_restore_default_paging ( n_GTextAttributes text_attributes)

Resets paging behavior of a given n_GTextAttributes struct to default.

◆ n_graphics_text_layout_get_content_size_with_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 
)

Query dimensions of a given text block.