LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/drawinglayer/primitive3d - textureprimitive3d.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 7 11 63.6 %
Date: 2012-08-25 Functions: 8 16 50.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 4 14 28.6 %

           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_PRIMITIVE3D_TEXTUREPRIMITIVE3D_HXX
      30                 :            : #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_TEXTUREPRIMITIVE3D_HXX
      31                 :            : 
      32                 :            : #include <drawinglayer/drawinglayerdllapi.h>
      33                 :            : 
      34                 :            : #include <drawinglayer/primitive3d/groupprimitive3d.hxx>
      35                 :            : #include <drawinglayer/attribute/fillbitmapattribute.hxx>
      36                 :            : #include <basegfx/matrix/b2dhommatrix.hxx>
      37                 :            : #include <basegfx/vector/b2dvector.hxx>
      38                 :            : #include <drawinglayer/attribute/fillgradientattribute.hxx>
      39                 :            : 
      40                 :            : //////////////////////////////////////////////////////////////////////////////
      41                 :            : 
      42                 :            : namespace drawinglayer
      43                 :            : {
      44                 :            :     namespace primitive3d
      45                 :            :     {
      46                 :            :         /** TexturePrimitive3D class
      47                 :            : 
      48                 :            :             This 3D grouping primitive is used to define a texture for
      49                 :            :             3d geometry by embedding it. It is used as bae class for
      50                 :            :             extended texture definitions
      51                 :            :          */
      52         [ -  + ]:         24 :         class DRAWINGLAYER_DLLPUBLIC TexturePrimitive3D : public GroupPrimitive3D
      53                 :            :         {
      54                 :            :         private:
      55                 :            :             /// texture geometry definition
      56                 :            :             basegfx::B2DVector                          maTextureSize;
      57                 :            : 
      58                 :            :             /// bitfield
      59                 :            :             /// flag if texture shall be modulated with white interpolated color
      60                 :            :             unsigned                                    mbModulate : 1;
      61                 :            : 
      62                 :            :             /// flag if texture shall be filtered
      63                 :            :             unsigned                                    mbFilter : 1;
      64                 :            : 
      65                 :            :         public:
      66                 :            :             /// constructor
      67                 :            :             TexturePrimitive3D(
      68                 :            :                 const Primitive3DSequence& rChildren,
      69                 :            :                 const basegfx::B2DVector& rTextureSize,
      70                 :            :                 bool bModulate,
      71                 :            :                 bool bFilter);
      72                 :            : 
      73                 :            :             /// data read access
      74                 :         64 :             const basegfx::B2DVector& getTextureSize() const { return maTextureSize; }
      75                 :         24 :             bool getModulate() const { return mbModulate; }
      76                 :         24 :             bool getFilter() const { return mbFilter; }
      77                 :            : 
      78                 :            :             /// compare operator
      79                 :            :             virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
      80                 :            :         };
      81                 :            :     } // end of namespace primitive3d
      82                 :            : } // end of namespace drawinglayer
      83                 :            : 
      84                 :            : //////////////////////////////////////////////////////////////////////////////
      85                 :            : 
      86                 :            : namespace drawinglayer
      87                 :            : {
      88                 :            :     namespace primitive3d
      89                 :            :     {
      90                 :            :         /** UnifiedTransparenceTexturePrimitive3D class
      91                 :            : 
      92                 :            :             This 3D primitive expands TexturePrimitive3D to a unified
      93                 :            :             transparence texture definition. All 3D primitives
      94                 :            :             embedded here will be shown with the given transparency.
      95                 :            :          */
      96         [ #  # ]:          0 :         class DRAWINGLAYER_DLLPUBLIC UnifiedTransparenceTexturePrimitive3D : public TexturePrimitive3D
      97                 :            :         {
      98                 :            :         private:
      99                 :            :             /// transparency definition
     100                 :            :             double                                      mfTransparence;
     101                 :            : 
     102                 :            :         public:
     103                 :            :             /// constructor
     104                 :            :             UnifiedTransparenceTexturePrimitive3D(
     105                 :            :                 double fTransparence,
     106                 :            :                 const Primitive3DSequence& rChildren);
     107                 :            : 
     108                 :            :             /// data read access
     109                 :          0 :             double getTransparence() const { return mfTransparence; }
     110                 :            : 
     111                 :            :             /// compare operator
     112                 :            :             virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
     113                 :            : 
     114                 :            :             /// own getB3DRange implementation to include transparent geometries to BoundRect calculations
     115                 :            :             virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
     116                 :            : 
     117                 :            :             /// local decomposition.
     118                 :            :             virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
     119                 :            : 
     120                 :            :             /// provide unique ID
     121                 :            :             DeclPrimitrive3DIDBlock()
     122                 :            :         };
     123                 :            :     } // end of namespace primitive3d
     124                 :            : } // end of namespace drawinglayer
     125                 :            : 
     126                 :            : //////////////////////////////////////////////////////////////////////////////
     127                 :            : 
     128                 :            : namespace drawinglayer
     129                 :            : {
     130                 :            :     namespace primitive3d
     131                 :            :     {
     132                 :            :         /** GradientTexturePrimitive3D class
     133                 :            : 
     134                 :            :             This 3D primitive expands TexturePrimitive3D to a gradient texture
     135                 :            :             definition. All 3D primitives embedded here will be shown with the
     136                 :            :             defined gradient.
     137                 :            :          */
     138 [ +  - ][ -  + ]:         16 :         class DRAWINGLAYER_DLLPUBLIC GradientTexturePrimitive3D : public TexturePrimitive3D
     139                 :            :         {
     140                 :            :         private:
     141                 :            :             /// the gradient definition
     142                 :            :             attribute::FillGradientAttribute        maGradient;
     143                 :            : 
     144                 :            :         public:
     145                 :            :             /// constructor
     146                 :            :             GradientTexturePrimitive3D(
     147                 :            :                 const attribute::FillGradientAttribute& rGradient,
     148                 :            :                 const Primitive3DSequence& rChildren,
     149                 :            :                 const basegfx::B2DVector& rTextureSize,
     150                 :            :                 bool bModulate,
     151                 :            :                 bool bFilter);
     152                 :            : 
     153                 :            :             /// data read access
     154                 :         16 :             const attribute::FillGradientAttribute& getGradient() const { return maGradient; }
     155                 :            : 
     156                 :            :             /// compare operator
     157                 :            :             virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
     158                 :            : 
     159                 :            :             /// provide unique ID
     160                 :            :             DeclPrimitrive3DIDBlock()
     161                 :            :         };
     162                 :            :     } // end of namespace primitive3d
     163                 :            : } // end of namespace drawinglayer
     164                 :            : 
     165                 :            : //////////////////////////////////////////////////////////////////////////////
     166                 :            : 
     167                 :            : namespace drawinglayer
     168                 :            : {
     169                 :            :     namespace primitive3d
     170                 :            :     {
     171                 :            :         /** BitmapTexturePrimitive3D class
     172                 :            : 
     173                 :            :             This 3D primitive expands TexturePrimitive3D to a bitmap texture
     174                 :            :             definition. All 3D primitives embedded here will be shown with the
     175                 :            :             defined bitmap (maybe tiled if defined).
     176                 :            :          */
     177 [ #  # ][ #  # ]:          0 :         class DRAWINGLAYER_DLLPUBLIC BitmapTexturePrimitive3D : public TexturePrimitive3D
     178                 :            :         {
     179                 :            :         private:
     180                 :            :             /// bitmap fill attribute
     181                 :            :             attribute::FillBitmapAttribute      maFillBitmapAttribute;
     182                 :            : 
     183                 :            :         public:
     184                 :            :             /// constructor
     185                 :            :             BitmapTexturePrimitive3D(
     186                 :            :                 const attribute::FillBitmapAttribute& rFillBitmapAttribute,
     187                 :            :                 const Primitive3DSequence& rChildren,
     188                 :            :                 const basegfx::B2DVector& rTextureSize,
     189                 :            :                 bool bModulate,
     190                 :            :                 bool bFilter);
     191                 :            : 
     192                 :            :             /// data read access
     193                 :          0 :             const attribute::FillBitmapAttribute& getFillBitmapAttribute() const { return maFillBitmapAttribute; }
     194                 :            : 
     195                 :            :             /// compare operator
     196                 :            :             virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
     197                 :            : 
     198                 :            :             /// provide unique ID
     199                 :            :             DeclPrimitrive3DIDBlock()
     200                 :            :         };
     201                 :            :     } // end of namespace primitive3d
     202                 :            : } // end of namespace drawinglayer
     203                 :            : 
     204                 :            : //////////////////////////////////////////////////////////////////////////////
     205                 :            : 
     206                 :            : namespace drawinglayer
     207                 :            : {
     208                 :            :     namespace primitive3d
     209                 :            :     {
     210                 :            :         /** TransparenceTexturePrimitive3D class
     211                 :            : 
     212                 :            :             This 3D primitive expands TexturePrimitive3D to a transparence texture
     213                 :            :             definition. For transparence definition, a gradient is used. The values in
     214                 :            :             that gradient will be interpreted as luminance Transparence-Values. All 3D
     215                 :            :             primitives embedded here will be shown with the defined transparence.
     216                 :            :          */
     217         [ -  + ]:         32 :         class DRAWINGLAYER_DLLPUBLIC TransparenceTexturePrimitive3D : public GradientTexturePrimitive3D
     218                 :            :         {
     219                 :            :         public:
     220                 :            :             /// constructor
     221                 :            :             TransparenceTexturePrimitive3D(
     222                 :            :                 const attribute::FillGradientAttribute& rGradient,
     223                 :            :                 const Primitive3DSequence& rChildren,
     224                 :            :                 const basegfx::B2DVector& rTextureSize);
     225                 :            : 
     226                 :            :             /// compare operator
     227                 :            :             virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
     228                 :            : 
     229                 :            :             /// provide unique ID
     230                 :            :             DeclPrimitrive3DIDBlock()
     231                 :            :         };
     232                 :            :     } // end of namespace primitive3d
     233                 :            : } // end of namespace drawinglayer
     234                 :            : 
     235                 :            : //////////////////////////////////////////////////////////////////////////////
     236                 :            : 
     237                 :            : #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_TEXTUREPRIMITIVE3D_HXX
     238                 :            : 
     239                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10