#include <wx/rawbmp.h>
A class template with ready to use implementations for getting direct and efficient access to wxBitmap's internal data and wxImage's internal data through a standard interface.
It is possible to extend this class (interface) to other types of image content.
Implemented on Windows, GTK+ and OS X:
Implemented everywhere:
Example:
Classes | |
class | Iterator |
The iterator of class wxPixelData. More... | |
Public Types | |
typedef Image | ImageType |
The type of the class we're working with. | |
Public Member Functions | |
wxPixelData (Image &image) | |
Create pixel data object representing the entire image. | |
wxPixelData (Image &i, const wxRect &rect) | |
Create pixel data object representing the area of the image defined by rect. | |
wxPixelData (Image &i, const wxPoint &pt, const wxSize &sz) | |
Create pixel data object representing the area of the image defined by pt and sz. | |
operator bool () const | |
Return true of if we could get access to bitmap data successfully. | |
Iterator | GetPixels () const |
Return the iterator pointing to the origin of the image. | |
wxPoint | GetOrigin () const |
Returns origin of the rectangular region this wxPixelData represents. | |
int | GetWidth () const |
Return width of the region this wxPixelData represents. | |
int | GetHeight () const |
Return height of the region this wxPixelData represents. | |
wxSize | GetSize () const |
Return the area which this wxPixelData represents in the image. | |
int | GetRowStride () const |
Return the distance between two rows. | |
typedef Image wxPixelData< Image, PixelFormat >::ImageType |
The type of the class we're working with.
wxPixelData< Image, PixelFormat >::wxPixelData | ( | Image & | image | ) |
Create pixel data object representing the entire image.
wxPixelData< Image, PixelFormat >::wxPixelData | ( | Image & | i, |
const wxRect & | rect | ||
) |
Create pixel data object representing the area of the image defined by rect.
wxPixelData< Image, PixelFormat >::wxPixelData | ( | Image & | i, |
const wxPoint & | pt, | ||
const wxSize & | sz | ||
) |
Create pixel data object representing the area of the image defined by pt and sz.
int wxPixelData< Image, PixelFormat >::GetHeight | ( | ) | const |
Return height of the region this wxPixelData represents.
wxPoint wxPixelData< Image, PixelFormat >::GetOrigin | ( | ) | const |
Returns origin of the rectangular region this wxPixelData represents.
Iterator wxPixelData< Image, PixelFormat >::GetPixels | ( | ) | const |
Return the iterator pointing to the origin of the image.
int wxPixelData< Image, PixelFormat >::GetRowStride | ( | ) | const |
Return the distance between two rows.
wxSize wxPixelData< Image, PixelFormat >::GetSize | ( | ) | const |
Return the area which this wxPixelData represents in the image.
int wxPixelData< Image, PixelFormat >::GetWidth | ( | ) | const |
Return width of the region this wxPixelData represents.
wxPixelData< Image, PixelFormat >::operator bool | ( | ) | const |
Return true of if we could get access to bitmap data successfully.