Helper object for printed text line. More...
#include <TextPart.h>
Public Member Functions | |
TextLine () | |
Default constructor. | |
TextLine (const TextLine &other) | |
Copy constructor. | |
TextLine (const std::wstring &s, const RECTL &rc, const PGLYPHPOS &arGlyphPos, const POINTQF *pWidths) | |
Constructor: from a string of variable-width font. | |
TextLine (const std::wstring &s, const RECTL &rc, int nCharWidth) | |
Constructor: from a string of fixed-width font. | |
bool | AddTextSameLine (const TextLine &other) |
This function checks if the received line of text is on the same line as this one, and if so, adds its data to this line. | |
Public Attributes | |
RECTL | rcArea |
The line's area. | |
Protected Member Functions | |
void | SetSides () |
Updates the line's rectangle using the word locations. |
Helper object for printed text line.
Definition at line 134 of file TextPart.h.
TextLine::TextLine | ( | const TextLine & | other | ) | [inline] |
Copy constructor.
other | The text line object to copy |
Definition at line 145 of file TextPart.h.
References rcArea.
TextLine::TextLine | ( | const std::wstring & | s, | |
const RECTL & | rc, | |||
const PGLYPHPOS & | arGlyphPos, | |||
const POINTQF * | pWidths | |||
) |
Constructor: from a string of variable-width font.
s | The line's text | |
rc | The line's printed location | |
arGlyphPos | Array of glyph locations | |
pWidths | Array of glyph widths |
Definition at line 81 of file TextPart.cpp.
References SetSides().
TextLine::TextLine | ( | const std::wstring & | s, | |
const RECTL & | rc, | |||
int | nCharWidth | |||
) |
Constructor: from a string of fixed-width font.
s | The line's text | |
rc | The line's printed location | |
nCharWidth | The width of each glyph (fixed font) |
Definition at line 114 of file TextPart.cpp.
References SetSides().
bool TextLine::AddTextSameLine | ( | const TextLine & | other | ) |
This function checks if the received line of text is on the same line as this one, and if so, adds its data to this line.
other | The text line object to check |
Definition at line 158 of file TextPart.cpp.
References OnSameLine(), and rcArea.
Referenced by TextArea::AddLine().