Bump version to 24.04.3.4
[LibreOffice.git] / cppcanvas / source / inc / outdevstate.hxx
blob275b7b4314de3a13a26368d6af726c6862ebfc51
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <com/sun/star/uno/Reference.hxx>
23 #include <com/sun/star/uno/Sequence.hxx>
25 #include <com/sun/star/rendering/XPolyPolygon2D.hpp>
26 #include <com/sun/star/rendering/XCanvasFont.hpp>
27 #include <com/sun/star/rendering/TextDirection.hpp>
28 #include <basegfx/matrix/b2dhommatrix.hxx>
29 #include <basegfx/polygon/b2dpolypolygon.hxx>
30 #include <tools/fontenum.hxx>
31 #include <tools/gen.hxx>
32 #include <vcl/fntstyle.hxx>
33 #include <vcl/rendercontext/State.hxx>
35 namespace cppcanvas::internal
37 struct OutDevState
39 OutDevState() :
40 clip(),
41 clipRect(),
42 xClipPoly(),
44 lineColor(),
45 fillColor(),
46 textColor(),
47 textFillColor(),
48 textOverlineColor(),
49 textLineColor(),
51 xFont(),
52 transform(),
53 mapModeTransform(),
54 fontRotation(0.0),
56 textEmphasisMark(FontEmphasisMark::NONE),
57 pushFlags(vcl::PushFlags::ALL),
58 textDirection(css::rendering::TextDirection::WEAK_LEFT_TO_RIGHT),
59 textAlignment(0), // TODO(Q2): Synchronize with implrenderer
60 // and possibly new rendering::TextAlignment
61 textReliefStyle(FontRelief::NONE),
62 textOverlineStyle(LINESTYLE_NONE),
63 textUnderlineStyle(LINESTYLE_NONE),
64 textStrikeoutStyle(STRIKEOUT_NONE),
65 textReferencePoint(ALIGN_BASELINE),
67 isTextOutlineModeSet( false ),
68 isTextEffectShadowSet( false ),
69 isTextWordUnderlineSet( false ),
71 isLineColorSet( false ),
72 isFillColorSet( false ),
73 isTextFillColorSet( false ),
74 isTextOverlineColorSet( false ),
75 isTextLineColorSet( false )
79 ::basegfx::B2DPolyPolygon clip;
80 ::tools::Rectangle clipRect;
81 css::uno::Reference< css::rendering::XPolyPolygon2D > xClipPoly;
83 css::uno::Sequence< double > lineColor;
84 css::uno::Sequence< double > fillColor;
85 css::uno::Sequence< double > textColor;
86 css::uno::Sequence< double > textFillColor;
87 css::uno::Sequence< double > textOverlineColor;
88 css::uno::Sequence< double > textLineColor;
90 /** Current font.
92 @attention Beware, this member can be NULL, and
93 nevertheless text output is generated.
95 css::uno::Reference< css::rendering::XCanvasFont > xFont;
96 ::basegfx::B2DHomMatrix transform;
97 ::basegfx::B2DHomMatrix mapModeTransform;
98 double fontRotation;
100 FontEmphasisMark textEmphasisMark;
101 vcl::PushFlags pushFlags;
102 sal_Int8 textDirection;
103 sal_Int8 textAlignment;
104 FontRelief textReliefStyle;
105 sal_Int8 textOverlineStyle;
106 sal_Int8 textUnderlineStyle;
107 sal_Int8 textStrikeoutStyle;
108 TextAlign textReferencePoint;
110 bool isTextOutlineModeSet;
111 bool isTextEffectShadowSet;
112 bool isTextWordUnderlineSet;
114 bool isLineColorSet;
115 bool isFillColorSet;
116 bool isTextFillColorSet;
117 bool isTextOverlineColorSet;
118 bool isTextLineColorSet;
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */