reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-06-07 18:49:33 +00:00
parent b40cb84f3f
commit 1e00fb2d66
9 changed files with 27 additions and 24 deletions

View File

@@ -774,8 +774,8 @@ def BitmapFromBuffer(width, height, dataBuffer, alphaBuffer=None):
expected to contain a series of RGB bytes and be width*height*3
bytes long. A buffer object can optionally be supplied for the
image's alpha channel data, and it is expected to be width*height
bytes long. On Windows the RGB values are 'premultiplied' by the
alpha values. (The other platforms do the multiplication
bytes long. On Windows and Mac the RGB values are 'premultiplied'
by the alpha values. (The other platforms do the multiplication
themselves.)
Unlike `wx.ImageFromBuffer` the bitmap created with this function
@@ -804,8 +804,8 @@ def BitmapFromBufferRGBA(width, height, dataBuffer):
parameter must be a Python object that implements the buffer
interface, such as a string, array, etc. The dataBuffer object is
expected to contain a series of RGBA bytes (red, green, blue and
alpha) and be width*height*4 bytes long. On Windows the RGB
values are 'premultiplied' by the alpha values. (The other
alpha) and be width*height*4 bytes long. On Windows and Mac the
RGB values are 'premultiplied' by the alpha values. (The other
platforms do the multiplication themselves.)
Unlike `wx.ImageFromBuffer` the bitmap created with this function

View File

@@ -2925,10 +2925,10 @@ SWIGINTERN bool wxPen___ne__(wxPen *self,wxPen const *other){ return other ? (*s
#include <wx/rawbmp.h>
// See http://tinyurl.com/e5adr for what premultiplying alpha means. It
// appears to me that the other platforms are already doing it, so I'll just
// automatically do it for wxMSW here.
#ifdef __WXMSW__
// See http://tinyurl.com/e5adr for what premultiplying alpha means. wxMSW and
// wxMac want to have the values premultiplied by the alpha value, but the
// other platforms don't. These macros help keep the code clean.
#if defined(__WXMSW__) || (defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS)
#define wxPy_premultiply(p, a) ((p) * (a) / 0xff)
#define wxPy_unpremultiply(p, a) ((a) ? ((p) * 0xff / (a)) : (p))
#else

View File

@@ -8175,6 +8175,7 @@ SWIGINTERN PyObject *_wrap_Thread_IsMain(PyObject *SWIGUNUSEDPARM(self), PyObjec
if (!SWIG_Python_UnpackTuple(args,"Thread_IsMain",0,0,0)) SWIG_fail;
{
if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)wxThread_IsMain();
wxPyEndAllowThreads(__tstate);

View File

@@ -777,8 +777,8 @@ def BitmapFromBuffer(width, height, dataBuffer, alphaBuffer=None):
expected to contain a series of RGB bytes and be width*height*3
bytes long. A buffer object can optionally be supplied for the
image's alpha channel data, and it is expected to be width*height
bytes long. On Windows the RGB values are 'premultiplied' by the
alpha values. (The other platforms do the multiplication
bytes long. On Windows and Mac the RGB values are 'premultiplied'
by the alpha values. (The other platforms do the multiplication
themselves.)
Unlike `wx.ImageFromBuffer` the bitmap created with this function
@@ -807,8 +807,8 @@ def BitmapFromBufferRGBA(width, height, dataBuffer):
parameter must be a Python object that implements the buffer
interface, such as a string, array, etc. The dataBuffer object is
expected to contain a series of RGBA bytes (red, green, blue and
alpha) and be width*height*4 bytes long. On Windows the RGB
values are 'premultiplied' by the alpha values. (The other
alpha) and be width*height*4 bytes long. On Windows and Mac the
RGB values are 'premultiplied' by the alpha values. (The other
platforms do the multiplication themselves.)
Unlike `wx.ImageFromBuffer` the bitmap created with this function

View File

@@ -2948,10 +2948,10 @@ SWIG_AsVal_short (PyObject * obj, short *val)
#include <wx/rawbmp.h>
// See http://tinyurl.com/e5adr for what premultiplying alpha means. It
// appears to me that the other platforms are already doing it, so I'll just
// automatically do it for wxMSW here.
#ifdef __WXMSW__
// See http://tinyurl.com/e5adr for what premultiplying alpha means. wxMSW and
// wxMac want to have the values premultiplied by the alpha value, but the
// other platforms don't. These macros help keep the code clean.
#if defined(__WXMSW__) || (defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS)
#define wxPy_premultiply(p, a) ((p) * (a) / 0xff)
#define wxPy_unpremultiply(p, a) ((a) ? ((p) * 0xff / (a)) : (p))
#else

View File

@@ -8167,6 +8167,7 @@ SWIGINTERN PyObject *_wrap_Thread_IsMain(PyObject *SWIGUNUSEDPARM(self), PyObjec
if (!SWIG_Python_UnpackTuple(args,"Thread_IsMain",0,0,0)) SWIG_fail;
{
if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)wxThread_IsMain();
wxPyEndAllowThreads(__tstate);

View File

@@ -799,8 +799,8 @@ def BitmapFromBuffer(width, height, dataBuffer, alphaBuffer=None):
expected to contain a series of RGB bytes and be width*height*3
bytes long. A buffer object can optionally be supplied for the
image's alpha channel data, and it is expected to be width*height
bytes long. On Windows the RGB values are 'premultiplied' by the
alpha values. (The other platforms do the multiplication
bytes long. On Windows and Mac the RGB values are 'premultiplied'
by the alpha values. (The other platforms do the multiplication
themselves.)
Unlike `wx.ImageFromBuffer` the bitmap created with this function
@@ -829,8 +829,8 @@ def BitmapFromBufferRGBA(width, height, dataBuffer):
parameter must be a Python object that implements the buffer
interface, such as a string, array, etc. The dataBuffer object is
expected to contain a series of RGBA bytes (red, green, blue and
alpha) and be width*height*4 bytes long. On Windows the RGB
values are 'premultiplied' by the alpha values. (The other
alpha) and be width*height*4 bytes long. On Windows and Mac the
RGB values are 'premultiplied' by the alpha values. (The other
platforms do the multiplication themselves.)
Unlike `wx.ImageFromBuffer` the bitmap created with this function

View File

@@ -2925,10 +2925,10 @@ SWIGINTERN bool wxPen___ne__(wxPen *self,wxPen const *other){ return other ? (*s
#include <wx/rawbmp.h>
// See http://tinyurl.com/e5adr for what premultiplying alpha means. It
// appears to me that the other platforms are already doing it, so I'll just
// automatically do it for wxMSW here.
#ifdef __WXMSW__
// See http://tinyurl.com/e5adr for what premultiplying alpha means. wxMSW and
// wxMac want to have the values premultiplied by the alpha value, but the
// other platforms don't. These macros help keep the code clean.
#if defined(__WXMSW__) || (defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS)
#define wxPy_premultiply(p, a) ((p) * (a) / 0xff)
#define wxPy_unpremultiply(p, a) ((a) ? ((p) * 0xff / (a)) : (p))
#else

View File

@@ -8167,6 +8167,7 @@ SWIGINTERN PyObject *_wrap_Thread_IsMain(PyObject *SWIGUNUSEDPARM(self), PyObjec
if (!SWIG_Python_UnpackTuple(args,"Thread_IsMain",0,0,0)) SWIG_fail;
{
if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)wxThread_IsMain();
wxPyEndAllowThreads(__tstate);