1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _CPPCANVAS_OUTDEVSTATE_HXX 29 #define _CPPCANVAS_OUTDEVSTATE_HXX 30 31 #include <com/sun/star/uno/Reference.hxx> 32 #include <com/sun/star/uno/Sequence.hxx> 33 34 #ifndef _COM_SUN_STAR_RENDERING_STRINGCONTEXT_HPP__ 35 #include <com/sun/star/rendering/StringContext.hpp> 36 #endif 37 #ifndef _COM_SUN_STAR_RENDERING_RENDERSTATE_HPP__ 38 #include <com/sun/star/rendering/RenderState.hpp> 39 #endif 40 #ifndef _COM_SUN_STAR_RENDERING_XPOLYPOLYGON2D_HPP__ 41 #include <com/sun/star/rendering/XPolyPolygon2D.hpp> 42 #endif 43 #ifndef _COM_SUN_STAR_RENDERING_XCANVASFONT_HPP__ 44 #include <com/sun/star/rendering/XCanvasFont.hpp> 45 #endif 46 #ifndef _COM_SUN_STAR_RENDERING_TEXTDIRECTION_HPP__ 47 #include <com/sun/star/rendering/TextDirection.hpp> 48 #endif 49 #include <basegfx/matrix/b2dhommatrix.hxx> 50 #ifndef _BGFX_POLYGON_B2DPOLYPOLGON_HXX 51 #include <basegfx/polygon/b2dpolypolygon.hxx> 52 #endif 53 #include <vcl/fntstyle.hxx> 54 #include <vcl/vclenum.hxx> 55 #include <vcl/outdev.hxx> 56 #include <vcl/outdev.hxx> 57 58 59 namespace cppcanvas 60 { 61 namespace internal 62 { 63 struct OutDevState 64 { 65 OutDevState() : 66 clip(), 67 clipRect(), 68 xClipPoly(), 69 70 lineColor(), 71 fillColor(), 72 textColor(), 73 textFillColor(), 74 textLineColor(), 75 76 xFont(), 77 transform(), 78 mapModeTransform(), 79 fontRotation(0.0), 80 81 textEmphasisMarkStyle(EMPHASISMARK_NONE), 82 pushFlags(PUSH_ALL), 83 textDirection(::com::sun::star::rendering::TextDirection::WEAK_LEFT_TO_RIGHT), 84 textAlignment(0), // TODO(Q2): Synchronize with implrenderer 85 // and possibly new rendering::TextAlignment 86 textReliefStyle(RELIEF_NONE), 87 textOverlineStyle(UNDERLINE_NONE), 88 textUnderlineStyle(UNDERLINE_NONE), 89 textStrikeoutStyle(STRIKEOUT_NONE), 90 textReferencePoint(ALIGN_BASELINE), 91 92 isTextOutlineModeSet( false ), 93 isTextEffectShadowSet( false ), 94 isTextWordUnderlineSet( false ), 95 96 isLineColorSet( false ), 97 isFillColorSet( false ), 98 isTextFillColorSet( false ), 99 isTextLineColorSet( false ) 100 { 101 } 102 103 ::basegfx::B2DPolyPolygon clip; 104 ::Rectangle clipRect; 105 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > xClipPoly; 106 107 ::com::sun::star::uno::Sequence< double > lineColor; 108 ::com::sun::star::uno::Sequence< double > fillColor; 109 ::com::sun::star::uno::Sequence< double > textColor; 110 ::com::sun::star::uno::Sequence< double > textFillColor; 111 ::com::sun::star::uno::Sequence< double > textLineColor; 112 113 /** Current font. 114 115 @attention Beware, this member can be NULL, and 116 nevertheless text output is generated. 117 */ 118 ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > xFont; 119 ::basegfx::B2DHomMatrix transform; 120 ::basegfx::B2DHomMatrix mapModeTransform; 121 double fontRotation; 122 123 sal_uInt16 textEmphasisMarkStyle; 124 sal_uInt16 pushFlags; 125 sal_Int8 textDirection; 126 sal_Int8 textAlignment; 127 sal_Int8 textReliefStyle; 128 sal_Int8 textOverlineStyle; 129 sal_Int8 textUnderlineStyle; 130 sal_Int8 textStrikeoutStyle; 131 TextAlign textReferencePoint; 132 133 bool isTextOutlineModeSet; 134 bool isTextEffectShadowSet; 135 bool isTextWordUnderlineSet; 136 137 bool isLineColorSet; 138 bool isFillColorSet; 139 bool isTextFillColorSet; 140 bool isTextLineColorSet; 141 }; 142 } 143 } 144 145 #endif /* _CPPCANVAS_OUTDEVSTATE_HXX */ 146