42 maLogicalAdvancements(),
44 mnTextDirection( nDirection )
48 TextLayout::~TextLayout()
52 void SAL_CALL TextLayout::disposing()
58 uno::Sequence< uno::Reference< rendering::XPolyPolygon2D > > SAL_CALL TextLayout::queryTextShapes( )
61 return uno::Sequence< uno::Reference< rendering::XPolyPolygon2D > >();
64 uno::Sequence< geometry::RealRectangle2D > SAL_CALL TextLayout::queryInkMeasures( )
67 return uno::Sequence< geometry::RealRectangle2D >();
70 uno::Sequence< geometry::RealRectangle2D > SAL_CALL TextLayout::queryMeasures( )
73 return uno::Sequence< geometry::RealRectangle2D >();
76 uno::Sequence< double > SAL_CALL TextLayout::queryLogicalAdvancements( )
78 ::osl::MutexGuard aGuard(
m_aMutex );
80 return maLogicalAdvancements;
83 void SAL_CALL TextLayout::applyLogicalAdvancements(
const uno::Sequence< double >& aAdvancements )
85 ::osl::MutexGuard aGuard( m_aMutex );
87 if( aAdvancements.getLength() !=
maText.Length )
89 SAL_WARN(
"canvas.directx",
"TextLayout::applyLogicalAdvancements(): mismatching number of advancements" );
90 throw lang::IllegalArgumentException();
93 maLogicalAdvancements = aAdvancements;
96 uno::Sequence< sal_Bool > SAL_CALL TextLayout::queryKashidaPositions( )
98 ::osl::MutexGuard aGuard(
m_aMutex );
100 return maKashidaPositions;
103 void SAL_CALL TextLayout::applyKashidaPositions(
const uno::Sequence< sal_Bool >& aPositions )
105 ::osl::MutexGuard aGuard( m_aMutex );
107 if( aPositions.hasElements() && aPositions.getLength() !=
maText.Length )
109 SAL_WARN(
"canvas.directx",
"TextLayout::applyKashidaPositions(): mismatching number of positions" );
110 throw lang::IllegalArgumentException(
"mismatching number of positions", getXWeak(), 1);
113 maKashidaPositions = aPositions;
116 geometry::RealRectangle2D SAL_CALL TextLayout::queryTextBounds( )
118 ::osl::MutexGuard aGuard(
m_aMutex );
120 uno::Reference< rendering::XGraphicDevice > xGraphicDevice;
124 const geometry::RealRectangle2D aBounds(
127 maLogicalAdvancements,
129 mpFont->getFontMatrix()));
134 double SAL_CALL TextLayout::justify(
double )
140 double SAL_CALL TextLayout::combinedJustify(
const uno::Sequence< uno::Reference< rendering::XTextLayout > >& ,
147 rendering::TextHit SAL_CALL TextLayout::getTextHit(
const geometry::RealPoint2D& )
150 return rendering::TextHit();
153 rendering::Caret SAL_CALL TextLayout::getCaret( sal_Int32 ,
157 return rendering::Caret();
160 sal_Int32 SAL_CALL TextLayout::getNextInsertionIndex( sal_Int32 ,
168 uno::Reference< rendering::XPolyPolygon2D > SAL_CALL TextLayout::queryVisualHighlighting( sal_Int32 ,
172 return uno::Reference< rendering::XPolyPolygon2D >();
175 uno::Reference< rendering::XPolyPolygon2D > SAL_CALL TextLayout::queryLogicalHighlighting( sal_Int32 ,
179 return uno::Reference< rendering::XPolyPolygon2D >();
182 double SAL_CALL TextLayout::getBaselineOffset( )
188 sal_Int8 SAL_CALL TextLayout::getMainTextDirection( )
190 ::osl::MutexGuard aGuard(
m_aMutex );
192 return mnTextDirection;
195 uno::Reference< rendering::XCanvasFont > SAL_CALL TextLayout::getFont( )
197 ::osl::MutexGuard aGuard(
m_aMutex );
202 rendering::StringContext SAL_CALL TextLayout::getText( )
204 ::osl::MutexGuard aGuard(
m_aMutex );
210 const rendering::ViewState& rViewState,
211 const rendering::RenderState& rRenderState,
212 const ::basegfx::B2ISize& rOutputOffset,
213 const uno::Reference< rendering::XGraphicDevice >& xGraphicDevice,
214 bool bAlphaSurface )
const
216 ::osl::MutexGuard aGuard( m_aMutex );
221 aDrawHelper.drawText(
227 maLogicalAdvancements,
232 mnTextDirection != 0);
237 OUString SAL_CALL TextLayout::getImplementationName()
239 return "DXCanvas::TextLayout";
242 sal_Bool SAL_CALL TextLayout::supportsService(
const OUString& ServiceName )
247 uno::Sequence< OUString > SAL_CALL TextLayout::getSupportedServiceNames()
249 return {
"com.sun.star.rendering.TextLayout" };
rtl::Reference< CanvasFont > ImplRef
css::geometry::RealRectangle2D queryTextBounds(const css::rendering::StringContext &rText, const css::uno::Sequence< double > &rLogicalAdvancements, const css::uno::Reference< css::rendering::XCanvasFont > &rCanvasFont, const css::geometry::Matrix2D &rFontMatrix)
TextLayout(const css::rendering::StringContext &aText, sal_Int8 nDirection, sal_Int64 nRandomSeed, const CanvasFont::ImplRef &rFont)
#define SAL_WARN(area, stream)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
::cppu::WeakComponentImplHelper< css::rendering::XTextLayout, css::lang::XServiceInfo > TextLayout_Base
std::shared_ptr< Gdiplus::Graphics > GraphicsSharedPtr
std::optional< vcl::Font > mpFont