LCOV - code coverage report
Current view: top level - include/drawinglayer/texture - texture3d.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 2 0.0 %
Date: 2015-06-13 12:38:46 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             : namespace drawinglayer { namespace primitive3d {
      29             :     class HatchTexturePrimitive3D;
      30             : }}
      31             : 
      32             : namespace drawinglayer
      33             : {
      34             :     namespace texture
      35             :     {
      36           0 :         class DRAWINGLAYER_DLLPUBLIC GeoTexSvxMono : public GeoTexSvx
      37             :         {
      38             :         protected:
      39             :             basegfx::BColor                             maSingleColor;
      40             :             double                                      mfOpacity;
      41             : 
      42             :         public:
      43             :             GeoTexSvxMono(
      44             :                 const basegfx::BColor& rSingleColor,
      45             :                 double fOpacity);
      46             : 
      47             :             // compare operator
      48             :             virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const SAL_OVERRIDE;
      49             :             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
      50             :             virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
      51             :         };
      52             :     } // end of namespace texture
      53             : } // end of namespace drawinglayer
      54             : 
      55             : namespace drawinglayer
      56             : {
      57             :     namespace texture
      58             :     {
      59             :         class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapEx : public GeoTexSvx
      60             :         {
      61             :         protected:
      62             :             BitmapEx                                    maBitmapEx;
      63             :             BitmapReadAccess*                           mpReadBitmap;
      64             :             Bitmap                                      maTransparence;
      65             :             BitmapReadAccess*                           mpReadTransparence;
      66             :             basegfx::B2DPoint                           maTopLeft;
      67             :             basegfx::B2DVector                          maSize;
      68             :             double                                      mfMulX;
      69             :             double                                      mfMulY;
      70             : 
      71             :             /// bitfield
      72             :             bool                                        mbIsAlpha : 1;
      73             :             bool                                        mbIsTransparent : 1;
      74             : 
      75             :             // helpers
      76             :             bool impIsValid(const basegfx::B2DPoint& rUV, sal_Int32& rX, sal_Int32& rY) const;
      77             :             sal_uInt8 impGetTransparence(sal_Int32& rX, sal_Int32& rY) const;
      78             : 
      79             :         public:
      80             :             GeoTexSvxBitmapEx(
      81             :                 const BitmapEx& rBitmapEx,
      82             :                 const basegfx::B2DRange& rRange);
      83             :             virtual ~GeoTexSvxBitmapEx();
      84             : 
      85             :             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
      86             :             virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
      87             :         };
      88             :     } // end of namespace texture
      89             : } // end of namespace drawinglayer
      90             : 
      91             : namespace drawinglayer
      92             : {
      93             :     namespace texture
      94             :     {
      95           0 :         class DRAWINGLAYER_DLLPUBLIC GeoTexSvxBitmapExTiled : public GeoTexSvxBitmapEx
      96             :         {
      97             :         protected:
      98             :             double                                      mfOffsetX;
      99             :             double                                      mfOffsetY;
     100             : 
     101             :             /// bitfield
     102             :             bool                                        mbUseOffsetX : 1;
     103             :             bool                                        mbUseOffsetY : 1;
     104             : 
     105             :             // helpers
     106             :             basegfx::B2DPoint impGetCorrected(const basegfx::B2DPoint& rUV) const;
     107             : 
     108             :         public:
     109             :             GeoTexSvxBitmapExTiled(
     110             :                 const BitmapEx& rBitmapEx,
     111             :                 const basegfx::B2DRange& rRange,
     112             :                 double fOffsetX = 0.0,
     113             :                 double fOffsetY = 0.0);
     114             : 
     115             :             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
     116             :             virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
     117             :         };
     118             :     } // end of namespace texture
     119             : } // end of namespace drawinglayer
     120             : 
     121             : namespace drawinglayer
     122             : {
     123             :     namespace texture
     124             :     {
     125             :         class DRAWINGLAYER_DLLPUBLIC GeoTexSvxMultiHatch : public GeoTexSvx
     126             :         {
     127             :         protected:
     128             :             basegfx::BColor                 maColor;
     129             :             double                          mfLogicPixelSize;
     130             :             GeoTexSvxHatch*                 mp0;
     131             :             GeoTexSvxHatch*                 mp1;
     132             :             GeoTexSvxHatch*                 mp2;
     133             : 
     134             :             // bitfield
     135             :             bool                            mbFillBackground : 1;
     136             : 
     137             :             // helpers
     138             :             bool impIsOnHatch(const basegfx::B2DPoint& rUV) const;
     139             : 
     140             :         public:
     141             :             GeoTexSvxMultiHatch(const primitive3d::HatchTexturePrimitive3D& rPrimitive, double fLogicPixelSize);
     142             :             virtual ~GeoTexSvxMultiHatch();
     143             :             virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
     144             :             virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
     145             : 
     146             :             // dada access
     147             :             bool getFillBackground() const { return mbFillBackground; }
     148             :         };
     149             :     } // end of namespace texture
     150             : } // end of namespace drawinglayer
     151             : 
     152             : #endif // INCLUDED_DRAWINGLAYER_TEXTURE_TEXTURE3D_HXX
     153             : 
     154             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11