1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-11-24 07:30:56 -05:00
|
|
|
// Name: wx/msw/dib.h
|
1998-05-20 10:12:05 -04:00
|
|
|
// Purpose: Routines for loading and saving DIBs
|
|
|
|
// Author: Various
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
1999-11-24 07:30:56 -05:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-10-24 15:50:17 -04:00
|
|
|
#ifndef _WX_DIB_H_
|
|
|
|
#define _WX_DIB_H_
|
|
|
|
|
1999-11-12 09:50:44 -05:00
|
|
|
class WXDLLEXPORT wxBitmap;
|
1999-11-24 07:30:56 -05:00
|
|
|
class WXDLLEXPORT wxPalette;
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Functions for working with DIBs
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// VZ: we have 3 different sets of functions: from bitmap.cpp (wxCreateDIB and
|
|
|
|
// wxFreeDIB), from dib.cpp and from dataobj.cpp - surely there is some
|
|
|
|
// redundancy between them? (FIXME)
|
|
|
|
|
|
|
|
// defined in bitmap.cpp
|
|
|
|
extern bool wxCreateDIB(long xSize, long ySize, long bitsPerPixel,
|
|
|
|
HPALETTE hPal, LPBITMAPINFO* lpDIBHeader);
|
|
|
|
extern void wxFreeDIB(LPBITMAPINFO lpDIBHeader);
|
|
|
|
|
|
|
|
// defined in ole/dataobj.cpp
|
|
|
|
extern size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap);
|
|
|
|
extern wxBitmap wxConvertDIBToBitmap(const LPBITMAPINFO pbi);
|
|
|
|
|
|
|
|
// the rest is defined in dib.cpp
|
1999-11-12 09:50:44 -05:00
|
|
|
|
1998-05-20 10:12:05 -04:00
|
|
|
// Save (device dependent) wxBitmap as a DIB
|
1999-11-24 07:30:56 -05:00
|
|
|
bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette *colourmap = NULL);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
// Load device independent bitmap into device dependent bitmap
|
1999-11-26 10:26:26 -05:00
|
|
|
wxBitmap *wxLoadBitmap(wxChar *filename, wxPalette **colourmap = NULL);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
// Load into existing bitmap;
|
1999-11-26 11:29:54 -05:00
|
|
|
bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette **pal = NULL);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-10-04 07:39:13 -04:00
|
|
|
HANDLE wxBitmapToDIB (HBITMAP hBitmap, HPALETTE hPal);
|
|
|
|
BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette);
|
|
|
|
HANDLE wxReadDIB2(LPTSTR lpFileName);
|
|
|
|
LPSTR wxFindDIBBits (LPSTR lpbi);
|
|
|
|
HPALETTE wxMakeDIBPalette(LPBITMAPINFOHEADER lpInfo);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
#endif // _WX_DIB_H_
|
1999-10-24 15:50:17 -04:00
|
|
|
|