|
ContRap-Core
|
Class XMLGlyphPrinter is an abstract glyph printing interface. More...
#include <xmllayout.h>
Public Member Functions | |
| XMLGlyphPrinter () | |
| Default empty constructor of the printer. | |
| virtual | ~XMLGlyphPrinter () |
| Releases the memory. | |
| virtual void | print_character (int x, int y, const std::string &character) |
| Prints a single unicode character at the given position. | |
| virtual void | get_size (const std::string &character, double &width, double &height) |
| Returns the size of the given unicode character. | |
Class XMLGlyphPrinter is an abstract glyph printing interface.
A glyph is an atomic part of printed data, e.g. a letter or an UTF character. More complex glyphs are extensible glyphs. Glyphs are also atomic (leafs) within the resulting block structure of the layout.
An XMLGlyphPrinter implementation provides a library independent way to draw glyphs on some initialized device. You pass the printer to the layouter to draw your output.
| crp::XMLGlyphPrinter::XMLGlyphPrinter | ( | ) | [inline] |
Default empty constructor of the printer.
| virtual crp::XMLGlyphPrinter::~XMLGlyphPrinter | ( | ) | [inline, virtual] |
Releases the memory.
| virtual void crp::XMLGlyphPrinter::get_size | ( | const std::string & | character, |
| double & | width, | ||
| double & | height | ||
| ) | [inline, virtual] |
Returns the size of the given unicode character.
| character | Unicode character |
| width | This value is overwritten with the width |
| height | This value is overwritten with the height |
| virtual void crp::XMLGlyphPrinter::print_character | ( | int | x, |
| int | y, | ||
| const std::string & | character | ||
| ) | [inline, virtual] |
Prints a single unicode character at the given position.
A glyph is printed by calling this method several times a the glyphs positions. The glyph is printed into the rectangle, which starts at (x,y) and extends into the ascending coordinate directions. The width and height of the rectangle for a character can be queried by calling the get_size method.
| x | X-Coordinate of the drawing point |
| y | Y-Coordinate of the drawing point |
| character | Unicode character to print |
1.7.3