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 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_EPSPRIMITIVE2D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_EPSPRIMITIVE2D_HXX
22 
23 #include <drawinglayer/drawinglayerdllapi.h>
24 
25 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
26 #include <basegfx/matrix/b2dhommatrix.hxx>
27 #include <vcl/gfxlink.hxx>
28 #include <vcl/gdimtf.hxx>
29 
30 namespace drawinglayer
31 {
32     namespace primitive2d
33     {
34         /** EpsPrimitive2D class */
35         class DRAWINGLAYER_DLLPUBLIC EpsPrimitive2D final : public BufferedDecompositionPrimitive2D
36         {
37         private:
38             /// the geometry definition
39             basegfx::B2DHomMatrix                       maEpsTransform;
40 
41             /// the Eps content definition
42             GfxLink                                     maGfxLink;
43 
44             /// the replacement content definition
45             GDIMetaFile                                 maMetaFile;
46 
47             /// create local decomposition
48             virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override;
49 
50         public:
51             /// constructor
52             EpsPrimitive2D(
53                 const basegfx::B2DHomMatrix& rEpsTransform,
54                 const GfxLink& rGfxLink,
55                 const GDIMetaFile& rMetaFile);
56 
57             /// data read access
getEpsTransform() const58             const basegfx::B2DHomMatrix& getEpsTransform() const { return maEpsTransform; }
getGfxLink() const59             const GfxLink& getGfxLink() const { return maGfxLink; }
getMetaFile() const60             const GDIMetaFile& getMetaFile() const { return maMetaFile; }
61 
62             /// compare operator
63             virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
64 
65             /// get B2Drange
66             virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
67 
68             /// provide unique ID
69             DeclPrimitive2DIDBlock()
70         };
71     } // end of namespace primitive2d
72 } // end of namespace drawinglayer
73 
74 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_EPSPRIMITIVE2D_HXX
75 
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
77