Branch libreoffice-5-0-4
[LibreOffice.git] / cppcanvas / source / inc / outdevstate.hxx
blob339688a5aca2cf72946bc67aaaec39e172b4fa0e
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 #ifndef INCLUDED_CPPCANVAS_SOURCE_INC_OUTDEVSTATE_HXX
21 #define INCLUDED_CPPCANVAS_SOURCE_INC_OUTDEVSTATE_HXX
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/uno/Sequence.hxx>
26 #include <com/sun/star/rendering/StringContext.hpp>
27 #include <com/sun/star/rendering/RenderState.hpp>
28 #include <com/sun/star/rendering/XPolyPolygon2D.hpp>
29 #include <com/sun/star/rendering/XCanvasFont.hpp>
30 #include <com/sun/star/rendering/TextDirection.hpp>
31 #include <basegfx/matrix/b2dhommatrix.hxx>
32 #include <basegfx/polygon/b2dpolypolygon.hxx>
33 #include <vcl/fntstyle.hxx>
34 #include <vcl/vclenum.hxx>
35 #include <vcl/outdev.hxx>
38 namespace cppcanvas
40 namespace internal
42 struct OutDevState
44 OutDevState() :
45 clip(),
46 clipRect(),
47 xClipPoly(),
49 lineColor(),
50 fillColor(),
51 textColor(),
52 textFillColor(),
53 textLineColor(),
55 xFont(),
56 transform(),
57 mapModeTransform(),
58 fontRotation(0.0),
60 textEmphasisMarkStyle(EMPHASISMARK_NONE),
61 pushFlags(PushFlags::ALL),
62 textDirection(::com::sun::star::rendering::TextDirection::WEAK_LEFT_TO_RIGHT),
63 textAlignment(0), // TODO(Q2): Synchronize with implrenderer
64 // and possibly new rendering::TextAlignment
65 textReliefStyle(RELIEF_NONE),
66 textOverlineStyle(UNDERLINE_NONE),
67 textUnderlineStyle(UNDERLINE_NONE),
68 textStrikeoutStyle(STRIKEOUT_NONE),
69 textReferencePoint(ALIGN_BASELINE),
71 isTextOutlineModeSet( false ),
72 isTextEffectShadowSet( false ),
73 isTextWordUnderlineSet( false ),
75 isLineColorSet( false ),
76 isFillColorSet( false ),
77 isTextFillColorSet( false ),
78 isTextLineColorSet( false )
82 ::basegfx::B2DPolyPolygon clip;
83 ::Rectangle clipRect;
84 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > xClipPoly;
86 ::com::sun::star::uno::Sequence< double > lineColor;
87 ::com::sun::star::uno::Sequence< double > fillColor;
88 ::com::sun::star::uno::Sequence< double > textColor;
89 ::com::sun::star::uno::Sequence< double > textFillColor;
90 ::com::sun::star::uno::Sequence< double > textLineColor;
92 /** Current font.
94 @attention Beware, this member can be NULL, and
95 nevertheless text output is generated.
97 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > xFont;
98 ::basegfx::B2DHomMatrix transform;
99 ::basegfx::B2DHomMatrix mapModeTransform;
100 double fontRotation;
102 sal_uInt16 textEmphasisMarkStyle;
103 PushFlags pushFlags;
104 sal_Int8 textDirection;
105 sal_Int8 textAlignment;
106 sal_Int8 textReliefStyle;
107 sal_Int8 textOverlineStyle;
108 sal_Int8 textUnderlineStyle;
109 sal_Int8 textStrikeoutStyle;
110 TextAlign textReferencePoint;
112 bool isTextOutlineModeSet;
113 bool isTextEffectShadowSet;
114 bool isTextWordUnderlineSet;
116 bool isLineColorSet;
117 bool isFillColorSet;
118 bool isTextFillColorSet;
119 bool isTextLineColorSet;
124 #endif // INCLUDED_CPPCANVAS_SOURCE_INC_OUTDEVSTATE_HXX
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */