Helper object for printed word location. More...
#include <TextPart.h>
Public Member Functions | |
TextWord () | |
Default constructor. | |
TextWord (const TextWord &other) | |
Copy constructor. | |
TextWord (const std::wstring &s, const PGLYPHPOS &arGlyphPos, const POINTQF *pWidths, std::tstring::size_type nStart, std::tstring::size_type nEnd=-1) | |
Constructor: create from a variable-width font string. | |
TextWord (const std::wstring &s, int nCharWidth, std::tstring::size_type nStart, std::tstring::size_type nEnd=-1) | |
Constructor: create from a fixed-width font string. | |
long | GetStart (size_type nLetter) const |
Returns the left border of the requested letter. | |
long | GetEnd (size_type nLetter) const |
Returns the right border of the requested letter. | |
std::wstring | GetText () const |
Returns the word's contents. | |
const TextWord & | operator+= (const TextWord &other) |
Adds another word's letters after the current letters. |
Helper object for printed word location.
Definition at line 72 of file TextPart.h.
TextWord::TextWord | ( | const TextWord & | other | ) | [inline] |
Copy constructor.
other | Printer work location object to copy |
Definition at line 83 of file TextPart.h.
TextWord::TextWord | ( | const std::wstring & | s, | |
const PGLYPHPOS & | arGlyphPos, | |||
const POINTQF * | pWidths, | |||
std::tstring::size_type | nStart, | |||
std::tstring::size_type | nEnd = -1 | |||
) |
Constructor: create from a variable-width font string.
s | The sentence's text | |
arGlyphPos | The location of each letter | |
pWidths | The widths of each letter | |
nStart | The first letter to use | |
nEnd | The last letter to use |
Definition at line 39 of file TextPart.cpp.
TextWord::TextWord | ( | const std::wstring & | s, | |
int | nCharWidth, | |||
std::tstring::size_type | nStart, | |||
std::tstring::size_type | nEnd = -1 | |||
) |
Constructor: create from a fixed-width font string.
s | The sentence's text | |
nCharWidth | The width of each glyph | |
nStart | The first letter to use | |
nEnd | The last letter to use |
Definition at line 59 of file TextPart.cpp.
long TextWord::GetEnd | ( | size_type | nLetter | ) | const [inline] |
Returns the right border of the requested letter.
nLetter | The letter to get the location of |
Definition at line 108 of file TextPart.h.
Referenced by TextLine::SetSides().
long TextWord::GetStart | ( | size_type | nLetter | ) | const [inline] |
Returns the left border of the requested letter.
nLetter | The letter to get the location of |
Definition at line 95 of file TextPart.h.
std::wstring TextWord::GetText | ( | ) | const [inline] |
Adds another word's letters after the current letters.
other | The word to add |
Definition at line 128 of file TextPart.h.