Hershey Vector Fonts 0.1.0
A C++ library for working with the Hershey vector fonts
Loading...
Searching...
No Matches
hershey_xlib.hpp
Go to the documentation of this file.
1#ifndef HERSHEY_XLIB_HPP
2#define HERSHEY_XLIB_HPP
3
8#include <X11/Xlib.h>
9#include <X11/Xutil.h>
10
11#include "font.hpp"
12#include "glyph.hpp"
13#include "string.hpp"
14
25void draw_glyph(
26 Display *display, Window *win, GC *gc, Hershey::Glyph glyph, int x0, int y0,
27 int scale
28);
29
41void draw_glyphs(
42 Display *display, Window *win, GC *gc, Hershey::String string, int x0, int y0,
43 int scale
44);
45
54void draw_font(
55 Display *display, Window *win, GC *gc, Hershey::Font font, int width, int height
56);
57
65float position(float fraction, float x, float X);
66
67#endif
A Hershey vector font.
Definition font.hpp:19
A Hershey vector font glyph.
Definition glyph.hpp:17
A character string comprising Hershey vector font glyphs.
Definition string.hpp:20
void draw_font(Display *display, Window *win, GC *gc, Hershey::Font font, int width, int height)
Draw the glyphs in a font.
Definition hershey_xlib.cpp:36
void draw_glyphs(Display *display, Window *win, GC *gc, Hershey::String string, int x0, int y0, int scale)
Draw a string of glyphs.
Definition hershey_xlib.cpp:25
float position(float fraction, float x, float X)
Calculate a fractional position.
Definition hershey_cairo.cpp:62
void draw_glyph(Display *display, Window *win, GC *gc, Hershey::Glyph glyph, int x0, int y0, int scale)
Draw a glyph.
Definition hershey_xlib.cpp:3