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_DRAWINGLAYER_PRIMITIVE2D_EPSPRIMITIVE2D_HXX 25 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_EPSPRIMITIVE2D_HXX 26 27 #include <drawinglayer/drawinglayerdllapi.h> 28 #include <drawinglayer/primitive2d/baseprimitive2d.hxx> 29 #include <basegfx/matrix/b2dhommatrix.hxx> 30 #include <vcl/gfxlink.hxx> 31 #include <vcl/gdimtf.hxx> 32 33 ////////////////////////////////////////////////////////////////////////////// 34 35 namespace drawinglayer 36 { 37 namespace primitive2d 38 { 39 /** EpsPrimitive2D class */ 40 class DRAWINGLAYER_DLLPUBLIC EpsPrimitive2D : public BufferedDecompositionPrimitive2D 41 { 42 private: 43 /// the geometry definition 44 basegfx::B2DHomMatrix maEpsTransform; 45 46 /// the Eps content definition 47 GfxLink maGfxLink; 48 49 /// the replacement content definition 50 GDIMetaFile maMetaFile; 51 52 protected: 53 /// create local decomposition 54 virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; 55 56 public: 57 /// constructor 58 EpsPrimitive2D( 59 const basegfx::B2DHomMatrix& rEpsTransform, 60 const GfxLink& rGfxLink, 61 const GDIMetaFile& rMetaFile); 62 63 /// data read access getEpsTransform() const64 const basegfx::B2DHomMatrix& getEpsTransform() const { return maEpsTransform; } getGfxLink() const65 const GfxLink& getGfxLink() const { return maGfxLink; } getMetaFile() const66 const GDIMetaFile& getMetaFile() const { return maMetaFile; } 67 68 /// compare operator 69 virtual bool operator==(const BasePrimitive2D& rPrimitive) const; 70 71 /// get B2Drange 72 virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; 73 74 /// provide unique ID 75 DeclPrimitrive2DIDBlock() 76 }; 77 } // end of namespace primitive2d 78 } // end of namespace drawinglayer 79 80 ////////////////////////////////////////////////////////////////////////////// 81 82 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_EPSPRIMITIVE2D_HXX 83 84 ////////////////////////////////////////////////////////////////////////////// 85 // eof 86