edu.umd.cs.piccolo.util
Class PPaintContext

java.lang.Object
  extended by edu.umd.cs.piccolo.util.PPaintContext

public class PPaintContext
extends java.lang.Object

PPaintContext is used by piccolo nodes to paint themselves on the screen. PPaintContext wraps a Graphics2D to implement painting.

Version:
1.0
Author:
Jesse Grosjean

Field Summary
protected  PStack cameraStack
           
protected  PStack clipStack
           
protected  PStack compositeStack
           
static PPaintContext CURRENT_PAINT_CONTEXT
           
static int HIGH_QUALITY_RENDERING
           
protected  PStack localClipStack
           
static int LOW_QUALITY_RENDERING
           
static java.awt.font.FontRenderContext RENDER_QUALITY_HIGH_FRC
           
static java.awt.font.FontRenderContext RENDER_QUALITY_LOW_FRC
           
protected  int renderQuality
           
protected  PStack transformStack
           
 
Constructor Summary
PPaintContext(java.awt.Graphics2D aGraphics)
           
 
Method Summary
 PCamera getCamera()
           
 java.awt.Graphics2D getGraphics()
           
 java.awt.geom.Rectangle2D getLocalClip()
           
 int getRenderQuality()
          Return the render quality used by this paint context.
 double getScale()
           
 void popCamera(PCamera aCamera)
           
 void popClip(java.awt.Shape aClip)
           
 void popTransform(PAffineTransform aTransform)
           
 void popTransparency(float transparency)
           
 void pushCamera(PCamera aCamera)
           
 void pushClip(java.awt.Shape aClip)
           
 void pushTransform(PAffineTransform aTransform)
           
 void pushTransparency(float transparency)
           
 void setRenderQuality(int requestedQuality)
          Set the rendering hints for this paint context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOW_QUALITY_RENDERING

public static final int LOW_QUALITY_RENDERING
See Also:
Constant Field Values

HIGH_QUALITY_RENDERING

public static final int HIGH_QUALITY_RENDERING
See Also:
Constant Field Values

RENDER_QUALITY_LOW_FRC

public static java.awt.font.FontRenderContext RENDER_QUALITY_LOW_FRC

RENDER_QUALITY_HIGH_FRC

public static java.awt.font.FontRenderContext RENDER_QUALITY_HIGH_FRC

CURRENT_PAINT_CONTEXT

public static PPaintContext CURRENT_PAINT_CONTEXT

compositeStack

protected PStack compositeStack

clipStack

protected PStack clipStack

localClipStack

protected PStack localClipStack

cameraStack

protected PStack cameraStack

transformStack

protected PStack transformStack

renderQuality

protected int renderQuality
Constructor Detail

PPaintContext

public PPaintContext(java.awt.Graphics2D aGraphics)
Method Detail

getGraphics

public java.awt.Graphics2D getGraphics()

getLocalClip

public java.awt.geom.Rectangle2D getLocalClip()

getScale

public double getScale()

pushCamera

public void pushCamera(PCamera aCamera)

popCamera

public void popCamera(PCamera aCamera)

getCamera

public PCamera getCamera()

pushClip

public void pushClip(java.awt.Shape aClip)

popClip

public void popClip(java.awt.Shape aClip)

pushTransparency

public void pushTransparency(float transparency)

popTransparency

public void popTransparency(float transparency)

pushTransform

public void pushTransform(PAffineTransform aTransform)

popTransform

public void popTransform(PAffineTransform aTransform)

getRenderQuality

public int getRenderQuality()
Return the render quality used by this paint context.


setRenderQuality

public void setRenderQuality(int requestedQuality)
Set the rendering hints for this paint context. The render quality is most often set by the rendering PCanvas. Use PCanvas.setRenderQuality() and PCanvas.setInteractingRenderQuality() to set these values.

Parameters:
requestedQuality - supports PPaintContext.HIGH_QUALITY_RENDERING or PPaintContext.LOW_QUALITY_RENDERING


Copyright 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.

Web Accessibility