support for using DIBs for wxBitmap implementation (patch 649866)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18524 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-01-02 23:28:56 +00:00
parent f178ab7e82
commit 0becd47010
5 changed files with 326 additions and 105 deletions

View File

@@ -63,6 +63,10 @@ public:
// optional mask for transparent drawing
wxMask *m_bitmapMask;
#if wxUSE_DIB_FOR_BITMAP
WXHANDLE m_hFileMap; // file mapping handle for large DIB's
#endif
};
// ----------------------------------------------------------------------------
@@ -177,6 +181,11 @@ public:
void SetHBITMAP(WXHBITMAP bmp) { SetHandle((WXHANDLE)bmp); }
WXHBITMAP GetHBITMAP() const { return (WXHBITMAP)GetHandle(); }
#if wxUSE_DIB_FOR_BITMAP
void SetHFileMap(WXHANDLE hFileMap) { GetBitmapData()->m_hFileMap = hFileMap; }
WXHANDLE GetHFileMap() const { return GetBitmapData()->m_hFileMap; }
#endif // wxUSE_DIB_FOR_BITMAP
void SetSelectedInto(wxDC *dc) { if (GetBitmapData()) GetBitmapData()->m_selectedInto = dc; }
wxDC *GetSelectedInto() const { return (GetBitmapData() ? GetBitmapData()->m_selectedInto : (wxDC*) NULL); }
@@ -209,6 +218,11 @@ protected:
bool CreateFromImage(const wxImage& image, int depth);
#endif // wxUSE_IMAGE
#if wxUSE_DIB_FOR_BITMAP
void *CreateDIB(int width, int height, int depth);
void CopyDIBLine(void* src, void* dest, int count) const;
#endif
private:
#ifdef __WIN32__
// common part of CopyFromIcon/CopyFromCursor for Win32