LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/drawinglayer/primitive2d - shadowprimitive2d.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 3 100.0 %
Date: 2012-08-25 Functions: 4 4 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_SHADOWPRIMITIVE2D_HXX
      30                 :            : #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_SHADOWPRIMITIVE2D_HXX
      31                 :            : 
      32                 :            : #include <drawinglayer/drawinglayerdllapi.h>
      33                 :            : 
      34                 :            : #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
      35                 :            : #include <basegfx/matrix/b2dhommatrix.hxx>
      36                 :            : #include <basegfx/color/bcolor.hxx>
      37                 :            : 
      38                 :            : //////////////////////////////////////////////////////////////////////////////
      39                 :            : 
      40                 :            : namespace drawinglayer
      41                 :            : {
      42                 :            :     namespace primitive2d
      43                 :            :     {
      44                 :            :         /** ShadowPrimitive2D class
      45                 :            : 
      46                 :            :             This primitive defines a generic shadow geometry construction
      47                 :            :             for 2D objects. It decomposes to a TransformPrimitive2D embedded
      48                 :            :             into a ModifiedColorPrimitive2D.
      49                 :            : 
      50                 :            :             It's for primtive usage convenience, so that not everyone has
      51                 :            :             to implement the generic shadow construction by himself.
      52                 :            : 
      53                 :            :             The same geometry as sequence of primitives is used as geometry and
      54                 :            :             as shadow. Since these are RefCounted Uno-Api objects, no extra objects
      55                 :            :             are needed for the shadow itself; all the local decompositions of the
      56                 :            :             original geometry can be reused from the renderer for shadow visualisation.
      57                 :            :         */
      58 [ +  - ][ -  + ]:        676 :         class DRAWINGLAYER_DLLPUBLIC ShadowPrimitive2D : public GroupPrimitive2D
      59                 :            :         {
      60                 :            :         private:
      61                 :            :             /// the shadow transformation, normally just an offset
      62                 :            :             basegfx::B2DHomMatrix                   maShadowTransform;
      63                 :            : 
      64                 :            :             /// the shadow color to which all geometry is to be forced
      65                 :            :             basegfx::BColor                         maShadowColor;
      66                 :            : 
      67                 :            :         public:
      68                 :            :             /// constructor
      69                 :            :             ShadowPrimitive2D(
      70                 :            :                 const basegfx::B2DHomMatrix& rShadowTransform,
      71                 :            :                 const basegfx::BColor& rShadowColor,
      72                 :            :                 const Primitive2DSequence& rChildren);
      73                 :            : 
      74                 :            :             /// data read access
      75                 :       1392 :             const basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; }
      76                 :          2 :             const basegfx::BColor& getShadowColor() const { return maShadowColor; }
      77                 :            : 
      78                 :            :             /// compare operator
      79                 :            :             virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
      80                 :            : 
      81                 :            :             /// get range
      82                 :            :             virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
      83                 :            : 
      84                 :            :             ///  create decomposition
      85                 :            :             virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
      86                 :            : 
      87                 :            :             /// provide unique ID
      88                 :            :             DeclPrimitrive2DIDBlock()
      89                 :            :         };
      90                 :            :     } // end of namespace primitive2d
      91                 :            : } // end of namespace drawinglayer
      92                 :            : 
      93                 :            : //////////////////////////////////////////////////////////////////////////////
      94                 :            : 
      95                 :            : #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_SHADOWPRIMITIVE2D_HXX
      96                 :            : 
      97                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10