X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b6d5d4548c2c8b984314650dcb96522fedc51d86..11c5b47d9454915aa790ded6cf03613b9e2df12c:/include/wx/rawbmp.h diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h index 4edf2cd974..105c85714c 100644 --- a/include/wx/rawbmp.h +++ b/include/wx/rawbmp.h @@ -154,6 +154,11 @@ typedef wxPixelFormat wxImagePixelFormat; typedef wxPixelFormat wxNativePixelFormat; #define wxPIXEL_FORMAT_ALPHA 0 +#elif defined(__WXCOCOA__) + // Cocoa is standard RGB or RGBA (normally it is RGBA) + typedef wxPixelFormat wxNativePixelFormat; + + #define wxPIXEL_FORMAT_ALPHA 3 #endif // the (most common) native format for bitmaps with alpha channel @@ -196,6 +201,8 @@ public: int GetWidth() const { return m_width; } int GetHeight() const { return m_height; } + wxSize GetSize() const { return wxSize(m_width, m_height); } + // the distance between two rows int GetRowStride() const { return m_stride; } @@ -567,10 +574,9 @@ struct WXDLLEXPORT wxPixelDataOut // private: -- see comment in the beginning of the file - // NB: for efficiency reasons this class must *not* have any other - // fields, otherwise it won't be put into a CPU register (as it - // should inside the inner loops) by some compilers, notably - // gcc + // for efficiency reasons this class should not have any other + // fields, otherwise it won't be put into a CPU register (as it + // should inside the inner loops) by some compilers, notably gcc ChannelType *m_ptr; }; @@ -585,7 +591,7 @@ struct WXDLLEXPORT wxPixelDataOut wxPixelDataIn(wxBitmap& bmp, const wxRect& rect) : m_bmp(bmp), m_pixels(bmp, *this) { - InitRect(rect.GetPositions(), rect.GetSize()); + InitRect(rect.GetPosition(), rect.GetSize()); } wxPixelDataIn(wxBitmap& bmp, const wxPoint& pt, const wxSize& sz)