LCOV - code coverage report
Current view: top level - svx/inc/svx - xbitmap.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 11 18.2 %
Date: 2012-08-25 Functions: 2 11 18.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 3 6 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 _SVX_XBITMAP_HXX
      30                 :            : #define _SVX_XBITMAP_HXX
      31                 :            : 
      32                 :            : #include <tools/color.hxx>
      33                 :            : #include <vcl/bitmap.hxx>
      34                 :            : #include <svtools/grfmgr.hxx>
      35                 :            : #include <svx/xenum.hxx>
      36                 :            : #include "svx/svxdllapi.h"
      37                 :            : 
      38                 :            : //---------------
      39                 :            : // class XOBitmap
      40                 :            : //---------------
      41                 :            : 
      42                 :            : class SVX_DLLPUBLIC XOBitmap
      43                 :            : {
      44                 :            : protected:
      45                 :            :     XBitmapType     eType;
      46                 :            :     XBitmapStyle    eStyle;
      47                 :            :     GraphicObject   aGraphicObject;
      48                 :            :     sal_uInt16*         pPixelArray;
      49                 :            :     Size            aArraySize;
      50                 :            :     Color           aPixelColor;
      51                 :            :     Color           aBckgrColor;
      52                 :            :     sal_Bool            bGraphicDirty;
      53                 :            : 
      54                 :            : public:
      55                 :            :     XOBitmap();
      56                 :            :     XOBitmap( const GraphicObject& rGraphicObject, XBitmapStyle eStyle = XBITMAP_TILE );
      57                 :            :     XOBitmap( const Bitmap& rBitmap, XBitmapStyle eStyle = XBITMAP_TILE );
      58                 :            :     XOBitmap( const sal_uInt16* pArray, const Color& aPixelColor,
      59                 :            :              const Color& aBckgrColor, const Size& rSize = Size( 8, 8 ),
      60                 :            :              XBitmapStyle eStyle = XBITMAP_TILE );
      61                 :            :     XOBitmap( const XOBitmap& rXBmp );
      62                 :            :     ~XOBitmap();
      63                 :            : 
      64                 :            :     XOBitmap& operator=( const XOBitmap& rXOBitmap );
      65                 :            :     int      operator==( const XOBitmap& rXOBitmap ) const;
      66                 :            : 
      67                 :            :     void Bitmap2Array();
      68                 :            :     void Array2Bitmap();
      69                 :            : 
      70                 :            :     void SetGraphicObject( const GraphicObject& rObj )  { aGraphicObject = rObj; bGraphicDirty = sal_False; }
      71 [ +  - ][ +  - ]:        150 :     void SetBitmap( const Bitmap& rBmp )                { aGraphicObject = GraphicObject( Graphic( rBmp ) ); bGraphicDirty = sal_False; }
                 [ +  - ]
      72                 :        150 :     void SetBitmapType( XBitmapType eNewType )          { eType = eNewType; }
      73                 :          0 :     void SetBitmapStyle( XBitmapStyle eNewStyle )       { eStyle = eNewStyle; }
      74                 :            :     void SetPixelArray( const sal_uInt16* pArray );
      75                 :          0 :     void SetPixelSize( const Size& rSize )              { aArraySize  = rSize;  bGraphicDirty = sal_True; }
      76                 :          0 :     void SetPixelColor( const Color& rColor )           { aPixelColor = rColor; bGraphicDirty = sal_True; }
      77                 :          0 :     void SetBackgroundColor( const Color& rColor )      { aBckgrColor = rColor; bGraphicDirty = sal_True; }
      78                 :            : 
      79                 :          0 :     XBitmapType             GetBitmapType() const               { return eType; }
      80                 :          0 :     XBitmapStyle            GetBitmapStyle() const              { return eStyle; }
      81                 :            :     const GraphicObject&    GetGraphicObject() const;
      82                 :            :     Bitmap                  GetBitmap() const;
      83                 :          0 :     sal_uInt16*                 GetPixelArray() const               { return pPixelArray; }
      84                 :          0 :     Color                   GetPixelColor() const               { return aPixelColor; }
      85                 :          0 :     Color                   GetBackgroundColor() const          { return aBckgrColor; }
      86                 :            : };
      87                 :            : 
      88                 :            : #endif
      89                 :            : 
      90                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10