bump product version to 6.3.0.0.beta1
[LibreOffice.git] / cppcanvas / source / mtfrenderer / textlineshelper.hxx
blobca13d9482ad2d9a4960ed0bff1f2d08b32c95a5c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
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/.
8 */
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>
17 namespace com
19 namespace sun
21 namespace star
23 namespace rendering
25 class XPolyPolygon2D;
31 namespace cppcanvas
33 namespace tools
35 struct TextLineInfo;
38 namespace internal
40 struct OutDevState;
42 class TextLinesHelper
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;
63 public:
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.
75 @param rRenderState
76 Used to invoke XCanvas::fillPolyPolygon.
78 @param bNormalText
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: */