LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/drawinglayer/primitive2d - groupprimitive2d.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 2 100.0 %
Date: 2012-08-25 Functions: 3 3 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 4 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GROUPPRIMITIVE2D_HXX
      30                 :            : #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GROUPPRIMITIVE2D_HXX
      31                 :            : 
      32                 :            : #include <drawinglayer/drawinglayerdllapi.h>
      33                 :            : 
      34                 :            : #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
      35                 :            : 
      36                 :            : //////////////////////////////////////////////////////////////////////////////
      37                 :            : // GroupPrimitive2D class
      38                 :            : 
      39                 :            : namespace drawinglayer
      40                 :            : {
      41                 :            :     namespace primitive2d
      42                 :            :     {
      43                 :            :         /** GroupPrimitive2D class
      44                 :            : 
      45                 :            :             Baseclass for all grouping 2D primitives
      46                 :            : 
      47                 :            :             The grouping primitive in it's basic form is capable of holding
      48                 :            :             a child primitive content and returns it on decomposition on default.
      49                 :            :             It is used for two main purposes, but more may apply:
      50                 :            : 
      51                 :            :             - to transport extended information, e.g. for text classification,
      52                 :            :               see e.g. TextHierarchy*Primitive2D implementations. Since they
      53                 :            :               decompose to their child content, renderers not aware/interested
      54                 :            :               in that extra information will just ignore these primitives
      55                 :            : 
      56                 :            :             - to encapsulate common geometry, e.g. the ShadowPrimitive2D implements
      57                 :            :               applying a generic shadow to a child sequence by adding the needed
      58                 :            :               offset and color stuff in the decomposition
      59                 :            : 
      60                 :            :             In most cases the decomposition is straightforward, so by default
      61                 :            :             this primitive will not buffer the result and is not derived from
      62                 :            :             BufferedDecompositionPrimitive2D, but from BasePrimitive2D.
      63                 :            : 
      64                 :            :             A renderer has to take GroupPrimitive2D derivations into account which
      65                 :            :             are used to hold a state.
      66                 :            : 
      67                 :            :             Current Basic 2D StatePrimitives are:
      68                 :            : 
      69                 :            :             - TransparencePrimitive2D (objects with freely defined transparence)
      70                 :            :             - InvertPrimitive2D (for XOR)
      71                 :            :             - MaskPrimitive2D (for masking)
      72                 :            :             - ModifiedColorPrimitive2D (for a stack of color modifications)
      73                 :            :             - TransformPrimitive2D (for a transformation stack)
      74                 :            :          */
      75 [ +  - ][ -  + ]:      93578 :         class DRAWINGLAYER_DLLPUBLIC GroupPrimitive2D : public BasePrimitive2D
      76                 :            :         {
      77                 :            :         private:
      78                 :            :             /// the children. Declared private since this shall never be changed at all after construction
      79                 :            :             Primitive2DSequence                             maChildren;
      80                 :            : 
      81                 :            :         public:
      82                 :            :             /// constructor
      83                 :            :             explicit GroupPrimitive2D(const Primitive2DSequence& rChildren);
      84                 :            : 
      85                 :            :             /// data read access
      86                 :     773713 :             const Primitive2DSequence& getChildren() const { return maChildren; }
      87                 :            : 
      88                 :            :             /// compare operator
      89                 :            :             virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
      90                 :            : 
      91                 :            :             /// local decomposition. Implementation will just return children
      92                 :            :             virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
      93                 :            : 
      94                 :            :             /// provide unique ID
      95                 :            :             DeclPrimitrive2DIDBlock()
      96                 :            :         };
      97                 :            :     } // end of namespace primitive2d
      98                 :            : } // end of namespace drawinglayer
      99                 :            : 
     100                 :            : //////////////////////////////////////////////////////////////////////////////
     101                 :            : 
     102                 :            : #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GROUPPRIMITIVE2D_HXX
     103                 :            : 
     104                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10