/src/libreoffice/cppcanvas/source/inc/outdevstate.hxx
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
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 | | * This file incorporates work covered by the following license notice: |
10 | | * |
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 . |
18 | | */ |
19 | | |
20 | | #pragma once |
21 | | |
22 | | #include <com/sun/star/uno/Reference.hxx> |
23 | | #include <com/sun/star/uno/Sequence.hxx> |
24 | | |
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> |
34 | | |
35 | | namespace cppcanvas::internal |
36 | | { |
37 | | struct OutDevState |
38 | | { |
39 | | OutDevState() : |
40 | 0 | clip(), |
41 | 0 | clipRect(), |
42 | 0 | xClipPoly(), |
43 | | |
44 | 0 | lineColor(), |
45 | 0 | fillColor(), |
46 | 0 | textColor(), |
47 | 0 | textFillColor(), |
48 | 0 | textOverlineColor(), |
49 | 0 | textLineColor(), |
50 | | |
51 | 0 | xFont(), |
52 | 0 | transform(), |
53 | 0 | mapModeTransform(), |
54 | 0 | fontRotation(0.0), |
55 | | |
56 | 0 | textEmphasisMark(FontEmphasisMark::NONE), |
57 | 0 | pushFlags(vcl::PushFlags::ALL), |
58 | 0 | textDirection(css::rendering::TextDirection::WEAK_LEFT_TO_RIGHT), |
59 | 0 | textAlignment(0), // TODO(Q2): Synchronize with implrenderer |
60 | | // and possibly new rendering::TextAlignment |
61 | 0 | textReliefStyle(FontRelief::NONE), |
62 | 0 | textOverlineStyle(LINESTYLE_NONE), |
63 | 0 | textUnderlineStyle(LINESTYLE_NONE), |
64 | 0 | textStrikeoutStyle(STRIKEOUT_NONE), |
65 | 0 | textReferencePoint(ALIGN_BASELINE), |
66 | | |
67 | 0 | isTextOutlineModeSet( false ), |
68 | 0 | isTextEffectShadowSet( false ), |
69 | 0 | isTextWordUnderlineSet( false ), |
70 | | |
71 | 0 | isLineColorSet( false ), |
72 | 0 | isFillColorSet( false ), |
73 | 0 | isTextFillColorSet( false ), |
74 | 0 | isTextOverlineColorSet( false ), |
75 | 0 | isTextLineColorSet( false ) |
76 | 0 | { |
77 | 0 | } |
78 | | |
79 | | ::basegfx::B2DPolyPolygon clip; |
80 | | ::tools::Rectangle clipRect; |
81 | | css::uno::Reference< css::rendering::XPolyPolygon2D > xClipPoly; |
82 | | |
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; |
89 | | |
90 | | /** Current font. |
91 | | |
92 | | @attention Beware, this member can be NULL, and |
93 | | nevertheless text output is generated. |
94 | | */ |
95 | | css::uno::Reference< css::rendering::XCanvasFont > xFont; |
96 | | ::basegfx::B2DHomMatrix transform; |
97 | | ::basegfx::B2DHomMatrix mapModeTransform; |
98 | | double fontRotation; |
99 | | |
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; |
109 | | |
110 | | bool isTextOutlineModeSet; |
111 | | bool isTextEffectShadowSet; |
112 | | bool isTextWordUnderlineSet; |
113 | | |
114 | | bool isLineColorSet; |
115 | | bool isFillColorSet; |
116 | | bool isTextFillColorSet; |
117 | | bool isTextOverlineColorSet; |
118 | | bool isTextLineColorSet; |
119 | | }; |
120 | | |
121 | | } |
122 | | |
123 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |