Bare Metal Programming Tool Kit
|
specifies how a text is rendered on a screen More...
#include <graphics.h>
Public Member Functions | |
format (const font &f=font_default(), font_alignment h=align_near, font_alignment v=align_near, bool wrap=0, unsigned int scale=1, vector spacing=vector::origin(), vector top_left_margin=vector(2, 2), vector bottom_right_margin=vector(2, 2), color fg=color::black(), color bg=color::transparent()) | |
format (const format &fmt, const font &fr) | |
create a format from an existing format and a font | |
Public Attributes | |
const font & | f |
the font, default is the default font | |
font_alignment | h |
the horizontal alignment, default is near | |
font_alignment | v |
the vertical alignment, default is near | |
bool | wrap |
wrapping: true for wraparound, false for cutoff (default). | |
unsigned int | scale |
scale: 1 is default, 2 is doubole size, etc. | |
vector | spacing |
extra spacing between the characters. default is 0. | |
vector | top_left_margin |
top-left margin, default is (2,2) | |
vector | bottom_right_margin |
bottom-right margin, default is (0,0) | |
color | fg |
foreground, default is black | |
color | bg |
background, default is transparent | |
Related Functions | |
(Note that these are not member functions.) | |
enum | font_alignment { align_near, align_far, align_centre, align_fill } |
std::ostream & | operator<< (std::ostream &s, const font_alignment &a) |
specifies how a text is rendered on a screen
A format specifies how an ASCII text is shown on a screen. A format specifies the following aspects:
These aspects are all stored in public attributes and can be read and written.
Definition at line 1871 of file graphics.h.
|
inline |
create a format specification
All parameters have suitable default values:
Definition at line 1912 of file graphics.h.
|
related |
the alignment of a text
Definition at line 1829 of file graphics.h.
|
related |
prints an alignment