de.matthiasmann.twl.renderer
Interface OffscreenRenderer


public interface OffscreenRenderer

An interface to allow offscreen rendering for special effects


Method Summary
 void endOffscreenRendering()
          Ends the current offscreen rendering.
 OffscreenSurface startOffscreenRendering(Widget widget, OffscreenSurface oldSurface, int x, int y, int width, int height)
          Starts offscreen rendering.
 

Method Detail

startOffscreenRendering

OffscreenSurface startOffscreenRendering(Widget widget,
                                         OffscreenSurface oldSurface,
                                         int x,
                                         int y,
                                         int width,
                                         int height)
Starts offscreen rendering. All following rendering operations will render into the returned offscreen surface. Rendering outside the specified area will be ignored.

Parameters:
widget - the widget which will render to the returned surface - can be null.
oldSurface - the previous offscreen surface to reuse / overwrite
x - the X coordinate of the region, can be negative.
y - the Y coordinate of the region, can be negative.
width - the width, can be larger then the screen size
height - the height, can be larger then the screen size
Returns:
the OffscreenSurface or null if offscreen rendering could not be started.

endOffscreenRendering

void endOffscreenRendering()
Ends the current offscreen rendering. Only call this method after a sucessful call of #startOffscreenRendering(de.matthiasmann.twl.renderer.OffscreenSurface, int, int, int, int)