Add convenience functions to ModifiablePixelBuffer
Allows you to modify the buffer with data in a
different pixel format.
diff --git a/common/rfb/PixelBuffer.h b/common/rfb/PixelBuffer.h
index e2cc3e9..7060a01 100644
--- a/common/rfb/PixelBuffer.h
+++ b/common/rfb/PixelBuffer.h
@@ -137,6 +137,13 @@
// pixel is the Pixel value to be used where mask_ is set
void maskRect(const Rect& r, Pixel pixel, const void* mask_);
+ // Render in a specific format
+ // Does the exact same thing as the above methods, but the given
+ // pixel values are defined by the given PixelFormat.
+ void fillRect(const PixelFormat& pf, const Rect &dest, Pixel pix);
+ void imageRect(const PixelFormat& pf, const Rect &dest,
+ const void* pixels, int stride=0);
+
protected:
ModifiablePixelBuffer();
};