public final class POffscreenCanvas extends Object implements PComponent
Modifier and Type | Field and Description |
---|---|
(package private) static int |
DEFAULT_RENDER_QUALITY
Default render quality,
PPaintContext.HIGH_QUALITY_RENDERING . |
Constructor and Description |
---|
POffscreenCanvas(int width,
int height)
Create a new offscreen canvas the specified width and height.
|
Modifier and Type | Method and Description |
---|---|
PCamera |
getCamera()
Return the camera for this offscreen canvas.
|
int |
getRenderQuality()
Return the render quality hint for this offscreen canvas.
|
void |
paintImmediately()
Sends a repaint notification the repaint manager if PComponent is not
already painting immediately.
|
void |
popCursor()
Pops the topmost cursor from the stack and sets it as the current one.
|
void |
pushCursor(Cursor cursor)
Pushes the given cursor onto the cursor stack and sets the current cursor
to the one provided.
|
void |
render(Graphics2D graphics)
Render this offscreen canvas to the specified graphics.
|
void |
repaint(PBounds repaintBounds)
Called to notify PComponent that given bounds need repainting.
|
void |
setCamera(PCamera camera)
Set the camera for this offscreen canvas to
camera . |
void |
setInteracting(boolean interacting)
Sets whether the component is currently being interacted with.
|
void |
setRenderQuality(int renderQuality)
Set the render quality hint for this offscreen canvas to
renderQuality . |
static final int DEFAULT_RENDER_QUALITY
PPaintContext.HIGH_QUALITY_RENDERING
.public POffscreenCanvas(int width, int height)
width
- width of this offscreen canvas, must be at least zeroheight
- height of this offscreen canvas, must be at least zeropublic void render(Graphics2D graphics)
graphics
- graphics to render this offscreen canvas to, must not be
nullpublic void setCamera(PCamera camera)
camera
.camera
- camera for this offscreen canvaspublic PCamera getCamera()
public void setRenderQuality(int renderQuality)
renderQuality
.renderQuality
- render quality hint, must be one of
PPaintContext.HIGH_QUALITY_RENDERING
or
PPaintContext.LOW_QUALITY_RENDERING
public int getRenderQuality()
public void paintImmediately()
paintImmediately
in interface PComponent
public void popCursor()
popCursor
in interface PComponent
public void pushCursor(Cursor cursor)
pushCursor
in interface PComponent
cursor
- The cursor to set as the current one and pushpublic void repaint(PBounds repaintBounds)
repaint
in interface PComponent
repaintBounds
- bounds needing repaintpublic void setInteracting(boolean interacting)
setInteracting
in interface PComponent
interacting
- whether the component is currently being interacted
withCopyright © 1995-2013 Piccolo2D. All Rights Reserved.