LibreOffice Module cppcanvas (master) 1
textlineshelper.hxx
Go to the documentation of this file.
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.
4 *
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
10#pragma once
11
12#include <com/sun/star/uno/Sequence.hxx>
13#include <com/sun/star/uno/Reference.hxx>
14#include <com/sun/star/rendering/RenderState.hpp>
16#include <cppcanvas/canvas.hxx>
17
19{
20class XPolyPolygon2D;
21}
22
23namespace cppcanvas
24{
25namespace tools
26{
27struct TextLineInfo;
28}
29
30namespace internal
31{
32struct OutDevState;
33
35{
37 css::uno::Reference<css::rendering::XPolyPolygon2D> mxOverline;
38 css::uno::Reference<css::rendering::XPolyPolygon2D> mxUnderline;
39 css::uno::Reference<css::rendering::XPolyPolygon2D> mxStrikeout;
40
42
44 const css::uno::Sequence<double> maOverlineColor;
45
47 const css::uno::Sequence<double> maUnderlineColor;
48
51
54
55public:
56 TextLinesHelper(CanvasSharedPtr xCanvas, const OutDevState& rState);
57
59
62 void init(double nLineWidth, const tools::TextLineInfo& rLineInfo);
63
74 void render(const css::rendering::RenderState& rRenderState, bool bNormalText) const;
75};
76}
77}
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
TextLinesHelper(CanvasSharedPtr xCanvas, const OutDevState &rState)
const css::uno::Sequence< double > maOverlineColor
css::uno::Reference< css::rendering::XPolyPolygon2D > mxStrikeout
::basegfx::B2DSize const & getOverallSize() const
css::uno::Reference< css::rendering::XPolyPolygon2D > mxOverline
void init(double nLineWidth, const tools::TextLineInfo &rLineInfo)
Init textlines with specified linewidth and TextLineInfo.
void render(const css::rendering::RenderState &rRenderState, bool bNormalText) const
Fill the textlines with colors.
css::uno::Reference< css::rendering::XPolyPolygon2D > mxUnderline
const css::uno::Sequence< double > maUnderlineColor
std::shared_ptr< Canvas > CanvasSharedPtr