|
Hershey Vector Fonts 0.1.0
A C++ library for working with the Hershey vector fonts
|
Go to the source code of this file.
Functions | |
| void | draw_glyph (cairo_t *cr, Hershey::Glyph glyph, float x0, float y0, float scale) |
| Draw a glyph. | |
| void | draw_glyphs (cairo_t *cr, Hershey::String string, float x0, float y0, float scale) |
| Draw a string of glyphs. | |
| void | draw_font (cairo_t *cr, Hershey::Font font, int width, int height) |
| Draw the glyphs in a font. | |
| float | position (float fraction, float x, float X) |
| Calculate a fractional position. | |
This header file contains the declaration of the functions for the Cairo interface.
| void draw_font | ( | cairo_t * | cr, |
| Hershey::Font | font, | ||
| int | width, | ||
| int | height | ||
| ) |
Draw the glyphs in a font.
| cr | The Cairo context |
| font | The font to draw |
| void draw_glyph | ( | cairo_t * | cr, |
| Hershey::Glyph | glyph, | ||
| float | x0, | ||
| float | y0, | ||
| float | scale | ||
| ) |
Draw a glyph.
| cr | The Cairo context |
| glyph | The glyph to draw |
| x0 | The starting x position |
| y0 | The starting x position |
| scale | The amount to scale the glyph by |
| void draw_glyphs | ( | cairo_t * | cr, |
| Hershey::String | string, | ||
| float | x0, | ||
| float | y0, | ||
| float | scale | ||
| ) |
Draw a string of glyphs.
| cr | The Cairo context |
| glyph | The string of glyphs to draw |
| x0 | The starting x position |
| y0 | The starting x position |
| scale | The amount to scale the glyphs by |
| float position | ( | float | fraction, |
| float | x, | ||
| float | X | ||
| ) |
Calculate a fractional position.
| fraction | The fraction to use |
| x | The object's size |
| X | The total size |