|
Picasso API
2.8
|
Typedefs | |
| typedef enum _ps_text_type | ps_text_type |
| Text rendering type. | |
| typedef enum _ps_draw_text_type | ps_draw_text_type |
| Draw mode for rending text. | |
| typedef enum _ps_text_align | ps_text_align |
| Text align mode for drawing text. | |
Enumerations | |
| enum | _ps_text_type { TEXT_TYPE_SMOOTH, TEXT_TYPE_MONO, TEXT_TYPE_STROKE } |
| Text rendering type. More... | |
| enum | _ps_draw_text_type { DRAW_TEXT_FILL, DRAW_TEXT_STROKE, DRAW_TEXT_BOTH } |
| Draw mode for rending text. More... | |
| enum | _ps_text_align { TEXT_ALIGN_CENTER = 0, TEXT_ALIGN_TOP = 1, TEXT_ALIGN_BOTTOM = 2, TEXT_ALIGN_LEFT = 4, TEXT_ALIGN_RIGHT = 8 } |
| Text align mode for drawing text. More... | |
Functions | |
| PEXPORT ps_bool PICAPI | ps_get_text_extent (ps_context *ctx, const void *text, uint32_t length, ps_size *rsize) |
| Get extent for text using current font which selected to graphic context. More... | |
| PEXPORT void PICAPI | ps_set_text_color (ps_context *ctx, const ps_color *color) |
| Set the text fill color for the graphic context. More... | |
| PEXPORT void PICAPI | ps_set_text_stroke_color (ps_context *ctx, const ps_color *color) |
| Set the text stroke color for the graphic context. More... | |
| PEXPORT void PICAPI | ps_text_transform (ps_context *ctx, const ps_matrix *matrix) |
| Transform text matrix for the graphic context. The text matrix is not a part of graphic state – saving and restoring has no effect on the text matrix. The text matrix is an attribute of graphic context. More... | |
| PEXPORT void PICAPI | ps_set_text_matrix (ps_context *ctx, const ps_matrix *matrix) |
| Set text matrix for the graphic context. The text matrix is not a part of graphic state – saving and restoring has no effect on the text matrix. The text matrix is an attribute of graphic context. More... | |
| PEXPORT void PICAPI | ps_set_text_render_type (ps_context *ctx, ps_text_type type) |
| Set rendering type for text. More... | |
| PEXPORT void PICAPI | ps_set_text_antialias (ps_context *ctx, ps_bool antialias) |
| Set whether the font allowed be anti-aliasing. More... | |
| PEXPORT void PICAPI | ps_set_text_kerning (ps_context *ctx, ps_bool kerning) |
| Set whether the font auto kerning is allowed. More... | |
| PEXPORT void PICAPI | ps_text_out_length (ps_context *ctx, float x, float y, const char *text, uint32_t length) |
| Draw single byte characters (latin-1) at location in user space. More... | |
| PEXPORT void PICAPI | ps_wide_text_out_length (ps_context *ctx, float x, float y, const ps_uchar16 *text, uint32_t length) |
| Draw unicode characters (ucs-2) at location in user space. More... | |
| PEXPORT void PICAPI | ps_draw_text (ps_context *ctx, const ps_rect *area, const void *text, uint32_t length, ps_draw_text_type type, ps_text_align align) |
| Draw text in a rectangle area, using font object which is selected in graphic context. More... | |
| PEXPORT ps_bool PICAPI | ps_get_glyph (ps_context *ctx, int32_t ch, ps_glyph *glyph) |
| Get the glyph from a given character, using font object which is selected in graphic context. More... | |
| PEXPORT void PICAPI | ps_show_glyphs (ps_context *ctx, float x, float y, ps_glyph *glyphs, uint32_t length) |
| Draw an array of glyphs at location in user space. More... | |
| PEXPORT ps_bool PICAPI | ps_get_path_from_glyph (ps_context *ctx, const ps_glyph *glyph, ps_path *path) |
| Get the path from a given glyph object. More... | |
| PEXPORT ps_bool PICAPI | ps_glyph_get_extent (const ps_glyph *glyph, ps_size *rsize) |
| Get extent for a glyph object. More... | |
| enum _ps_draw_text_type |
| enum _ps_text_align |
Text align mode for drawing text.
| enum _ps_text_type |
| void ps_draw_text | ( | ps_context * | ctx, |
| const ps_rect * | area, | ||
| const void * | text, | ||
| uint32_t | length, | ||
| ps_draw_text_type | type, | ||
| ps_text_align | align | ||
| ) |
Draw text in a rectangle area, using font object which is selected in graphic context.
| ctx | Pointer to an existing context object. |
| area | The rectangle area which text to be drawn. |
| text | The unicode text string to be draw. |
| length | The length of the text string. |
| type | The rending type of text. |
| align | The text align mode. |
| ps_bool ps_get_glyph | ( | ps_context * | ctx, |
| int32_t | ch, | ||
| ps_glyph * | glyph | ||
| ) |
Get the glyph from a given character, using font object which is selected in graphic context.
| ctx | Pointer to an existing context object. |
| ch | The character value. |
| glyph | Pointer to a structure to receiving the glyph. |
| ps_bool ps_get_path_from_glyph | ( | ps_context * | ctx, |
| const ps_glyph * | glyph, | ||
| ps_path * | path | ||
| ) |
Get the path from a given glyph object.
| ctx | Pointer to an existing context object. |
| glyph | The glyph object. |
| path | Pointer to a structure to receiving the path. |
| ps_bool ps_get_text_extent | ( | ps_context * | ctx, |
| const void * | text, | ||
| uint32_t | length, | ||
| ps_size * | rsize | ||
| ) |
Get extent for text using current font which selected to graphic context.
| ctx | Pointer to an existing context object. |
| text | Text which being tested. It can be latin-1 or unicode encoding. |
| length | Length of the text. |
| rsize | Pointer to a buffer to receiving the size. |
Get extent for a glyph object.
| glyph | Pointer to an existing glyph object. |
| rsize | Pointer to a buffer to receiving the size. |
| void ps_set_text_antialias | ( | ps_context * | ctx, |
| ps_bool | antialias | ||
| ) |
Set whether the font allowed be anti-aliasing.
| ctx | Pointer to an existing context object. |
| antialias | Boolean value whether anti-aliasing is allowed. (True default) |
| void ps_set_text_color | ( | ps_context * | ctx, |
| const ps_color * | color | ||
| ) |
Set the text fill color for the graphic context.
| ctx | Pointer to an existing context object. |
| color | The text fill color. |
| void ps_set_text_kerning | ( | ps_context * | ctx, |
| ps_bool | kerning | ||
| ) |
Set whether the font auto kerning is allowed.
| ctx | Pointer to an existing context object. |
| kerning | Boolean value whether auto kerning is allowed. (True default) |
| void ps_set_text_matrix | ( | ps_context * | ctx, |
| const ps_matrix * | matrix | ||
| ) |
Set text matrix for the graphic context. The text matrix is not a part of graphic state – saving and restoring has no effect on the text matrix. The text matrix is an attribute of graphic context.
| ctx | Pointer to an existing context object. |
| matrix | Pointer to an existing matrix object. |
| void ps_set_text_render_type | ( | ps_context * | ctx, |
| ps_text_type | type | ||
| ) |
Set rendering type for text.
| ctx | Pointer to an existing context object. |
| type | Rendering type for the text. |
| void ps_set_text_stroke_color | ( | ps_context * | ctx, |
| const ps_color * | color | ||
| ) |
Set the text stroke color for the graphic context.
| ctx | Pointer to an existing context object. |
| color | The text stroke color. |
| void ps_show_glyphs | ( | ps_context * | ctx, |
| float | x, | ||
| float | y, | ||
| ps_glyph * | glyphs, | ||
| uint32_t | length | ||
| ) |
Draw an array of glyphs at location in user space.
| ctx | Pointer to an existing context object. |
| x | The X-coordinate at which to draw the glyphs. |
| y | The Y-coordinate at which to draw the glyphs. |
| glyphs | The array of glyphs. |
| length | The length of array. |
| void ps_text_out_length | ( | ps_context * | ctx, |
| float | x, | ||
| float | y, | ||
| const char * | text, | ||
| uint32_t | length | ||
| ) |
Draw single byte characters (latin-1) at location in user space.
| ctx | Pointer to an existing context object. |
| x | The X-coordinate at which to draw the text. |
| y | The Y-coordinate at which to draw the text. |
| text | The text string to be draw. |
| length | The length of the text string. |
| void ps_text_transform | ( | ps_context * | ctx, |
| const ps_matrix * | matrix | ||
| ) |
Transform text matrix for the graphic context. The text matrix is not a part of graphic state – saving and restoring has no effect on the text matrix. The text matrix is an attribute of graphic context.
| ctx | Pointer to an existing context object. |
| matrix | Pointer to an existing matrix object. |
| void ps_wide_text_out_length | ( | ps_context * | ctx, |
| float | x, | ||
| float | y, | ||
| const ps_uchar16 * | text, | ||
| uint32_t | length | ||
| ) |
Draw unicode characters (ucs-2) at location in user space.
| ctx | Pointer to an existing context object. |
| x | The X-coordinate at which to draw the text. |
| y | The Y-coordinate at which to draw the text. |
| text | The unicode text string to be draw. |
| length | The length of the text string. |
1.8.17