Top Description Inners Fields Constructors Methods
sun.java2d.pipe

public abstract Class BufferedRenderPipe

extends Object
implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, ParallelogramPipe
Class Inheritance
All Implemented Interfaces
sun.java2d.pipe.ParallelogramPipe, sun.java2d.pipe.ShapeDrawPipe, sun.java2d.pipe.PixelFillPipe, sun.java2d.pipe.PixelDrawPipe
Known Direct Subclasses
sun.java2d.opengl.OGLRenderer
Imports
java.awt.BasicStroke, .Polygon, .Shape, java.awt.geom.AffineTransform, .Arc2D, .Ellipse2D, .Path2D, .IllegalPathStateException, .PathIterator, .Rectangle2D, .RoundRectangle2D, sun.java2d.SunGraphics2D, sun.java2d.loops.ProcessPath

Base class for enqueuing rendering operations in a single-threaded rendering environment. Instead of each operation being rendered immediately by the underlying graphics library, the operation will be added to the provided RenderQueue, which will be processed at a later time by a single thread. This class provides implementations of drawLine(), drawRect(), drawPoly(), fillRect(), draw(Shape), and fill(Shape), which are useful for a hardware-accelerated renderer. The other draw*() and fill*() methods simply delegate to draw(Shape) and fill(Shape), respectively.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
pack-priv ParallelogramPipe
protected RenderBuffer
pack-priv static final int
pack-priv static final int
pack-priv static final int
private BufferedRenderPipe.BufferedDrawHandler
protected RenderQueue

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
drawArc(SunGraphics2D sg2d, int x, int y, int width, int height, int startAngle, int arcAngle)

Implements sun.java2d.pipe.PixelDrawPipe.drawArc.

public void
drawLine(SunGraphics2D sg2d, int x1, int y1, int x2, int y2)

Implements sun.java2d.pipe.PixelDrawPipe.drawLine.

public void
drawOval(SunGraphics2D sg2d, int x, int y, int width, int height)

Implements sun.java2d.pipe.PixelDrawPipe.drawOval.

public void
drawParallelogram(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2, double x, double y, double dx1, double dy1, double dx2, double dy2, double lw1, double lw2)

Implements sun.java2d.pipe.ParallelogramPipe.drawParallelogram.

Draw a Parallelogram with the indicated line widths assuming a standard BasicStroke with MITER joins.

protected void
drawPath(SunGraphics2D sg2d, Path2D.Float p2df, int transx, int transy)

protected void
drawPoly(final SunGraphics2D sg2d, final int[] xPoints, final int[] yPoints, final int nPoints, final boolean isClosed)

protected abstract void
drawPoly(int[] xPoints, int[] yPoints, int nPoints, boolean isClosed, int transX, int transY)

public void
drawPolygon(SunGraphics2D sg2d, int[] xPoints, int[] yPoints, int nPoints)

Implements sun.java2d.pipe.PixelDrawPipe.drawPolygon.

public void
drawPolyline(SunGraphics2D sg2d, int[] xPoints, int[] yPoints, int nPoints)

Implements sun.java2d.pipe.PixelDrawPipe.drawPolyline.

public void
drawRect(SunGraphics2D sg2d, int x, int y, int width, int height)

Implements sun.java2d.pipe.PixelDrawPipe.drawRect.

public void
drawRoundRect(SunGraphics2D sg2d, int x, int y, int width, int height, int arcWidth, int arcHeight)

Implements sun.java2d.pipe.PixelDrawPipe.drawRoundRect.

public void
public void
fillArc(SunGraphics2D sg2d, int x, int y, int width, int height, int startAngle, int arcAngle)

Implements sun.java2d.pipe.PixelFillPipe.fillArc.

public void
fillOval(SunGraphics2D sg2d, int x, int y, int width, int height)

Implements sun.java2d.pipe.PixelFillPipe.fillOval.

public void
fillParallelogram(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2, double x, double y, double dx1, double dy1, double dx2, double dy2)

Implements sun.java2d.pipe.ParallelogramPipe.fillParallelogram.

protected void
fillPath(SunGraphics2D sg2d, Path2D.Float p2df, int transx, int transy)

public void
fillPolygon(SunGraphics2D sg2d, int[] xPoints, int[] yPoints, int nPoints)

Implements sun.java2d.pipe.PixelFillPipe.fillPolygon.

public void
fillRect(SunGraphics2D sg2d, int x, int y, int width, int height)

Implements sun.java2d.pipe.PixelFillPipe.fillRect.

public void
fillRoundRect(SunGraphics2D sg2d, int x, int y, int width, int height, int arcWidth, int arcHeight)

Implements sun.java2d.pipe.PixelFillPipe.fillRoundRect.

private native int
fillSpans(RenderQueue rq, long buf, int pos, int limit, SpanIterator si, long iterator, int transx, int transy)

protected void
fillSpans(SunGraphics2D sg2d, SpanIterator si, int transx, int transy)

public ParallelogramPipe
protected abstract void
validateContext(SunGraphics2D sg2d)

Validates the state in the provided SunGraphics2D object and sets up any special resources for this operation (e.g. enabling gradient shading).

protected abstract void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aapgrampipeback to summary
pack-priv ParallelogramPipe aapgrampipe
bufback to summary
protected RenderBuffer buf
BYTES_PER_POLY_POINTback to summary
pack-priv static final int BYTES_PER_POLY_POINT
BYTES_PER_SCANLINEback to summary
pack-priv static final int BYTES_PER_SCANLINE
BYTES_PER_SPANback to summary
pack-priv static final int BYTES_PER_SPAN
drawHandlerback to summary
private BufferedRenderPipe.BufferedDrawHandler drawHandler
rqback to summary
protected RenderQueue rq

Constructor Detail

BufferedRenderPipeback to summary
public BufferedRenderPipe(RenderQueue rq)

Method Detail

drawback to summary
public void draw(SunGraphics2D sg2d, Shape s)

Implements sun.java2d.pipe.ShapeDrawPipe.draw.

drawArcback to summary
public void drawArc(SunGraphics2D sg2d, int x, int y, int width, int height, int startAngle, int arcAngle)

Implements sun.java2d.pipe.PixelDrawPipe.drawArc.

drawLineback to summary
public void drawLine(SunGraphics2D sg2d, int x1, int y1, int x2, int y2)

Implements sun.java2d.pipe.PixelDrawPipe.drawLine.

drawOvalback to summary
public void drawOval(SunGraphics2D sg2d, int x, int y, int width, int height)

Implements sun.java2d.pipe.PixelDrawPipe.drawOval.

drawParallelogramback to summary
public void drawParallelogram(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2, double x, double y, double dx1, double dy1, double dx2, double dy2, double lw1, double lw2)

Implements sun.java2d.pipe.ParallelogramPipe.drawParallelogram.

Doc from sun.java2d.pipe.ParallelogramPipe.drawParallelogram.

Draw a Parallelogram with the indicated line widths assuming a standard BasicStroke with MITER joins. lw1 specifies the width of the stroke along the dx1,dy1 vector and lw2 specifies the width of the stroke along the dx2,dy2 vector. This is equivalent to outsetting the indicated parallelogram by lw/2 pixels, then insetting the same parallelogram by lw/2 pixels and filling the difference between the outer and inner parallelograms.

drawPathback to summary
protected void drawPath(SunGraphics2D sg2d, Path2D.Float p2df, int transx, int transy)
drawPolyback to summary
protected void drawPoly(final SunGraphics2D sg2d, final int[] xPoints, final int[] yPoints, final int nPoints, final boolean isClosed)
drawPolyback to summary
protected abstract void drawPoly(int[] xPoints, int[] yPoints, int nPoints, boolean isClosed, int transX, int transY)
drawPolygonback to summary
public void drawPolygon(SunGraphics2D sg2d, int[] xPoints, int[] yPoints, int nPoints)

Implements sun.java2d.pipe.PixelDrawPipe.drawPolygon.

drawPolylineback to summary
public void drawPolyline(SunGraphics2D sg2d, int[] xPoints, int[] yPoints, int nPoints)

Implements sun.java2d.pipe.PixelDrawPipe.drawPolyline.

drawRectback to summary
public void drawRect(SunGraphics2D sg2d, int x, int y, int width, int height)

Implements sun.java2d.pipe.PixelDrawPipe.drawRect.

drawRoundRectback to summary
public void drawRoundRect(SunGraphics2D sg2d, int x, int y, int width, int height, int arcWidth, int arcHeight)

Implements sun.java2d.pipe.PixelDrawPipe.drawRoundRect.

fillback to summary
public void fill(SunGraphics2D sg2d, Shape s)

Implements sun.java2d.pipe.ShapeDrawPipe.fill.

fillArcback to summary
public void fillArc(SunGraphics2D sg2d, int x, int y, int width, int height, int startAngle, int arcAngle)

Implements sun.java2d.pipe.PixelFillPipe.fillArc.

fillOvalback to summary
public void fillOval(SunGraphics2D sg2d, int x, int y, int width, int height)

Implements sun.java2d.pipe.PixelFillPipe.fillOval.

fillParallelogramback to summary
public void fillParallelogram(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2, double x, double y, double dx1, double dy1, double dx2, double dy2)

Implements sun.java2d.pipe.ParallelogramPipe.fillParallelogram.

fillPathback to summary
protected void fillPath(SunGraphics2D sg2d, Path2D.Float p2df, int transx, int transy)
fillPolygonback to summary
public void fillPolygon(SunGraphics2D sg2d, int[] xPoints, int[] yPoints, int nPoints)

Implements sun.java2d.pipe.PixelFillPipe.fillPolygon.

fillRectback to summary
public void fillRect(SunGraphics2D sg2d, int x, int y, int width, int height)

Implements sun.java2d.pipe.PixelFillPipe.fillRect.

fillRoundRectback to summary
public void fillRoundRect(SunGraphics2D sg2d, int x, int y, int width, int height, int arcWidth, int arcHeight)

Implements sun.java2d.pipe.PixelFillPipe.fillRoundRect.

fillSpansback to summary
private native int fillSpans(RenderQueue rq, long buf, int pos, int limit, SpanIterator si, long iterator, int transx, int transy)
fillSpansback to summary
protected void fillSpans(SunGraphics2D sg2d, SpanIterator si, int transx, int transy)
getAAParallelogramPipeback to summary
public ParallelogramPipe getAAParallelogramPipe()
validateContextback to summary
protected abstract void validateContext(SunGraphics2D sg2d)

Validates the state in the provided SunGraphics2D object and sets up any special resources for this operation (e.g. enabling gradient shading).

validateContextAAback to summary
protected abstract void validateContextAA(SunGraphics2D sg2d)
sun.java2d.pipe back to summary

private Class BufferedRenderPipe.AAParallelogramPipe

extends Object
implements ParallelogramPipe
Class Inheritance
All Implemented Interfaces
sun.java2d.pipe.ParallelogramPipe

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
drawParallelogram(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2, double x, double y, double dx1, double dy1, double dx2, double dy2, double lw1, double lw2)

Implements sun.java2d.pipe.ParallelogramPipe.drawParallelogram.

Draw a Parallelogram with the indicated line widths assuming a standard BasicStroke with MITER joins.

public void
fillParallelogram(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2, double x, double y, double dx1, double dy1, double dx2, double dy2)

Implements sun.java2d.pipe.ParallelogramPipe.fillParallelogram.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AAParallelogramPipeback to summary
private AAParallelogramPipe()

Method Detail

drawParallelogramback to summary
public void drawParallelogram(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2, double x, double y, double dx1, double dy1, double dx2, double dy2, double lw1, double lw2)

Implements sun.java2d.pipe.ParallelogramPipe.drawParallelogram.

Doc from sun.java2d.pipe.ParallelogramPipe.drawParallelogram.

Draw a Parallelogram with the indicated line widths assuming a standard BasicStroke with MITER joins. lw1 specifies the width of the stroke along the dx1,dy1 vector and lw2 specifies the width of the stroke along the dx2,dy2 vector. This is equivalent to outsetting the indicated parallelogram by lw/2 pixels, then insetting the same parallelogram by lw/2 pixels and filling the difference between the outer and inner parallelograms.

fillParallelogramback to summary
public void fillParallelogram(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2, double x, double y, double dx1, double dy1, double dx2, double dy2)

Implements sun.java2d.pipe.ParallelogramPipe.fillParallelogram.

sun.java2d.pipe back to summary

private Class BufferedRenderPipe.BufferedDrawHandler

extends DrawHandler
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
private int
scanlineCount

fillPath() support...

private int
Inherited from sun.java2d.loops.ProcessPath.DrawHandler:
strokeControlxMaxxMaxfxMinxMinfyMaxyMaxfyMinyMinf

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
drawLine(int x1, int y1, int x2, int y2)

Implements abstract sun.java2d.loops.ProcessPath.DrawHandler.drawLine.

drawPath() support...

public void
public void
drawScanline(int x1, int x2, int y)

Implements abstract sun.java2d.loops.ProcessPath.DrawHandler.drawScanline.

public void
endFillPath()

Called from fillPath() to indicate that we are done issuing drawScanline() calls.

private void
public void
startFillPath()

Called from fillPath() to indicate that we are about to start issuing drawScanline() calls.

private void
pack-priv void
validate(SunGraphics2D sg2d)

This method needs to be called prior to each draw/fillPath() operation to ensure the clip bounds are up to date.

Inherited from sun.java2d.loops.ProcessPath.DrawHandler:
adjustBoundssetBoundssetBounds

Field Detail

remainingScanlinesback to summary
private int remainingScanlines
scanlineCountback to summary
private int scanlineCount

fillPath() support...

scanlineCountIndexback to summary
private int scanlineCountIndex

Constructor Detail

BufferedDrawHandlerback to summary
pack-priv BufferedDrawHandler()

Method Detail

drawLineback to summary
public void drawLine(int x1, int y1, int x2, int y2)

Implements abstract sun.java2d.loops.ProcessPath.DrawHandler.drawLine.

drawPath() support...

drawPixelback to summary
public void drawPixel(int x, int y)

Implements abstract sun.java2d.loops.ProcessPath.DrawHandler.drawPixel.

drawScanlineback to summary
public void drawScanline(int x1, int x2, int y)

Implements abstract sun.java2d.loops.ProcessPath.DrawHandler.drawScanline.

endFillPathback to summary
public void endFillPath()

Called from fillPath() to indicate that we are done issuing drawScanline() calls.

resetFillPathback to summary
private void resetFillPath()
startFillPathback to summary
public void startFillPath()

Called from fillPath() to indicate that we are about to start issuing drawScanline() calls.

updateScanlineCountback to summary
private void updateScanlineCount()
validateback to summary
pack-priv void validate(SunGraphics2D sg2d)

This method needs to be called prior to each draw/fillPath() operation to ensure the clip bounds are up to date.