LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/drawinglayer/primitive2d - unifiedtransparenceprimitive2d.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: 1 2 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                 :            :  *  OpenOffice.org - a multi-platform office productivity suite
       5                 :            :  *
       6                 :            :  *  The Contents of this file are made available subject to
       7                 :            :  *  the terms of GNU Lesser General Public License Version 2.1.
       8                 :            :  *
       9                 :            :  *
      10                 :            :  *    GNU Lesser General Public License Version 2.1
      11                 :            :  *    =============================================
      12                 :            :  *    Copyright 2005 by Sun Microsystems, Inc.
      13                 :            :  *    901 San Antonio Road, Palo Alto, CA 94303, USA
      14                 :            :  *
      15                 :            :  *    This library is free software; you can redistribute it and/or
      16                 :            :  *    modify it under the terms of the GNU Lesser General Public
      17                 :            :  *    License version 2.1, as published by the Free Software Foundation.
      18                 :            :  *
      19                 :            :  *    This library is distributed in the hope that it will be useful,
      20                 :            :  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
      21                 :            :  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      22                 :            :  *    Lesser General Public License for more details.
      23                 :            :  *
      24                 :            :  *    You should have received a copy of the GNU Lesser General Public
      25                 :            :  *    License along with this library; if not, write to the Free Software
      26                 :            :  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
      27                 :            :  *    MA  02111-1307  USA
      28                 :            :  *
      29                 :            :  ************************************************************************/
      30                 :            : 
      31                 :            : #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDTRANSPARENCEPRIMITIVE2D_HXX
      32                 :            : #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDTRANSPARENCEPRIMITIVE2D_HXX
      33                 :            : 
      34                 :            : #include <drawinglayer/drawinglayerdllapi.h>
      35                 :            : 
      36                 :            : #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
      37                 :            : 
      38                 :            : //////////////////////////////////////////////////////////////////////////////
      39                 :            : 
      40                 :            : namespace drawinglayer
      41                 :            : {
      42                 :            :     namespace primitive2d
      43                 :            :     {
      44                 :            :         /** UnifiedTransparencePrimitive2D class
      45                 :            : 
      46                 :            :             This primitive encapsualtes a child hierarchy and defines
      47                 :            :             that it shall be visualized with the given transparency. That
      48                 :            :             transparency is unique for all contained geometry, so that
      49                 :            :             e.g. overlapping polygons in the child geometry will not show
      50                 :            :             regions of combined transparency, but be all rendered with the
      51                 :            :             defined, single transparency.
      52                 :            :          */
      53         [ -  + ]:        432 :         class DRAWINGLAYER_DLLPUBLIC UnifiedTransparencePrimitive2D : public GroupPrimitive2D
      54                 :            :         {
      55                 :            :         private:
      56                 :            :             /// the unified transparence
      57                 :            :             double                              mfTransparence;
      58                 :            : 
      59                 :            :         public:
      60                 :            :             /// constructor
      61                 :            :             UnifiedTransparencePrimitive2D(
      62                 :            :                 const Primitive2DSequence& rChildren,
      63                 :            :                 double fTransparence);
      64                 :            : 
      65                 :            :             /// data read access
      66                 :       1743 :             double getTransparence() const { return mfTransparence; }
      67                 :            : 
      68                 :            :             /// compare operator
      69                 :            :             virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
      70                 :            : 
      71                 :            :             /// own getB2DRange implementation to include transparent geometries to BoundRect calculations
      72                 :            :             virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
      73                 :            : 
      74                 :            :             /// create decomposition
      75                 :            :             virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
      76                 :            : 
      77                 :            :             /// provide unique ID
      78                 :            :             DeclPrimitrive2DIDBlock()
      79                 :            :         };
      80                 :            :     } // end of namespace primitive2d
      81                 :            : } // end of namespace drawinglayer
      82                 :            : 
      83                 :            : //////////////////////////////////////////////////////////////////////////////
      84                 :            : 
      85                 :            : #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDTRANSPARENCEPRIMITIVE2D_HXX
      86                 :            : 
      87                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10