LibreOffice Module svtools (master) 1
|
This class provides drawing text with different script types on any output devices. More...
#include <scriptedtext.hxx>
Public Member Functions | |
SvtScriptedTextHelper (OutputDevice &_rOutDevice) | |
Constructor sets an output device and no fonts. More... | |
SvtScriptedTextHelper (const SvtScriptedTextHelper &_rCopy) | |
Copy constructor. More... | |
~SvtScriptedTextHelper () | |
Destructor. More... | |
void | SetFonts (vcl::Font const *_pLatinFont, vcl::Font const *_pAsianFont, vcl::Font const *_pCmplxFont) |
Sets new fonts and recalculates the text width. More... | |
void | SetDefaultFont () |
Sets the default font of the current output device to all script types. More... | |
void | SetText (const OUString &_rText, const css::uno::Reference< css::i18n::XBreakIterator > &_xBreakIter) |
Sets a new text and calculates all script breaks and the text width. More... | |
const Size & | GetTextSize () const |
Returns a size struct containing the width and height of the text in the current output device. More... | |
void | DrawText (const Point &_rPos) |
Draws the text in the current output device. More... | |
Private Member Functions | |
SvtScriptedTextHelper & | operator= (const SvtScriptedTextHelper &)=delete |
Implementation of class functionality. More... | |
Private Attributes | |
std::unique_ptr< SvtScriptedTextHelper_Impl > | mpImpl |
This class provides drawing text with different script types on any output devices.
Definition at line 40 of file scriptedtext.hxx.
SvtScriptedTextHelper::SvtScriptedTextHelper | ( | OutputDevice & | _rOutDevice | ) |
Constructor sets an output device and no fonts.
_rOutDevice | A reference to an output device. |
Definition at line 278 of file scriptedtext.cxx.
SvtScriptedTextHelper::SvtScriptedTextHelper | ( | const SvtScriptedTextHelper & | _rCopy | ) |
Copy constructor.
Definition at line 283 of file scriptedtext.cxx.
SvtScriptedTextHelper::~SvtScriptedTextHelper | ( | ) |
Destructor.
Definition at line 288 of file scriptedtext.cxx.
void SvtScriptedTextHelper::DrawText | ( | const Point & | _rPos | ) |
Draws the text in the current output device.
_rPos | The position of the top left edge of the text. |
Definition at line 312 of file scriptedtext.cxx.
References mpImpl.
const Size & SvtScriptedTextHelper::GetTextSize | ( | ) | const |
Returns a size struct containing the width and height of the text in the current output device.
Definition at line 307 of file scriptedtext.cxx.
References mpImpl.
|
privatedelete |
Implementation of class functionality.
References DrawText, GetTextSize(), and SetText().
void SvtScriptedTextHelper::SetDefaultFont | ( | ) |
Sets the default font of the current output device to all script types.
Definition at line 297 of file scriptedtext.cxx.
References mpImpl.
void SvtScriptedTextHelper::SetFonts | ( | vcl::Font const * | _pLatinFont, |
vcl::Font const * | _pAsianFont, | ||
vcl::Font const * | _pCmplxFont | ||
) |
Sets new fonts and recalculates the text width.
_pLatinFont | The font for latin characters. |
_pAsianFont | The font for asian characters. |
_pCmplxFont | The font for complex text layout. |
Definition at line 292 of file scriptedtext.cxx.
References mpImpl.
void SvtScriptedTextHelper::SetText | ( | const OUString & | _rText, |
const css::uno::Reference< css::i18n::XBreakIterator > & | _xBreakIter | ||
) |
Sets a new text and calculates all script breaks and the text width.
_rText | The new text. |
_xBreakIter | The break iterator for iterating through the script portions. |
Definition at line 302 of file scriptedtext.cxx.
References mpImpl.
|
private |
Definition at line 43 of file scriptedtext.hxx.
Referenced by DrawText(), GetTextSize(), SetDefaultFont(), SetFonts(), and SetText().