1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 #ifndef INCLUDED_CPPCANVAS_SOURCE_MTFRENDERER_TEXTLINESHELPER_HXX
10 #define INCLUDED_CPPCANVAS_SOURCE_MTFRENDERER_TEXTLINESHELPER_HXX
12 #include <com/sun/star/uno/Sequence.hxx>
13 #include <com/sun/star/uno/Reference.hxx>
14 #include <basegfx/vector/b2dsize.hxx>
15 #include <canvasgraphichelper.hxx>
44 const CanvasSharedPtr mpCanvas
;
45 css::uno::Reference
<css::rendering::XPolyPolygon2D
> mxOverline
;
46 css::uno::Reference
<css::rendering::XPolyPolygon2D
> mxUnderline
;
47 css::uno::Reference
<css::rendering::XPolyPolygon2D
> mxStrikeout
;
49 ::basegfx::B2DSize maOverallSize
;
51 bool mbIsOverlineColorSet
;
52 const css::uno::Sequence
<double> maOverlineColor
;
54 bool mbIsUnderlineColorSet
;
55 const css::uno::Sequence
<double> maUnderlineColor
;
57 bool mbOverlineWaveline
;
58 bool mbUnderlineWaveline
;
60 bool mbOverlineWavelineBold
;
61 bool mbUnderlineWavelineBold
;
64 TextLinesHelper(const CanvasSharedPtr
& rCanvas
, const OutDevState
& rState
);
66 ::basegfx::B2DSize
getOverallSize() const { return maOverallSize
; }
68 /** Init textlines with specified linewidth and TextLineInfo.
70 void init(double nLineWidth
, const tools::TextLineInfo
& rLineInfo
);
72 /** Fill the textlines with colors.
73 OutDevState::textUnderlineColor.
76 Used to invoke XCanvas::fillPolyPolygon.
79 Use overline color and underline color if the value is true, ignore those
80 colors otherwise ( typical case is to render the shadow ).
82 void render(const css::rendering::RenderState
& rRenderState
, bool bNormalText
) const;
86 #endif // INCLUDED_CPPCANVAS_SOURCE_MTFRENDERER_TEXTLINESHELPER_HXX
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */