APIdia Launch Partner
Top Description Fields Constructors Methods
sun.java2d.pipe

public Class PixelToParallelogramConverter

extends PixelToShapeConverter
implements ShapeDrawPipe
Class Inheritance
All Implemented Interfaces
sun.java2d.pipe.ShapeDrawPipe
Known Direct Subclasses
sun.java2d.SurfaceData.PixelToPgramLoopConverter
Imports
java.awt.Shape, .BasicStroke, java.awt.geom.Line2D, .Rectangle2D, .AffineTransform, sun.java2d.SunGraphics2D, sun.awt.SunHints

This class converts calls to the basic pixel rendering methods into calls to the methods on a ParallelogramPipe. Most calls are transformed into calls to the fill(Shape) method by the parent PixelToShapeConverter class, but some calls are transformed into calls to fill/drawParallelogram().

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv double
pack-priv double
pack-priv double
pack-priv ParallelogramPipe
Inherited from sun.java2d.pipe.PixelToShapeConverter:
outpipe

Constructor Summary

AccessConstructor and Description
public
PixelToParallelogramConverter(ShapeDrawPipe
pipeline to forward shape calls to
shapepipe
,
ParallelogramPipe
pipeline to forward parallelogram calls to (and drawLine calls if possible)
pgrampipe
,
double
minimum pen size for dropout control
minPenSize
,
double
sub-pixel location to normalize endpoints for STROKE_NORMALIZE cases
normPosition
,
boolean
boolean to control whethere normalization constants are also applied to fill operations (normally true for non-AA, false for AA)
adjustfill
)

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
drawGeneralLine(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2)

public void
public void
public void
drawRectangle(SunGraphics2D sg2d, double rx, double ry, double rw, double rh, double lw)

public void
public void
fillOuterParallelogram(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2, double px, double py, double dx1, double dy1, double dx2, double dy2, double len1, double len2, double lw1, double lw2)

This utility function handles the case where a drawRectangle operation discovered that the interior hole in the rectangle or parallelogram has been completely filled in by the stroke width.

public void
public void
fillRectangle(SunGraphics2D sg2d, double rx, double ry, double rw, double rh)

pack-priv static double
len(double x, double y)

pack-priv double
normalize(double v)

Inherited from sun.java2d.pipe.PixelToShapeConverter:
drawArcdrawOvaldrawPolygondrawPolylinedrawRoundRectfillArcfillOvalfillPolygonfillRoundRect

Field Detail

adjustfillback to summary
pack-priv boolean adjustfill
minPenSizeback to summary
pack-priv double minPenSize
normPositionback to summary
pack-priv double normPosition
normRoundingBiasback to summary
pack-priv double normRoundingBias
outrendererback to summary
pack-priv ParallelogramPipe outrenderer

Constructor Detail

PixelToParallelogramConverterback to summary
public PixelToParallelogramConverter(ShapeDrawPipe shapepipe, ParallelogramPipe pgrampipe, double minPenSize, double normPosition, boolean adjustfill)
Parameters
shapepipe:ShapeDrawPipe

pipeline to forward shape calls to

pgrampipe:ParallelogramPipe

pipeline to forward parallelogram calls to (and drawLine calls if possible)

minPenSize:double

minimum pen size for dropout control

normPosition:double

sub-pixel location to normalize endpoints for STROKE_NORMALIZE cases

adjustfill:boolean

boolean to control whethere normalization constants are also applied to fill operations (normally true for non-AA, false for AA)

Method Detail

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

Implements sun.java2d.pipe.ShapeDrawPipe.draw.

drawGeneralLineback to summary
public boolean drawGeneralLine(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2)
drawLineback to summary
public void drawLine(SunGraphics2D sg2d, int x1, int y1, int x2, int y2)

Overrides sun.java2d.pipe.PixelToShapeConverter.drawLine.

Implements sun.java2d.pipe.PixelDrawPipe.drawLine.

drawRectback to summary
public void drawRect(SunGraphics2D sg2d, int x, int y, int w, int h)

Overrides sun.java2d.pipe.PixelToShapeConverter.drawRect.

Implements sun.java2d.pipe.PixelDrawPipe.drawRect.

drawRectangleback to summary
public void drawRectangle(SunGraphics2D sg2d, double rx, double ry, double rw, double rh, double lw)
fillback to summary
public void fill(SunGraphics2D sg2d, Shape s)

Implements sun.java2d.pipe.ShapeDrawPipe.fill.

fillOuterParallelogramback to summary
public void fillOuterParallelogram(SunGraphics2D sg2d, double ux1, double uy1, double ux2, double uy2, double px, double py, double dx1, double dy1, double dx2, double dy2, double len1, double len2, double lw1, double lw2)

This utility function handles the case where a drawRectangle operation discovered that the interior hole in the rectangle or parallelogram has been completely filled in by the stroke width. It calculates the outer parallelogram of the stroke and issues a single fillParallelogram request to fill it.

fillRectback to summary
public void fillRect(SunGraphics2D sg2d, int x, int y, int w, int h)

Overrides sun.java2d.pipe.PixelToShapeConverter.fillRect.

Implements sun.java2d.pipe.PixelFillPipe.fillRect.

fillRectangleback to summary
public void fillRectangle(SunGraphics2D sg2d, double rx, double ry, double rw, double rh)
lenback to summary
pack-priv static double len(double x, double y)
normalizeback to summary
pack-priv double normalize(double v)