LCOV - code coverage report
Current view: top level - include/drawinglayer/texture - texture3d.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 2 0.0 %
Date: 2014-04-14 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_DRAWINGLAYER_TEXTURE_TEXTURE3D_HXX
      21             : #define INCLUDED_DRAWINGLAYER_TEXTURE_TEXTURE3D_HXX
      22             : 
      23             : #include <drawinglayer/drawinglayerdllapi.h>
      24             : 
      25             : #include <drawinglayer/texture/texture.hxx>
      26             : #include <vcl/bitmapex.hxx>
      27             : 
      28             : 
      29             : // predeclarations
      30             : 
      31             : namespace drawinglayer { namespace primitive3d {
      32             :     class HatchTexturePrimitive3D;
      33             : }}
      34             : 
      35             : 
      36             : 
      37             : namespace drawinglayer
      38             : {
      39             :     namespace texture
      40             :     {
      41           0 :         class DRAWINGLAYER_DLLPUBLIC GeoTexSvxMono : public GeoTexSvx
      42             :         {
      43             :         protected:
      44             :             basegfx::BColor                             maSingleColor;
      45             :             double                                      mfOpacity;
      46             : 
      47             :         public:
      48             :             GeoTexSvxMono(
      49             :                 const basegfx::BColor& rSingleColor,
      50             :                 double fOpacity);
      51             : 
      52             :             // compare operator
      53             :             virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const SAL_OVERRIDE;
      54             :             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
      55             :             virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
      56             :         };
      57             :     } // end of namespace texture
      58             : } // end of namespace drawinglayer
      59             : 
      60             : 
      61             : 
      62             : namespace drawinglayer
      63             : {
      64             :     namespace texture
      65             :     {
      66             :         class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapEx : public GeoTexSvx
      67             :         {
      68             :         protected:
      69             :             BitmapEx                                    maBitmapEx;
      70             :             BitmapReadAccess*                           mpReadBitmap;
      71             :             Bitmap                                      maTransparence;
      72             :             BitmapReadAccess*                           mpReadTransparence;
      73             :             basegfx::B2DPoint                           maTopLeft;
      74             :             basegfx::B2DVector                          maSize;
      75             :             double                                      mfMulX;
      76             :             double                                      mfMulY;
      77             : 
      78             :             /// bitfield
      79             :             bool                                        mbIsAlpha : 1;
      80             :             bool                                        mbIsTransparent : 1;
      81             : 
      82             :             // helpers
      83             :             bool impIsValid(const basegfx::B2DPoint& rUV, sal_Int32& rX, sal_Int32& rY) const;
      84             :             sal_uInt8 impGetTransparence(sal_Int32& rX, sal_Int32& rY) const;
      85             : 
      86             :         public:
      87             :             GeoTexSvxBitmapEx(
      88             :                 const BitmapEx& rBitmapEx,
      89             :                 const basegfx::B2DRange& rRange);
      90             :             virtual ~GeoTexSvxBitmapEx();
      91             : 
      92             :             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
      93             :             virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
      94             :         };
      95             :     } // end of namespace texture
      96             : } // end of namespace drawinglayer
      97             : 
      98             : 
      99             : 
     100             : namespace drawinglayer
     101             : {
     102             :     namespace texture
     103             :     {
     104           0 :         class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapExTiled : public GeoTexSvxBitmapEx
     105             :         {
     106             :         protected:
     107             :             double                                      mfOffsetX;
     108             :             double                                      mfOffsetY;
     109             : 
     110             :             /// bitfield
     111             :             bool                                        mbUseOffsetX : 1;
     112             :             bool                                        mbUseOffsetY : 1;
     113             : 
     114             :             // helpers
     115             :             basegfx::B2DPoint impGetCorrected(const basegfx::B2DPoint& rUV) const;
     116             : 
     117             :         public:
     118             :             GeoTexSvxBitmapExTiled(
     119             :                 const BitmapEx& rBitmapEx,
     120             :                 const basegfx::B2DRange& rRange,
     121             :                 double fOffsetX = 0.0,
     122             :                 double fOffsetY = 0.0);
     123             : 
     124             :             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
     125             :             virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
     126             :         };
     127             :     } // end of namespace texture
     128             : } // end of namespace drawinglayer
     129             : 
     130             : 
     131             : 
     132             : namespace drawinglayer
     133             : {
     134             :     namespace texture
     135             :     {
     136             :         class DRAWINGLAYER_DLLPUBLIC GeoTexSvxMultiHatch : public GeoTexSvx
     137             :         {
     138             :         protected:
     139             :             basegfx::BColor                 maColor;
     140             :             double                          mfLogicPixelSize;
     141             :             GeoTexSvxHatch*                 mp0;
     142             :             GeoTexSvxHatch*                 mp1;
     143             :             GeoTexSvxHatch*                 mp2;
     144             : 
     145             :             // bitfield
     146             :             bool                            mbFillBackground : 1;
     147             : 
     148             :             // helpers
     149             :             bool impIsOnHatch(const basegfx::B2DPoint& rUV) const;
     150             : 
     151             :         public:
     152             :             GeoTexSvxMultiHatch(const primitive3d::HatchTexturePrimitive3D& rPrimitive, double fLogicPixelSize);
     153             :             virtual ~GeoTexSvxMultiHatch();
     154             :             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
     155             :             virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
     156             : 
     157             :             // dada access
     158             :             bool getFillBackground() const { return mbFillBackground; }
     159             :         };
     160             :     } // end of namespace texture
     161             : } // end of namespace drawinglayer
     162             : 
     163             : 
     164             : 
     165             : #endif // INCLUDED_DRAWINGLAYER_TEXTURE_TEXTURE3D_HXX
     166             : 
     167             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10