GRAPHICS: New PixelBuffer::getRawBuffer(int) function.

This commit is contained in:
Giulio Camuffo 2012-01-24 19:02:34 +01:00
parent b42bbe5259
commit c73da71b2f

View File

@ -190,10 +190,15 @@ public:
* Return the internal buffer.
*/
inline byte *getRawBuffer() const { return _buffer; }
/**
* Return the internal buffer, pointing at the wanted pixel.
*/
inline byte *getRawBuffer(int pixel) const { return _buffer + _format.bytesPerPixel * pixel; }
/**
* Return the pixel format used.
*/
inline PixelFormat getFormat() const { return _format; }
inline const PixelFormat &getFormat() const { return _format; }
/**
* Copy a PixelBuffer object.