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/.
12 #include <com/sun/star/uno/Sequence.hxx>
13 #include <com/sun/star/uno/Reference.hxx>
14 #include <com/sun/star/rendering/RenderState.hpp>
15 #include <basegfx/vector/b2dsize.hxx>
16 #include <cppcanvas/canvas.hxx>
18 namespace com::sun::star::rendering
36 const CanvasSharedPtr mpCanvas
;
37 css::uno::Reference
<css::rendering::XPolyPolygon2D
> mxOverline
;
38 css::uno::Reference
<css::rendering::XPolyPolygon2D
> mxUnderline
;
39 css::uno::Reference
<css::rendering::XPolyPolygon2D
> mxStrikeout
;
41 ::basegfx::B2DSize maOverallSize
;
43 bool mbIsOverlineColorSet
;
44 const css::uno::Sequence
<double> maOverlineColor
;
46 bool mbIsUnderlineColorSet
;
47 const css::uno::Sequence
<double> maUnderlineColor
;
49 bool mbOverlineWaveline
;
50 bool mbUnderlineWaveline
;
52 bool mbOverlineWavelineBold
;
53 bool mbUnderlineWavelineBold
;
56 TextLinesHelper(CanvasSharedPtr xCanvas
, const OutDevState
& rState
);
58 ::basegfx::B2DSize
const& getOverallSize() const { return maOverallSize
; }
60 /** Init textlines with specified linewidth and TextLineInfo.
62 void init(double nLineWidth
, const tools::TextLineInfo
& rLineInfo
);
64 /** Fill the textlines with colors.
65 OutDevState::textUnderlineColor.
68 Used to invoke XCanvas::fillPolyPolygon.
71 Use overline color and underline color if the value is true, ignore those
72 colors otherwise ( typical case is to render the shadow ).
74 void render(const css::rendering::RenderState
& rRenderState
, bool bNormalText
) const;
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */