RenderGraphicspublic class RenderGraphics extends PiscesRenderGraphics All rendering in Perseus is done through the RenderGraphics class.
RenderGraphics is the combination of the traditional
Graphics2D API to the rendering engine and the notion of
graphical context found in SVG.
A RenderGraphics object proxies invocation to a Graphics2D
instance through its draw or fill method while capturing
the current rendering context state by implementing the
RenderContext interface.
Note A: the Java 2D graphic context values passed by the
RenderGraphics to the proxied Graphics2D correspond to
the CSS 2
actual values.
Note B: the initial values for the context properties (such
as color or fill) correspond to the CSS 2
initial values for these properties. |
Constructors Summary |
---|
public RenderGraphics(com.sun.pisces.PiscesRenderer pr, int width, int height)Constructs a new RenderGraphics which will delegate painting
operations to a Graphics2D built for the input
BufferedImage.
super(pr, width, height);
|
Methods Summary |
---|
public void | clearRect(int x, int y, int width, int height, RGB clearColor)Clears the specified rectangle. IMPORTANT NOTE: the coordinates are in
device space. This method does not account for the current transformation
set on the RenderGraphics. It operates on the target pixels.
pr.setColor(clearColor.getRed(),
clearColor.getGreen(),
clearColor.getBlue(),
clearColor.getAlpha());
pr.clearRect(x, y, width, height);
|
|