LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/drawinglayer/primitive2d - transparenceprimitive2d.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                 :            :  *  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_TRANSPARENCEPRIMITIVE2D_HXX
      32                 :            : #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSPARENCEPRIMITIVE2D_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                 :            :         /** TransparencePrimitive2D class
      45                 :            : 
      46                 :            :             This is the basic primitive for applying freely defined transparence
      47                 :            :             to freely defined content. The basic idea is to associate a content
      48                 :            :             which is defined as a sequence of primitives and hold as child content
      49                 :            :             in the GroupPrimitive2D with a transparence channel also defined as a sequence
      50                 :            :             of primitives and hold in the transparence member.
      51                 :            : 
      52                 :            :             The basic definition is to use the transparence content as transparence-Mask by
      53                 :            :             interpreting the transparence-content not as RGB, but as Luminance transparence mask
      54                 :            :             using the common RGB_to_luminance definition as e.g. used by VCL.
      55                 :            : 
      56                 :            :             The defining geometry is the Range of the child primitive sequence,
      57                 :            :             this means the renderers will/shall use this geometric information for
      58                 :            :             rendering, not the transparent one. The transparent one should/will be clipped
      59                 :            :             accordingly.
      60                 :            :          */
      61 [ +  - ][ -  + ]:       4710 :         class DRAWINGLAYER_DLLPUBLIC TransparencePrimitive2D : public GroupPrimitive2D
      62                 :            :         {
      63                 :            :         private:
      64                 :            :             /// The transparence-Mask who's RGB-Values are interpreted as Luminance
      65                 :            :             Primitive2DSequence                     maTransparence;
      66                 :            : 
      67                 :            :         public:
      68                 :            :             /** constructor
      69                 :            : 
      70                 :            :                 @param rChildren
      71                 :            :                 The content which is defined to have a transparency. The
      72                 :            :                 range of this primitive is defined by this content
      73                 :            : 
      74                 :            :                 @param rTransparence
      75                 :            :                 The definition of the Transparence-channel for this primitive. It
      76                 :            :                 will be interpreted as mask by interpreting as gray values
      77                 :            :                 using the common RGB_to_luminance definitions
      78                 :            :              */
      79                 :            :             TransparencePrimitive2D(
      80                 :            :                 const Primitive2DSequence& rChildren,
      81                 :            :                 const Primitive2DSequence& rTransparence);
      82                 :            : 
      83                 :            :             /// data read access
      84                 :       1638 :             const Primitive2DSequence& getTransparence() const { return maTransparence; }
      85                 :            : 
      86                 :            :             /// compare operator
      87                 :            :             virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
      88                 :            : 
      89                 :            :             /// provide unique ID
      90                 :            :             DeclPrimitrive2DIDBlock()
      91                 :            :         };
      92                 :            :     } // end of namespace primitive2d
      93                 :            : } // end of namespace drawinglayer
      94                 :            : 
      95                 :            : //////////////////////////////////////////////////////////////////////////////
      96                 :            : 
      97                 :            : #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSPARENCEPRIMITIVE2D_HXX
      98                 :            : 
      99                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10