xref: /AOO41X/main/drawinglayer/inc/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx (revision 4bfbcde8d64cc5d114df10dce4a9ed79eff32278)
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 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_HIDDENGEOMETRYPRIMITIVE2D_HXX
23 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_HIDDENGEOMETRYPRIMITIVE2D_HXX
24 
25 #include <drawinglayer/drawinglayerdllapi.h>
26 #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
27 
28 //////////////////////////////////////////////////////////////////////////////
29 
30 namespace drawinglayer
31 {
32     namespace primitive2d
33     {
34         // This primitive is used to represent geometry for non-visible objects,
35         // e.g. a PresObj's outline. To still be able to use primitives for HitTest
36         // functionality, the 2d decompositions will produce an as much as possible
37         // simplified line geometry encapsulated in this primtive when there is no
38         // line geometry. In a further enchanced version this may change to 'if neither
39         // filled nor lines' creation criteria. The whole primitive decomposes to nothing,
40         // so no one not knowing it will be influenced. Only helper processors for hit test
41         // (and maybe BoundRect extractors) will use it and it's children subcontent.
42         class DRAWINGLAYER_DLLPUBLIC HiddenGeometryPrimitive2D : public GroupPrimitive2D
43         {
44         public:
45             HiddenGeometryPrimitive2D(const Primitive2DSequence& rChildren);
46 
47             // despite returning an empty decomposition since it's no visualisation data,
48             // range calculation is intended to use hidden geometry, so
49             // the local implementation will return the children's range
50             virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
51 
52             /// local decomposition. Implementation will return empty Primitive2DSequence
53             virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
54 
55             // provide unique ID
56             DeclPrimitrive2DIDBlock()
57         };
58     } // end of namespace primitive2d
59 } // end of namespace drawinglayer
60 
61 //////////////////////////////////////////////////////////////////////////////
62 
63 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_HIDDENGEOMETRYPRIMITIVE2D_HXX
64 
65 //////////////////////////////////////////////////////////////////////////////
66 // eof
67