1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INCLUDED_SDR_PRIMITIVE2D_SDRGRAFPRIMITIVE2D_HXX 25 #define INCLUDED_SDR_PRIMITIVE2D_SDRGRAFPRIMITIVE2D_HXX 26 27 #include <drawinglayer/primitive2d/baseprimitive2d.hxx> 28 #include <basegfx/matrix/b2dhommatrix.hxx> 29 #include <svtools/grfmgr.hxx> 30 #include <svx/sdr/attribute/sdrlinefillshadowtextattribute.hxx> 31 32 ////////////////////////////////////////////////////////////////////////////// 33 // predefines 34 35 ////////////////////////////////////////////////////////////////////////////// 36 37 namespace drawinglayer 38 { 39 namespace primitive2d 40 { 41 class SdrGrafPrimitive2D : public BufferedDecompositionPrimitive2D 42 { 43 private: 44 ::basegfx::B2DHomMatrix maTransform; 45 attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; 46 GraphicObject maGraphicObject; 47 GraphicAttr maGraphicAttr; 48 49 protected: 50 // local decomposition. 51 virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; 52 53 public: 54 SdrGrafPrimitive2D( 55 const ::basegfx::B2DHomMatrix& rTransform, 56 const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, 57 const GraphicObject& rGraphicObject, 58 const GraphicAttr& rGraphicAttr); 59 60 // data access getTransform() const61 const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; } getSdrLFSTAttribute() const62 const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } getGraphicObject() const63 const GraphicObject& getGraphicObject() const { return maGraphicObject; } getGraphicAttr() const64 const GraphicAttr& getGraphicAttr() const { return maGraphicAttr; } 65 bool isTransparent() const; 66 67 // compare operator 68 virtual bool operator==(const BasePrimitive2D& rPrimitive) const; 69 70 // provide unique ID 71 DeclPrimitrive2DIDBlock() 72 }; 73 } // end of namespace primitive2d 74 } // end of namespace drawinglayer 75 76 ////////////////////////////////////////////////////////////////////////////// 77 78 #endif //INCLUDED_SDR_PRIMITIVE2D_SDRGRAFPRIMITIVE2D_HXX 79 80 // eof 81