|
Awesomium
1.7.0 RC3
|
This interface can be used to provide your own Surface implementation to directly handle paint and pixel-scroll events for all offscreen WebViews. More...
#include <Surface.h>
Public Member Functions | |
| virtual void | Paint (unsigned char *src_buffer, int src_row_span, const Awesomium::Rect &src_rect, const Awesomium::Rect &dest_rect)=0 |
| virtual void | Scroll (int dx, int dy, const Awesomium::Rect &clip_rect)=0 |
This interface can be used to provide your own Surface implementation to directly handle paint and pixel-scroll events for all offscreen WebViews.
You should use this by defining your own SurfaceFactory that creates your specific Surface implementation.
|
pure virtual |
This event is called whenever the WebView wants to paint a certain section of the Surface with a block of pixels. It is your responsibility to copy src_buffer to the location in this Surface specified by dest_rect.
| src_buffer | A pointer to a block of pixels in 32-bit BGRA format. Size of the buffer is src_row_span * src_rect.height. Beware that src_buffer points to the beginning of the transport buffer, you should use src_rect to determine the offset to begin copying pixels from. |
| src_row_span | The number of bytes of each row. (Usually src_rect.width * 4) |
| src_rect | The dimensions of the region of src_buffer to copy from. May have a non-zero origin. |
| dest_rect | The location to copy src_buffer to. Always has same dimensions as src_rect but may have different origin (which specifies the offset of the section to copy to). |
Implemented in Awesomium::BitmapSurface.
|
pure virtual |
This event is called whenever the WebView wants to 'scroll' an existing section of the Surface by a certain offset. It your responsibility to translate the pixels within the specified clipping rectangle by the specified offset.
| dx | The amount of pixels to offset vertically. |
| dy | The amount of pixels to offset vertically. |
| clip_rect | The rectangle that this operation should be clipped to. |
Implemented in Awesomium::BitmapSurface.