Added raw bitmap access support to GTK 2.0.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "wx/string.h"
|
||||
#include "wx/palette.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/rawbmp.h"
|
||||
|
||||
#ifdef __WXGTK20__
|
||||
typedef struct _GdkPixbuf GdkPixbuf;
|
||||
@@ -130,6 +131,11 @@ public:
|
||||
|
||||
// Basically, this corresponds to Win32 StretchBlt()
|
||||
wxBitmap Rescale( int clipx, int clipy, int clipwidth, int clipheight, int width, int height );
|
||||
|
||||
// raw bitmap access support functions
|
||||
void *GetRawData(wxPixelDataBase& data, int bpp);
|
||||
void UngetRawData(wxPixelDataBase& data);
|
||||
|
||||
protected:
|
||||
bool CreateFromXpm(const char **bits);
|
||||
bool CreateFromImage(const wxImage& image, int depth);
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include "wx/string.h"
|
||||
#include "wx/palette.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/rawbmp.h"
|
||||
|
||||
#ifdef __WXGTK20__
|
||||
typedef struct _GdkPixbuf GdkPixbuf;
|
||||
@@ -130,6 +131,11 @@ public:
|
||||
|
||||
// Basically, this corresponds to Win32 StretchBlt()
|
||||
wxBitmap Rescale( int clipx, int clipy, int clipwidth, int clipheight, int width, int height );
|
||||
|
||||
// raw bitmap access support functions
|
||||
void *GetRawData(wxPixelDataBase& data, int bpp);
|
||||
void UngetRawData(wxPixelDataBase& data);
|
||||
|
||||
protected:
|
||||
bool CreateFromXpm(const char **bits);
|
||||
bool CreateFromImage(const wxImage& image, int depth);
|
||||
|
@@ -160,6 +160,11 @@ typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxImagePixelFormat;
|
||||
// Cocoa is standard RGB or RGBA (normally it is RGBA)
|
||||
typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxNativePixelFormat;
|
||||
|
||||
#define wxPIXEL_FORMAT_ALPHA 3
|
||||
#elif defined(__WXGTK__)
|
||||
// Under GTK+ 2.X we use GdkPixbuf, which should be RGBA
|
||||
typedef wxPixelFormat<unsigned char, 24, 0, 1, 2> wxNativePixelFormat;
|
||||
|
||||
#define wxPIXEL_FORMAT_ALPHA 3
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user