1*2d788491SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*2d788491SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2d788491SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2d788491SAndrew Rist * distributed with this work for additional information 6*2d788491SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2d788491SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2d788491SAndrew Rist * "License"); you may not use this file except in compliance 9*2d788491SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*2d788491SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*2d788491SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2d788491SAndrew Rist * software distributed under the License is distributed on an 15*2d788491SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2d788491SAndrew Rist * KIND, either express or implied. See the License for the 17*2d788491SAndrew Rist * specific language governing permissions and limitations 18*2d788491SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*2d788491SAndrew Rist *************************************************************/ 21*2d788491SAndrew Rist 22*2d788491SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _CPPCANVAS_OUTDEVSTATE_HXX 25cdf0e10cSrcweir #define _CPPCANVAS_OUTDEVSTATE_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx> 28cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx> 29cdf0e10cSrcweir 30cdf0e10cSrcweir #ifndef _COM_SUN_STAR_RENDERING_STRINGCONTEXT_HPP__ 31cdf0e10cSrcweir #include <com/sun/star/rendering/StringContext.hpp> 32cdf0e10cSrcweir #endif 33cdf0e10cSrcweir #ifndef _COM_SUN_STAR_RENDERING_RENDERSTATE_HPP__ 34cdf0e10cSrcweir #include <com/sun/star/rendering/RenderState.hpp> 35cdf0e10cSrcweir #endif 36cdf0e10cSrcweir #ifndef _COM_SUN_STAR_RENDERING_XPOLYPOLYGON2D_HPP__ 37cdf0e10cSrcweir #include <com/sun/star/rendering/XPolyPolygon2D.hpp> 38cdf0e10cSrcweir #endif 39cdf0e10cSrcweir #ifndef _COM_SUN_STAR_RENDERING_XCANVASFONT_HPP__ 40cdf0e10cSrcweir #include <com/sun/star/rendering/XCanvasFont.hpp> 41cdf0e10cSrcweir #endif 42cdf0e10cSrcweir #ifndef _COM_SUN_STAR_RENDERING_TEXTDIRECTION_HPP__ 43cdf0e10cSrcweir #include <com/sun/star/rendering/TextDirection.hpp> 44cdf0e10cSrcweir #endif 45cdf0e10cSrcweir #include <basegfx/matrix/b2dhommatrix.hxx> 46cdf0e10cSrcweir #ifndef _BGFX_POLYGON_B2DPOLYPOLGON_HXX 47cdf0e10cSrcweir #include <basegfx/polygon/b2dpolypolygon.hxx> 48cdf0e10cSrcweir #endif 49cdf0e10cSrcweir #include <vcl/fntstyle.hxx> 50cdf0e10cSrcweir #include <vcl/vclenum.hxx> 51cdf0e10cSrcweir #include <vcl/outdev.hxx> 52cdf0e10cSrcweir #include <vcl/outdev.hxx> 53cdf0e10cSrcweir 54cdf0e10cSrcweir 55cdf0e10cSrcweir namespace cppcanvas 56cdf0e10cSrcweir { 57cdf0e10cSrcweir namespace internal 58cdf0e10cSrcweir { 59cdf0e10cSrcweir struct OutDevState 60cdf0e10cSrcweir { OutDevStatecppcanvas::internal::OutDevState61cdf0e10cSrcweir OutDevState() : 62cdf0e10cSrcweir clip(), 63cdf0e10cSrcweir clipRect(), 64cdf0e10cSrcweir xClipPoly(), 65cdf0e10cSrcweir 66cdf0e10cSrcweir lineColor(), 67cdf0e10cSrcweir fillColor(), 68cdf0e10cSrcweir textColor(), 69cdf0e10cSrcweir textFillColor(), 70cdf0e10cSrcweir textLineColor(), 71cdf0e10cSrcweir 72cdf0e10cSrcweir xFont(), 73cdf0e10cSrcweir transform(), 74cdf0e10cSrcweir mapModeTransform(), 75cdf0e10cSrcweir fontRotation(0.0), 76cdf0e10cSrcweir 77cdf0e10cSrcweir textEmphasisMarkStyle(EMPHASISMARK_NONE), 78cdf0e10cSrcweir pushFlags(PUSH_ALL), 79cdf0e10cSrcweir textDirection(::com::sun::star::rendering::TextDirection::WEAK_LEFT_TO_RIGHT), 80cdf0e10cSrcweir textAlignment(0), // TODO(Q2): Synchronize with implrenderer 81cdf0e10cSrcweir // and possibly new rendering::TextAlignment 82cdf0e10cSrcweir textReliefStyle(RELIEF_NONE), 83cdf0e10cSrcweir textOverlineStyle(UNDERLINE_NONE), 84cdf0e10cSrcweir textUnderlineStyle(UNDERLINE_NONE), 85cdf0e10cSrcweir textStrikeoutStyle(STRIKEOUT_NONE), 86cdf0e10cSrcweir textReferencePoint(ALIGN_BASELINE), 87cdf0e10cSrcweir 88cdf0e10cSrcweir isTextOutlineModeSet( false ), 89cdf0e10cSrcweir isTextEffectShadowSet( false ), 90cdf0e10cSrcweir isTextWordUnderlineSet( false ), 91cdf0e10cSrcweir 92cdf0e10cSrcweir isLineColorSet( false ), 93cdf0e10cSrcweir isFillColorSet( false ), 94cdf0e10cSrcweir isTextFillColorSet( false ), 95cdf0e10cSrcweir isTextLineColorSet( false ) 96cdf0e10cSrcweir { 97cdf0e10cSrcweir } 98cdf0e10cSrcweir 99cdf0e10cSrcweir ::basegfx::B2DPolyPolygon clip; 100cdf0e10cSrcweir ::Rectangle clipRect; 101cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > xClipPoly; 102cdf0e10cSrcweir 103cdf0e10cSrcweir ::com::sun::star::uno::Sequence< double > lineColor; 104cdf0e10cSrcweir ::com::sun::star::uno::Sequence< double > fillColor; 105cdf0e10cSrcweir ::com::sun::star::uno::Sequence< double > textColor; 106cdf0e10cSrcweir ::com::sun::star::uno::Sequence< double > textFillColor; 107cdf0e10cSrcweir ::com::sun::star::uno::Sequence< double > textLineColor; 108cdf0e10cSrcweir 109cdf0e10cSrcweir /** Current font. 110cdf0e10cSrcweir 111cdf0e10cSrcweir @attention Beware, this member can be NULL, and 112cdf0e10cSrcweir nevertheless text output is generated. 113cdf0e10cSrcweir */ 114cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > xFont; 115cdf0e10cSrcweir ::basegfx::B2DHomMatrix transform; 116cdf0e10cSrcweir ::basegfx::B2DHomMatrix mapModeTransform; 117cdf0e10cSrcweir double fontRotation; 118cdf0e10cSrcweir 119cdf0e10cSrcweir sal_uInt16 textEmphasisMarkStyle; 120cdf0e10cSrcweir sal_uInt16 pushFlags; 121cdf0e10cSrcweir sal_Int8 textDirection; 122cdf0e10cSrcweir sal_Int8 textAlignment; 123cdf0e10cSrcweir sal_Int8 textReliefStyle; 124cdf0e10cSrcweir sal_Int8 textOverlineStyle; 125cdf0e10cSrcweir sal_Int8 textUnderlineStyle; 126cdf0e10cSrcweir sal_Int8 textStrikeoutStyle; 127cdf0e10cSrcweir TextAlign textReferencePoint; 128cdf0e10cSrcweir 129cdf0e10cSrcweir bool isTextOutlineModeSet; 130cdf0e10cSrcweir bool isTextEffectShadowSet; 131cdf0e10cSrcweir bool isTextWordUnderlineSet; 132cdf0e10cSrcweir 133cdf0e10cSrcweir bool isLineColorSet; 134cdf0e10cSrcweir bool isFillColorSet; 135cdf0e10cSrcweir bool isTextFillColorSet; 136cdf0e10cSrcweir bool isTextLineColorSet; 137cdf0e10cSrcweir }; 138cdf0e10cSrcweir } 139cdf0e10cSrcweir } 140cdf0e10cSrcweir 141cdf0e10cSrcweir #endif /* _CPPCANVAS_OUTDEVSTATE_HXX */ 142