|
LibreOffice Module drawinglayer (master) 1
|
TextLayouterDevice class. More...
#include <textlayoutdevice.hxx>
Public Member Functions | |
| TextLayouterDevice () | |
| constructor/destructor More... | |
| ~TextLayouterDevice () COVERITY_NOEXCEPT_FALSE | |
| void | setFont (const vcl::Font &rFont) |
| tooling methods More... | |
| void | setFontAttribute (const attribute::FontAttribute &rFontAttribute, double fFontScaleX, double fFontScaleY, const css::lang::Locale &rLocale) |
| double | getTextHeight () const |
| double | getOverlineHeight () const |
| double | getOverlineOffset () const |
| double | getUnderlineHeight () const |
| double | getUnderlineOffset () const |
| double | getStrikeoutOffset () const |
| double | getTextWidth (const OUString &rText, sal_uInt32 nIndex, sal_uInt32 nLength) const |
| void | getTextOutlines (basegfx::B2DPolyPolygonVector &, const OUString &rText, sal_uInt32 nIndex, sal_uInt32 nLength, const ::std::vector< double > &rDXArray, const ::std::vector< sal_Bool > &rKashidaArray) const |
| basegfx::B2DRange | getTextBoundRect (const OUString &rText, sal_uInt32 nIndex, sal_uInt32 nLength) const |
| double | getFontAscent () const |
| double | getFontDescent () const |
| void | addTextRectActions (const tools::Rectangle &rRectangle, const OUString &rText, DrawTextFlags nStyle, GDIMetaFile &rGDIMetaFile) const |
| ::std::vector< double > | getTextArray (const OUString &rText, sal_uInt32 nIndex, sal_uInt32 nLength, bool bCaret=false) const |
Private Attributes | |
| SolarMutexGuard | maSolarGuard |
| internally used VirtualDevice More... | |
| VirtualDevice & | mrDevice |
TextLayouterDevice class.
This helper class exists to isolate all accesses to VCL text formatting/handling functionality for primitive implementations. When in the future FontHandling may move to an own library independent from VCL, primitives will be prepared.
Definition at line 61 of file textlayoutdevice.hxx.
| drawinglayer::primitive2d::TextLayouterDevice::TextLayouterDevice | ( | ) |
constructor/destructor
Definition at line 158 of file textlayoutdevice.cxx.
| drawinglayer::primitive2d::TextLayouterDevice::~TextLayouterDevice | ( | ) |
Definition at line 163 of file textlayoutdevice.cxx.
| void drawinglayer::primitive2d::TextLayouterDevice::addTextRectActions | ( | const tools::Rectangle & | rRectangle, |
| const OUString & | rText, | ||
| DrawTextFlags | nStyle, | ||
| GDIMetaFile & | rGDIMetaFile | ||
| ) | const |
Definition at line 289 of file textlayoutdevice.cxx.
References OutputDevice::AddTextRectActions(), and mrDevice.
Referenced by wmfemfhelper::implInterpretMetafile().
| double drawinglayer::primitive2d::TextLayouterDevice::getFontAscent | ( | ) | const |
Definition at line 277 of file textlayoutdevice.cxx.
References FontMetric::GetAscent(), OutputDevice::GetFontMetric(), and mrDevice.
Referenced by wmfemfhelper::createFontAttributeTransformAndAlignment(), and wmfemfhelper::processMetaTextAction().
| double drawinglayer::primitive2d::TextLayouterDevice::getFontDescent | ( | ) | const |
Definition at line 283 of file textlayoutdevice.cxx.
References FontMetric::GetDescent(), OutputDevice::GetFontMetric(), and mrDevice.
Referenced by wmfemfhelper::createFontAttributeTransformAndAlignment(), and wmfemfhelper::processMetaTextAction().
| double drawinglayer::primitive2d::TextLayouterDevice::getOverlineHeight | ( | ) | const |
Definition at line 195 of file textlayoutdevice.cxx.
References OutputDevice::GetFontMetric(), FontMetric::GetInternalLeading(), and mrDevice.
Referenced by drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D::impCreateGeometryContent(), and wmfemfhelper::processMetaTextLineAction().
| double drawinglayer::primitive2d::TextLayouterDevice::getOverlineOffset | ( | ) | const |
Definition at line 174 of file textlayoutdevice.cxx.
References FontMetric::GetAscent(), OutputDevice::GetFontMetric(), and mrDevice.
Referenced by drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D::impCreateGeometryContent(), and wmfemfhelper::processMetaTextLineAction().
| double drawinglayer::primitive2d::TextLayouterDevice::getStrikeoutOffset | ( | ) | const |
Definition at line 188 of file textlayoutdevice.cxx.
References OutputDevice::GetFontMetric(), and mrDevice.
Referenced by drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D::impCreateGeometryContent(), and wmfemfhelper::processMetaTextLineAction().
| std::vector< double > drawinglayer::primitive2d::TextLayouterDevice::getTextArray | ( | const OUString & | rText, |
| sal_uInt32 | nIndex, | ||
| sal_uInt32 | nLength, | ||
| bool | bCaret = false |
||
| ) | const |
Definition at line 296 of file textlayoutdevice.cxx.
References OutputDevice::GetTextArray(), i, mrDevice, nIndex, nLength, and KernArray::size().
Referenced by wmfemfhelper::implInterpretMetafile().
| basegfx::B2DRange drawinglayer::primitive2d::TextLayouterDevice::getTextBoundRect | ( | const OUString & | rText, |
| sal_uInt32 | nIndex, | ||
| sal_uInt32 | nLength | ||
| ) | const |
Definition at line 250 of file textlayoutdevice.cxx.
References vcl::unotools::b2DRectangleFromRectangle(), OutputDevice::GetTextBoundRect(), tools::Rectangle::IsEmpty(), mrDevice, nIndex, and nLength.
Referenced by drawinglayer::primitive2d::TextSimplePortionPrimitive2D::getB2DRange().
| double drawinglayer::primitive2d::TextLayouterDevice::getTextHeight | ( | ) | const |
Definition at line 209 of file textlayoutdevice.cxx.
References OutputDevice::GetTextHeight(), and mrDevice.
| void drawinglayer::primitive2d::TextLayouterDevice::getTextOutlines | ( | basegfx::B2DPolyPolygonVector & | , |
| const OUString & | rText, | ||
| sal_uInt32 | nIndex, | ||
| sal_uInt32 | nLength, | ||
| const ::std::vector< double > & | rDXArray, | ||
| const ::std::vector< sal_Bool > & | rKashidaArray | ||
| ) | const |
Definition at line 217 of file textlayoutdevice.cxx.
References a, basegfx::fround(), OutputDevice::GetTextOutlines(), mrDevice, nIndex, nLength, KernArray::push_back(), and KernArray::reserve().
Referenced by drawinglayer::primitive2d::TextSimplePortionPrimitive2D::getTextOutlinesAndTransformation().
| double drawinglayer::primitive2d::TextLayouterDevice::getTextWidth | ( | const OUString & | rText, |
| sal_uInt32 | nIndex, | ||
| sal_uInt32 | nLength | ||
| ) | const |
Definition at line 211 of file textlayoutdevice.cxx.
References OutputDevice::GetTextWidth(), mrDevice, nIndex, and nLength.
Referenced by drawinglayer::primitive2d::TextBreakupHelper::breakupPortion(), drawinglayer::primitive2d::TextCharacterStrikeoutPrimitive2D::create2DDecomposition(), drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D::impCreateGeometryContent(), emfplushelper::EmfPlusHelperData::processEmfPlusData(), and wmfemfhelper::processMetaTextAction().
| double drawinglayer::primitive2d::TextLayouterDevice::getUnderlineHeight | ( | ) | const |
Definition at line 202 of file textlayoutdevice.cxx.
References FontMetric::GetDescent(), OutputDevice::GetFontMetric(), and mrDevice.
Referenced by drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D::impCreateGeometryContent(), and wmfemfhelper::processMetaTextLineAction().
| double drawinglayer::primitive2d::TextLayouterDevice::getUnderlineOffset | ( | ) | const |
Definition at line 181 of file textlayoutdevice.cxx.
References FontMetric::GetDescent(), OutputDevice::GetFontMetric(), and mrDevice.
Referenced by drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D::impCreateGeometryContent(), and wmfemfhelper::processMetaTextLineAction().
| void drawinglayer::primitive2d::TextLayouterDevice::setFont | ( | const vcl::Font & | rFont | ) |
tooling methods
Definition at line 165 of file textlayoutdevice.cxx.
References mrDevice, and OutputDevice::SetFont().
Referenced by wmfemfhelper::createFontAttributeTransformAndAlignment(), wmfemfhelper::implInterpretMetafile(), wmfemfhelper::processMetaTextAction(), wmfemfhelper::processMetaTextLineAction(), and setFontAttribute().
| void drawinglayer::primitive2d::TextLayouterDevice::setFontAttribute | ( | const attribute::FontAttribute & | rFontAttribute, |
| double | fFontScaleX, | ||
| double | fFontScaleY, | ||
| const css::lang::Locale & | rLocale | ||
| ) |
Definition at line 167 of file textlayoutdevice.cxx.
References drawinglayer::primitive2d::getVclFontFromFontAttribute(), and setFont().
Referenced by drawinglayer::primitive2d::TextCharacterStrikeoutPrimitive2D::create2DDecomposition(), drawinglayer::primitive2d::TextSimplePortionPrimitive2D::getB2DRange(), drawinglayer::primitive2d::TextSimplePortionPrimitive2D::getTextOutlinesAndTransformation(), drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D::impCreateGeometryContent(), emfplushelper::EmfPlusHelperData::processEmfPlusData(), and drawinglayer::primitive2d::TextBreakupHelper::TextBreakupHelper().
|
private |
internally used VirtualDevice
Definition at line 64 of file textlayoutdevice.hxx.
|
private |
Definition at line 65 of file textlayoutdevice.hxx.
Referenced by addTextRectActions(), getFontAscent(), getFontDescent(), getOverlineHeight(), getOverlineOffset(), getStrikeoutOffset(), getTextArray(), getTextBoundRect(), getTextHeight(), getTextOutlines(), getTextWidth(), getUnderlineHeight(), getUnderlineOffset(), and setFont().