1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
31 #include <tools/gen.hxx>
33 #include <vcl/salbmp.hxx>
47 class Os2SalBitmap
: public SalBitmap
59 HANDLE
ImplGethDIB() const { return mhDIB
; }
60 HBITMAP
ImplGethDDB() const { return mhDDB
; }
61 HANDLE
ImplGethDIB1Subst() const { return mhDIB1Subst
; }
63 void ImplReplacehDIB1Subst( HANDLE hDIB1Subst
);
65 static HANDLE
ImplCreateDIB( const Size
& rSize
, USHORT nBitCount
, const BitmapPalette
& rPal
);
66 static HANDLE
ImplCreateDIB4FromDIB1( HANDLE hDIB1
);
67 static HANDLE
ImplCopyDIBOrDDB( HANDLE hHdl
, BOOL bDIB
);
68 static USHORT
ImplGetDIBColorCount( HANDLE hDIB
);
69 static void ImplDecodeRLEBuffer( const BYTE
* pSrcBuf
, BYTE
* pDstBuf
,
70 const Size
& rSizePixel
, BOOL bRLE4
);
72 //BOOL Create( HANDLE hBitmap, BOOL bDIB, BOOL bCopyHandle );
81 //BOOL Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
82 //BOOL Create( const SalBitmap& rSalBmpImpl );
83 //BOOL Create( const SalBitmap& rSalBmpImpl, SalGraphics* pGraphics );
84 //BOOL Create( const SalBitmap& rSalBmpImpl, USHORT nNewBitCount );
88 //Size GetSize() const { return maSize; }
89 //USHORT GetBitCount() const { return mnBitCount; }
91 //BitmapBuffer* AcquireBuffer( bool bReadOnly );
92 //void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
93 bool Create( HANDLE hBitmap
, bool bDIB
, bool bCopyHandle
);
94 virtual bool Create( const Size
& rSize
, USHORT nBitCount
, const BitmapPalette
& rPal
);
95 virtual bool Create( const SalBitmap
& rSalBmpImpl
);
96 virtual bool Create( const SalBitmap
& rSalBmpImpl
, SalGraphics
* pGraphics
);
97 virtual bool Create( const SalBitmap
& rSalBmpImpl
, USHORT nNewBitCount
);
99 virtual void Destroy();
101 virtual Size
GetSize() const { return maSize
; }
102 virtual USHORT
GetBitCount() const { return mnBitCount
; }
104 virtual BitmapBuffer
* AcquireBuffer( bool bReadOnly
);
105 virtual void ReleaseBuffer( BitmapBuffer
* pBuffer
, bool bReadOnly
);
106 virtual bool GetSystemData( BitmapSystemData
& rData
);
109 #endif // _SV_SALBMP_H