tdf#37636 Render textlines with colors.
Create a new helepr class, TextLinesHelper, to handle textline colors and overall size. Change-Id: I8635199819443429f7be1754a298e9a21ef17f8c Reviewed-on: https://gerrit.libreoffice.org/62832 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
This commit is contained in:
@@ -65,6 +65,7 @@ $(eval $(call gb_Library_add_exception_objects,cppcanvas,\
|
|||||||
cppcanvas/source/mtfrenderer/polypolyaction \
|
cppcanvas/source/mtfrenderer/polypolyaction \
|
||||||
cppcanvas/source/mtfrenderer/emfpstringformat \
|
cppcanvas/source/mtfrenderer/emfpstringformat \
|
||||||
cppcanvas/source/mtfrenderer/textaction \
|
cppcanvas/source/mtfrenderer/textaction \
|
||||||
|
cppcanvas/source/mtfrenderer/textlineshelper \
|
||||||
cppcanvas/source/mtfrenderer/transparencygroupaction \
|
cppcanvas/source/mtfrenderer/transparencygroupaction \
|
||||||
cppcanvas/source/tools/canvasgraphichelper \
|
cppcanvas/source/tools/canvasgraphichelper \
|
||||||
cppcanvas/source/tools/tools \
|
cppcanvas/source/tools/tools \
|
||||||
|
@@ -43,6 +43,7 @@
|
|||||||
#include <sal/log.hxx>
|
#include <sal/log.hxx>
|
||||||
|
|
||||||
#include "textaction.hxx"
|
#include "textaction.hxx"
|
||||||
|
#include "textlineshelper.hxx"
|
||||||
#include <outdevstate.hxx>
|
#include <outdevstate.hxx>
|
||||||
#include "mtftools.hxx"
|
#include "mtftools.hxx"
|
||||||
|
|
||||||
@@ -1261,8 +1262,7 @@ namespace cppcanvas
|
|||||||
const CanvasSharedPtr mpCanvas;
|
const CanvasSharedPtr mpCanvas;
|
||||||
rendering::RenderState maState;
|
rendering::RenderState maState;
|
||||||
const tools::TextLineInfo maTextLineInfo;
|
const tools::TextLineInfo maTextLineInfo;
|
||||||
::basegfx::B2DSize maLinesOverallSize;
|
TextLinesHelper maTextLinesHelper;
|
||||||
uno::Reference< rendering::XPolyPolygon2D > mxTextLines;
|
|
||||||
const ::basegfx::B2DSize maReliefOffset;
|
const ::basegfx::B2DSize maReliefOffset;
|
||||||
const ::Color maReliefColor;
|
const ::Color maReliefColor;
|
||||||
const ::basegfx::B2DSize maShadowOffset;
|
const ::basegfx::B2DSize maShadowOffset;
|
||||||
@@ -1288,8 +1288,7 @@ namespace cppcanvas
|
|||||||
mpCanvas( rCanvas ),
|
mpCanvas( rCanvas ),
|
||||||
maState(),
|
maState(),
|
||||||
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
|
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
|
||||||
maLinesOverallSize(),
|
maTextLinesHelper(mpCanvas, rState),
|
||||||
mxTextLines(),
|
|
||||||
maReliefOffset( rReliefOffset ),
|
maReliefOffset( rReliefOffset ),
|
||||||
maReliefColor( rReliefColor ),
|
maReliefColor( rReliefColor ),
|
||||||
maShadowOffset( rShadowOffset ),
|
maShadowOffset( rShadowOffset ),
|
||||||
@@ -1298,11 +1297,7 @@ namespace cppcanvas
|
|||||||
{
|
{
|
||||||
initLayoutWidth(mnLayoutWidth, rOffsets);
|
initLayoutWidth(mnLayoutWidth, rOffsets);
|
||||||
|
|
||||||
initEffectLinePolyPolygon( maLinesOverallSize,
|
maTextLinesHelper.init(mnLayoutWidth, maTextLineInfo);
|
||||||
mxTextLines,
|
|
||||||
rCanvas,
|
|
||||||
mnLayoutWidth,
|
|
||||||
maTextLineInfo );
|
|
||||||
|
|
||||||
initArrayAction( maState,
|
initArrayAction( maState,
|
||||||
mxTextLayout,
|
mxTextLayout,
|
||||||
@@ -1333,8 +1328,7 @@ namespace cppcanvas
|
|||||||
mpCanvas( rCanvas ),
|
mpCanvas( rCanvas ),
|
||||||
maState(),
|
maState(),
|
||||||
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
|
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
|
||||||
maLinesOverallSize(),
|
maTextLinesHelper(mpCanvas, rState),
|
||||||
mxTextLines(),
|
|
||||||
maReliefOffset( rReliefOffset ),
|
maReliefOffset( rReliefOffset ),
|
||||||
maReliefColor( rReliefColor ),
|
maReliefColor( rReliefColor ),
|
||||||
maShadowOffset( rShadowOffset ),
|
maShadowOffset( rShadowOffset ),
|
||||||
@@ -1343,11 +1337,7 @@ namespace cppcanvas
|
|||||||
{
|
{
|
||||||
initLayoutWidth(mnLayoutWidth, rOffsets);
|
initLayoutWidth(mnLayoutWidth, rOffsets);
|
||||||
|
|
||||||
initEffectLinePolyPolygon( maLinesOverallSize,
|
maTextLinesHelper.init(mnLayoutWidth, maTextLineInfo);
|
||||||
mxTextLines,
|
|
||||||
rCanvas,
|
|
||||||
mnLayoutWidth,
|
|
||||||
maTextLineInfo );
|
|
||||||
|
|
||||||
initArrayAction( maState,
|
initArrayAction( maState,
|
||||||
mxTextLayout,
|
mxTextLayout,
|
||||||
@@ -1369,14 +1359,12 @@ namespace cppcanvas
|
|||||||
return ::basegfx::unotools::xPolyPolygonFromB2DPolygon(rCanvas->getDevice(), aTextBoundsPoly);
|
return ::basegfx::unotools::xPolyPolygonFromB2DPolygon(rCanvas->getDevice(), aTextBoundsPoly);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EffectTextArrayAction::operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor, bool /*bNormalText*/ ) const
|
bool EffectTextArrayAction::operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor, bool bNormalText) const
|
||||||
{
|
{
|
||||||
const rendering::ViewState& rViewState( mpCanvas->getViewState() );
|
const rendering::ViewState& rViewState( mpCanvas->getViewState() );
|
||||||
const uno::Reference< rendering::XCanvas >& rCanvas( mpCanvas->getUNOCanvas() );
|
const uno::Reference< rendering::XCanvas >& rCanvas( mpCanvas->getUNOCanvas() );
|
||||||
|
|
||||||
rCanvas->fillPolyPolygon( mxTextLines,
|
maTextLinesHelper.render(rRenderState, bNormalText);
|
||||||
rViewState,
|
|
||||||
rRenderState );
|
|
||||||
|
|
||||||
//rhbz#1589029 non-transparent text fill background support
|
//rhbz#1589029 non-transparent text fill background support
|
||||||
if (rTextFillColor != COL_AUTO)
|
if (rTextFillColor != COL_AUTO)
|
||||||
@@ -1419,21 +1407,19 @@ namespace cppcanvas
|
|||||||
public:
|
public:
|
||||||
EffectTextArrayRenderHelper( const uno::Reference< rendering::XCanvas >& rCanvas,
|
EffectTextArrayRenderHelper( const uno::Reference< rendering::XCanvas >& rCanvas,
|
||||||
const uno::Reference< rendering::XTextLayout >& rTextLayout,
|
const uno::Reference< rendering::XTextLayout >& rTextLayout,
|
||||||
const uno::Reference< rendering::XPolyPolygon2D >& rLinePolygon,
|
const TextLinesHelper& rTextLinesHelper,
|
||||||
const rendering::ViewState& rViewState ) :
|
const rendering::ViewState& rViewState ) :
|
||||||
mrCanvas( rCanvas ),
|
mrCanvas( rCanvas ),
|
||||||
mrTextLayout( rTextLayout ),
|
mrTextLayout( rTextLayout ),
|
||||||
mrLinePolygon( rLinePolygon ),
|
mrTextLinesHelper( rTextLinesHelper ),
|
||||||
mrViewState( rViewState )
|
mrViewState( rViewState )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// TextRenderer interface
|
// TextRenderer interface
|
||||||
virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor,bool /*bNormalText*/ ) const override
|
virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor,bool bNormalText) const override
|
||||||
{
|
{
|
||||||
mrCanvas->fillPolyPolygon( mrLinePolygon,
|
mrTextLinesHelper.render(rRenderState, bNormalText);
|
||||||
mrViewState,
|
|
||||||
rRenderState );
|
|
||||||
|
|
||||||
//rhbz#1589029 non-transparent text fill background support
|
//rhbz#1589029 non-transparent text fill background support
|
||||||
if (rTextFillColor != COL_AUTO)
|
if (rTextFillColor != COL_AUTO)
|
||||||
@@ -1465,7 +1451,7 @@ namespace cppcanvas
|
|||||||
|
|
||||||
const uno::Reference< rendering::XCanvas >& mrCanvas;
|
const uno::Reference< rendering::XCanvas >& mrCanvas;
|
||||||
const uno::Reference< rendering::XTextLayout >& mrTextLayout;
|
const uno::Reference< rendering::XTextLayout >& mrTextLayout;
|
||||||
const uno::Reference< rendering::XPolyPolygon2D >& mrLinePolygon;
|
const TextLinesHelper& mrTextLinesHelper;
|
||||||
const rendering::ViewState& mrViewState;
|
const rendering::ViewState& mrViewState;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1500,12 +1486,8 @@ namespace cppcanvas
|
|||||||
uno::Reference< rendering::XCanvas > xCanvas( mpCanvas->getUNOCanvas() );
|
uno::Reference< rendering::XCanvas > xCanvas( mpCanvas->getUNOCanvas() );
|
||||||
const rendering::ViewState& rViewState( mpCanvas->getViewState() );
|
const rendering::ViewState& rViewState( mpCanvas->getViewState() );
|
||||||
|
|
||||||
uno::Reference< rendering::XPolyPolygon2D > xTextLines(
|
TextLinesHelper aHelper = maTextLinesHelper;
|
||||||
::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(
|
aHelper.init(nMaxPos - nMinPos, maTextLineInfo);
|
||||||
xCanvas->getDevice(),
|
|
||||||
tools::createTextLinesPolyPolygon(
|
|
||||||
0.0, nMaxPos - nMinPos,
|
|
||||||
maTextLineInfo ) ) );
|
|
||||||
|
|
||||||
|
|
||||||
// render everything
|
// render everything
|
||||||
@@ -1514,7 +1496,7 @@ namespace cppcanvas
|
|||||||
return renderEffectText(
|
return renderEffectText(
|
||||||
EffectTextArrayRenderHelper( xCanvas,
|
EffectTextArrayRenderHelper( xCanvas,
|
||||||
xTextLayout,
|
xTextLayout,
|
||||||
xTextLines,
|
aHelper,
|
||||||
rViewState ),
|
rViewState ),
|
||||||
aLocalState,
|
aLocalState,
|
||||||
xCanvas,
|
xCanvas,
|
||||||
@@ -1530,11 +1512,13 @@ namespace cppcanvas
|
|||||||
rendering::RenderState aLocalState( maState );
|
rendering::RenderState aLocalState( maState );
|
||||||
::canvas::tools::prependToRenderState(aLocalState, rTransformation);
|
::canvas::tools::prependToRenderState(aLocalState, rTransformation);
|
||||||
|
|
||||||
|
::basegfx::B2DSize aSize = maTextLinesHelper.getOverallSize();
|
||||||
|
|
||||||
return calcEffectTextBounds( ::basegfx::unotools::b2DRectangleFromRealRectangle2D(
|
return calcEffectTextBounds( ::basegfx::unotools::b2DRectangleFromRealRectangle2D(
|
||||||
mxTextLayout->queryTextBounds() ),
|
mxTextLayout->queryTextBounds() ),
|
||||||
::basegfx::B2DRange( 0,0,
|
::basegfx::B2DRange( 0,0,
|
||||||
maLinesOverallSize.getX(),
|
aSize.getX(),
|
||||||
maLinesOverallSize.getY() ),
|
aSize.getY() ),
|
||||||
maReliefOffset,
|
maReliefOffset,
|
||||||
maShadowOffset,
|
maShadowOffset,
|
||||||
aLocalState,
|
aLocalState,
|
||||||
|
127
cppcanvas/source/mtfrenderer/textlineshelper.cxx
Normal file
127
cppcanvas/source/mtfrenderer/textlineshelper.cxx
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
||||||
|
/*
|
||||||
|
* This file is part of the LibreOffice project.
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <com/sun/star/rendering/XCanvas.hpp>
|
||||||
|
#include <com/sun/star/rendering/StrokeAttributes.hpp>
|
||||||
|
#include <com/sun/star/rendering/PathJoinType.hpp>
|
||||||
|
#include <basegfx/polygon/b2dpolypolygontools.hxx>
|
||||||
|
#include <basegfx/utils/canvastools.hxx>
|
||||||
|
#include <outdevstate.hxx>
|
||||||
|
#include "textlineshelper.hxx"
|
||||||
|
#include "mtftools.hxx"
|
||||||
|
|
||||||
|
using namespace ::com::sun::star;
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
void initLineStyleWaveline(sal_uInt32 nLineStyle, bool& bIsWaveline, bool& bIsBold)
|
||||||
|
{
|
||||||
|
bIsWaveline = nLineStyle == LINESTYLE_DOUBLEWAVE || nLineStyle == LINESTYLE_SMALLWAVE
|
||||||
|
|| nLineStyle == LINESTYLE_BOLDWAVE || nLineStyle == LINESTYLE_WAVE;
|
||||||
|
bIsBold = nLineStyle == LINESTYLE_BOLDWAVE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace cppcanvas
|
||||||
|
{
|
||||||
|
namespace internal
|
||||||
|
{
|
||||||
|
TextLinesHelper::TextLinesHelper(const CanvasSharedPtr& rCanvas, const OutDevState& rState)
|
||||||
|
: mpCanvas(rCanvas)
|
||||||
|
, mbIsOverlineColorSet(rState.isTextOverlineColorSet)
|
||||||
|
, maOverlineColor(rState.textOverlineColor)
|
||||||
|
, mbIsUnderlineColorSet(rState.isTextLineColorSet)
|
||||||
|
, maUnderlineColor(rState.textLineColor)
|
||||||
|
, mbOverlineWaveline(false)
|
||||||
|
, mbUnderlineWaveline(false)
|
||||||
|
, mbOverlineWavelineBold(false)
|
||||||
|
, mbUnderlineWavelineBold(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextLinesHelper::init(double nLineWidth, const tools::TextLineInfo& rLineInfo)
|
||||||
|
{
|
||||||
|
::basegfx::B2DRange aRange; // default is empty.
|
||||||
|
::basegfx::B2DPolyPolygon aOverline, aUnderline, aStrikeout;
|
||||||
|
tools::createTextLinesPolyPolygon(0.0, nLineWidth, rLineInfo, aOverline, aUnderline,
|
||||||
|
aStrikeout);
|
||||||
|
|
||||||
|
mxOverline.clear();
|
||||||
|
mxUnderline.clear();
|
||||||
|
mxStrikeout.clear();
|
||||||
|
|
||||||
|
uno::Reference<rendering::XGraphicDevice> xDevice = mpCanvas->getUNOCanvas()->getDevice();
|
||||||
|
|
||||||
|
if (aOverline.count())
|
||||||
|
{
|
||||||
|
aRange.expand(::basegfx::utils::getRange(aOverline));
|
||||||
|
mxOverline = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(xDevice, aOverline);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aUnderline.count())
|
||||||
|
{
|
||||||
|
aRange.expand(::basegfx::utils::getRange(aUnderline));
|
||||||
|
mxUnderline = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(xDevice, aUnderline);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aStrikeout.count())
|
||||||
|
{
|
||||||
|
aRange.expand(::basegfx::utils::getRange(aStrikeout));
|
||||||
|
mxStrikeout = ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(xDevice, aStrikeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
maOverallSize = aRange.getRange();
|
||||||
|
|
||||||
|
initLineStyleWaveline(rLineInfo.mnOverlineStyle, mbOverlineWaveline, mbOverlineWavelineBold);
|
||||||
|
|
||||||
|
initLineStyleWaveline(rLineInfo.mnUnderlineStyle, mbUnderlineWaveline, mbUnderlineWavelineBold);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextLinesHelper::render(const rendering::RenderState& rRenderState, bool bNormalText) const
|
||||||
|
{
|
||||||
|
const rendering::ViewState& rViewState(mpCanvas->getViewState());
|
||||||
|
const uno::Reference<rendering::XCanvas>& xCanvas(mpCanvas->getUNOCanvas());
|
||||||
|
rendering::StrokeAttributes aStrokeAttributes;
|
||||||
|
aStrokeAttributes.JoinType = rendering::PathJoinType::ROUND;
|
||||||
|
|
||||||
|
if (mxOverline.is())
|
||||||
|
{
|
||||||
|
rendering::RenderState aLocalState(rRenderState);
|
||||||
|
if (bNormalText && mbIsOverlineColorSet)
|
||||||
|
aLocalState.DeviceColor = maOverlineColor;
|
||||||
|
|
||||||
|
if (mbOverlineWaveline)
|
||||||
|
{
|
||||||
|
aStrokeAttributes.StrokeWidth = mbOverlineWavelineBold ? 2.0 : 1.0;
|
||||||
|
xCanvas->strokePolyPolygon(mxOverline, rViewState, aLocalState, aStrokeAttributes);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
xCanvas->fillPolyPolygon(mxOverline, rViewState, aLocalState);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mxUnderline.is())
|
||||||
|
{
|
||||||
|
rendering::RenderState aLocalState(rRenderState);
|
||||||
|
if (bNormalText && mbIsUnderlineColorSet)
|
||||||
|
aLocalState.DeviceColor = maUnderlineColor;
|
||||||
|
if (mbUnderlineWaveline)
|
||||||
|
{
|
||||||
|
aStrokeAttributes.StrokeWidth = mbUnderlineWavelineBold ? 2.0 : 1.0;
|
||||||
|
xCanvas->strokePolyPolygon(mxUnderline, rViewState, aLocalState, aStrokeAttributes);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
xCanvas->fillPolyPolygon(mxUnderline, rViewState, aLocalState);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mxStrikeout.is())
|
||||||
|
xCanvas->fillPolyPolygon(mxStrikeout, rViewState, rRenderState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
87
cppcanvas/source/mtfrenderer/textlineshelper.hxx
Normal file
87
cppcanvas/source/mtfrenderer/textlineshelper.hxx
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
||||||
|
/*
|
||||||
|
* This file is part of the LibreOffice project.
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
#ifndef INCLUDED_CPPCANVAS_SOURCE_MTFRENDERER_TEXTLINESHELPER_HXX
|
||||||
|
#define INCLUDED_CPPCANVAS_SOURCE_MTFRENDERER_TEXTLINESHELPER_HXX
|
||||||
|
|
||||||
|
#include <com/sun/star/uno/Sequence.hxx>
|
||||||
|
#include <com/sun/star/uno/Reference.hxx>
|
||||||
|
#include <basegfx/vector/b2dsize.hxx>
|
||||||
|
#include <canvasgraphichelper.hxx>
|
||||||
|
|
||||||
|
namespace com
|
||||||
|
{
|
||||||
|
namespace sun
|
||||||
|
{
|
||||||
|
namespace star
|
||||||
|
{
|
||||||
|
namespace rendering
|
||||||
|
{
|
||||||
|
class XPolyPolygon2D;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace cppcanvas
|
||||||
|
{
|
||||||
|
namespace tools
|
||||||
|
{
|
||||||
|
struct TextLineInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace internal
|
||||||
|
{
|
||||||
|
struct OutDevState;
|
||||||
|
|
||||||
|
class TextLinesHelper
|
||||||
|
{
|
||||||
|
const CanvasSharedPtr mpCanvas;
|
||||||
|
css::uno::Reference<css::rendering::XPolyPolygon2D> mxOverline;
|
||||||
|
css::uno::Reference<css::rendering::XPolyPolygon2D> mxUnderline;
|
||||||
|
css::uno::Reference<css::rendering::XPolyPolygon2D> mxStrikeout;
|
||||||
|
|
||||||
|
::basegfx::B2DSize maOverallSize;
|
||||||
|
|
||||||
|
bool mbIsOverlineColorSet;
|
||||||
|
const css::uno::Sequence<double> maOverlineColor;
|
||||||
|
|
||||||
|
bool mbIsUnderlineColorSet;
|
||||||
|
const css::uno::Sequence<double> maUnderlineColor;
|
||||||
|
|
||||||
|
bool mbOverlineWaveline;
|
||||||
|
bool mbUnderlineWaveline;
|
||||||
|
|
||||||
|
bool mbOverlineWavelineBold;
|
||||||
|
bool mbUnderlineWavelineBold;
|
||||||
|
|
||||||
|
public:
|
||||||
|
TextLinesHelper(const CanvasSharedPtr& rCanvas, const OutDevState& rState);
|
||||||
|
|
||||||
|
::basegfx::B2DSize getOverallSize() const { return maOverallSize; }
|
||||||
|
|
||||||
|
/** Init textlines with specified linewdith and TextLineInfo.
|
||||||
|
*/
|
||||||
|
void init(double nLineWidth, const tools::TextLineInfo& rLineInfo);
|
||||||
|
|
||||||
|
/** Fill the textlines with colors.
|
||||||
|
OutDevState::textUnderlineColor.
|
||||||
|
|
||||||
|
@param rRenderState
|
||||||
|
Used to invoke XCanvas::fillPolyPolygon.
|
||||||
|
|
||||||
|
@param bNormalText
|
||||||
|
Use overline color and underline color if the value is true, ignore those
|
||||||
|
colors otherwise ( typical case is to render the shadow ).
|
||||||
|
*/
|
||||||
|
void render(const css::rendering::RenderState& rRenderState, bool bNormalText) const;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // INCLUDED_CPPCANVAS_SOURCE_MTFRENDERER_TEXTLINESHELPER_HXX
|
||||||
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
Reference in New Issue
Block a user