|
Hershey Vector Fonts 0.1.0
A C++ library for working with the Hershey vector fonts
|
#include <X11/Xlib.h>#include <X11/Xutil.h>#include "font.hpp"#include "glyph.hpp"#include "string.hpp"Go to the source code of this file.
Functions | |
| void | draw_glyph (Display *display, Window *win, GC *gc, Hershey::Glyph glyph, float x0, float y0, float scale) |
| Draw a glyph. | |
| void | draw_glyphs (Display *display, Window *win, GC *gc, Hershey::String string, float x0, float y0, float scale) |
| Draw a string of glyphs. | |
| void | draw_font (Display *display, Window *win, GC *gc, 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 XLib interface.
| void draw_font | ( | Display * | display, |
| Window * | win, | ||
| GC * | gc, | ||
| Hershey::Font | font, | ||
| int | width, | ||
| int | height | ||
| ) |
Draw the glyphs in a font.
| display | The display |
| win | The window |
| gc | The graphics context |
| font | The font |
| void draw_glyph | ( | Display * | display, |
| Window * | win, | ||
| GC * | gc, | ||
| Hershey::Glyph | glyph, | ||
| float | x0, | ||
| float | y0, | ||
| float | scale | ||
| ) |
Draw a glyph.
| display | The display |
| win | The window |
| gc | The graphics context |
| x0 | The starting x position |
| y0 | The starting x position |
| scale | The amount to scale the glyph by |
| void draw_glyphs | ( | Display * | display, |
| Window * | win, | ||
| GC * | gc, | ||
| Hershey::String | string, | ||
| float | x0, | ||
| float | y0, | ||
| float | scale | ||
| ) |
Draw a string of glyphs.
| display | The display |
| win | The window |
| gc | The graphics 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 |