APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.java2d.marlin

public final Class DMarlinRenderingEngine

extends RenderingEngine
implements MarlinConst
Class Inheritance
All Implemented Interfaces
sun.java2d.marlin.MarlinConst
Imports
java.awt.BasicStroke, .Shape, java.awt.geom.AffineTransform, .Path2D, .PathIterator, java.util.Arrays, sun.awt.geom.PathConsumer2D, sun.java2d.ReentrantContextProvider, .ReentrantContextProviderCLQ, .ReentrantContextProviderTL, sun.java2d.pipe.AATileGenerator, .Region, .RenderingEngine

Marlin RendererEngine implementation (derived from Pisces)

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class
private static enum

Field Summary

Modifier and TypeField and Description
pack-priv static final boolean
pack-priv static final boolean
pack-priv static final boolean
pack-priv static final boolean
pack-priv static final boolean
pack-priv static final double
private static final float
private static final ReentrantContextProvider<RendererContext>
pack-priv static final int
private static boolean
pack-priv static final double
private static final boolean

Constructor Summary

AccessConstructor and Description
public
DMarlinRenderingEngine()

Public constructor

Method Summary

Modifier and TypeMethod and Description
public Shape

Returns:

the widened path stored in a new Shape object
createStrokedShape
(Shape
the source path to be widened
src
,
float
the width of the widened path as per BasicStroke
width
,
int
the end cap decorations as per BasicStroke
caps
,
int
the segment join decorations as per BasicStroke
join
,
float
the miter limit as per BasicStroke
miterlimit
,
float[]
the dash length array as per BasicStroke
dashes
,
float
the initial dash phase as per BasicStroke
dashphase
)

Implements abstract sun.java2d.pipe.RenderingEngine.createStrokedShape.

Create a widened path as specified by the parameters.

public AATileGenerator

Returns:

the AATileGenerator instance to be consulted for tile coverages, or null if there is no output to render
getAATileGenerator
(Shape
the shape to be rendered (fill or draw)
s
,
AffineTransform
the transform to be applied to the shape and the stroke attributes
at
,
Region
the current clip in effect in device coordinates
clip
,
BasicStroke
if non-null, a BasicStroke whose attributes should be applied to this operation
bs
,
boolean
true if the transformed stroke attributes are smaller than the minimum dropout pen width
thin
,
boolean
true if the VALUE_STROKE_NORMALIZE RenderingHint is in effect
normalize
,
int[]
returns the bounds of the iteration
bbox
)

Implements abstract sun.java2d.pipe.RenderingEngine.getAATileGenerator.

Construct an antialiased tile generator for the given shape with the given rendering attributes and store the bounds of the tile iteration in the bbox parameter.

public AATileGenerator
getAATileGenerator(double x, double y, double dx1, double dy1, double dx2, double dy2, double lw1, double lw2, Region clip, int[] bbox)

Implements abstract sun.java2d.pipe.RenderingEngine.getAATileGenerator.

Construct an antialiased tile generator for the given parallelogram store the bounds of the tile iteration in the bbox parameter.

public float
getMinimumAAPenSize()

Implements abstract sun.java2d.pipe.RenderingEngine.getMinimumAAPenSize.

Returns the minimum pen width that the antialiasing rasterizer can represent without dropouts occurring.

pack-priv static RendererContext

Returns:

RendererContext instance
getRendererContext
()

Get the RendererContext instance dedicated to the current thread

private static void
logSettings(final String reClass)

private static boolean
nearZero(final double num)

private static void
pathTo(final RendererContext rdrCtx, final PathIterator pi, DPathConsumer2D pc2d)

private static void
pathToLoop(final double[] coords, final PathIterator pi, final DPathConsumer2D pc2d)

pack-priv static void
returnRendererContext(final RendererContext
RendererContext instance
rdrCtx
)

Reset and return the given RendererContext instance for reuse

public void
strokeTo(Shape
the source path to be widened
src
,
AffineTransform
the transform to be applied to the shape and the stroke attributes
at
,
BasicStroke
the BasicStroke object specifying the decorations to be applied to the widened path
bs
,
boolean
true if the transformed stroke attributes are smaller than the minimum dropout pen width
thin
,
boolean
indicates whether stroke normalization should be applied
normalize
,
boolean
indicates whether or not adjustments appropriate to antialiased rendering should be applied
antialias
,
final PathConsumer2D
the PathConsumer2D instance to forward the widened geometry to
consumer
)

Implements abstract sun.java2d.pipe.RenderingEngine.strokeTo.

Sends the geometry for a widened path as specified by the parameters to the specified consumer.

public void
strokeTo(Shape
the source path to be widened
src
,
AffineTransform
the transform to be applied to the shape and the stroke attributes
at
,
Region
the current clip in effect in device coordinates
clip
,
BasicStroke
the BasicStroke object specifying the decorations to be applied to the widened path
bs
,
boolean
true if the transformed stroke attributes are smaller than the minimum dropout pen width
thin
,
boolean
indicates whether stroke normalization should be applied
normalize
,
boolean
indicates whether or not adjustments appropriate to antialiased rendering should be applied
antialias
,
final PathConsumer2D
the PathConsumer2D instance to forward the widened geometry to
consumer
)

Overrides sun.java2d.pipe.RenderingEngine.strokeTo.

Sends the geometry for a widened path as specified by the parameters to the specified consumer.

pack-priv void
strokeTo(final RendererContext rdrCtx, Shape src, AffineTransform at, BasicStroke bs, boolean thin, DMarlinRenderingEngine.NormMode normalize, boolean antialias, DPathConsumer2D pc2d)

pack-priv void
strokeTo(final RendererContext rdrCtx, Shape src, AffineTransform at, double width, DMarlinRenderingEngine.NormMode norm, int caps, int join, float miterlimit, float[] dashes, float dashphase, DPathConsumer2D pc2d)

private double
Inherited from sun.java2d.pipe.RenderingEngine:
feedConsumergetInstance

Field Detail

DISABLE_2ND_STROKER_CLIPPINGback to summary
pack-priv static final boolean DISABLE_2ND_STROKER_CLIPPING
DO_CLIPback to summary
pack-priv static final boolean DO_CLIP
DO_CLIP_FILLback to summary
pack-priv static final boolean DO_CLIP_FILL
DO_CLIP_RUNTIME_ENABLEback to summary
pack-priv static final boolean DO_CLIP_RUNTIME_ENABLE
DO_TRACE_PATHback to summary
pack-priv static final boolean DO_TRACE_PATH
LOWER_BNDback to summary
pack-priv static final double LOWER_BND
MIN_PEN_SIZEback to summary
private static final float MIN_PEN_SIZE
RDR_CTX_PROVIDERback to summary
private static final ReentrantContextProvider<RendererContext> RDR_CTX_PROVIDER
REF_TYPEback to summary
pack-priv static final int REF_TYPE
SETTINGS_LOGGEDback to summary
private static boolean SETTINGS_LOGGED
UPPER_BNDback to summary
pack-priv static final double UPPER_BND
USE_THREAD_LOCALback to summary
private static final boolean USE_THREAD_LOCAL

Constructor Detail

DMarlinRenderingEngineback to summary
public DMarlinRenderingEngine()

Public constructor

Method Detail

createStrokedShapeback to summary
public Shape createStrokedShape(Shape src, float width, int caps, int join, float miterlimit, float[] dashes, float dashphase)

Implements abstract sun.java2d.pipe.RenderingEngine.createStrokedShape.

Create a widened path as specified by the parameters.

The specified src Shape is widened according to the specified attribute parameters as per the BasicStroke specification.

Parameters
src:Shape

the source path to be widened

width:float

the width of the widened path as per BasicStroke

caps:int

the end cap decorations as per BasicStroke

join:int

the segment join decorations as per BasicStroke

miterlimit:float

the miter limit as per BasicStroke

dashes:float[]

the dash length array as per BasicStroke

dashphase:float

the initial dash phase as per BasicStroke

Returns:Shape

the widened path stored in a new Shape object

Annotations
@Override
Since
1.7
getAATileGeneratorback to summary
public AATileGenerator getAATileGenerator(Shape s, AffineTransform at, Region clip, BasicStroke bs, boolean thin, boolean normalize, int[] bbox)

Implements abstract sun.java2d.pipe.RenderingEngine.getAATileGenerator.

Construct an antialiased tile generator for the given shape with the given rendering attributes and store the bounds of the tile iteration in the bbox parameter. The at parameter specifies a transform that should affect both the shape and the BasicStroke attributes. The clip parameter specifies the current clip in effect in device coordinates and can be used to prune the data for the operation, but the renderer is not required to perform any clipping. If the BasicStroke parameter is null then the shape should be filled as is, otherwise the attributes of the BasicStroke should be used to specify a draw operation. The thin parameter indicates whether or not the transformed BasicStroke represents coordinates smaller than the minimum resolution of the antialiasing rasterizer as specified by the getMinimumAAPenWidth() method.

Upon returning, this method will fill the bbox parameter with 4 values indicating the bounds of the iteration of the tile generator. The iteration order of the tiles will be as specified by the pseudo-code:

    for (y = bbox[1]; y < bbox[3]; y += tileheight) {
        for (x = bbox[0]; x < bbox[2]; x += tilewidth) {
        }
    }
If there is no output to be rendered, this method may return null.
Parameters
s:Shape

the shape to be rendered (fill or draw)

at:AffineTransform

the transform to be applied to the shape and the stroke attributes

clip:Region

the current clip in effect in device coordinates

bs:BasicStroke

if non-null, a BasicStroke whose attributes should be applied to this operation

thin:boolean

true if the transformed stroke attributes are smaller than the minimum dropout pen width

normalize:boolean

true if the VALUE_STROKE_NORMALIZE RenderingHint is in effect

bbox:int[]

returns the bounds of the iteration

Returns:AATileGenerator

the AATileGenerator instance to be consulted for tile coverages, or null if there is no output to render

Annotations
@Override
Since
1.7
getAATileGeneratorback to summary
public AATileGenerator getAATileGenerator(double x, double y, double dx1, double dy1, double dx2, double dy2, double lw1, double lw2, Region clip, int[] bbox)

Implements abstract sun.java2d.pipe.RenderingEngine.getAATileGenerator.

Doc from sun.java2d.pipe.RenderingEngine.getAATileGenerator.

Construct an antialiased tile generator for the given parallelogram store the bounds of the tile iteration in the bbox parameter. The parallelogram is specified as a starting point and 2 delta vectors that indicate the slopes of the 2 pairs of sides of the parallelogram. The 4 corners of the parallelogram are defined by the 4 points:

  • x, y
  • x+dx1, y+dy1
  • x+dx1+dx2, y+dy1+dy2
  • x+dx2, y+dy2
The lw1 and lw2 parameters provide a specification for an optionally stroked parallelogram if they are positive numbers. The lw1 parameter is the ratio of the length of the dx1, dx2 delta vector to half of the line width in that same direction. The lw2 parameter provides the same ratio for the other delta vector. If lw1 and lw2 are both greater than zero, then the parallelogram figure is doubled by both expanding and contracting each delta vector by its corresponding lw value. If either lw1 or lw2 are also greater than 1, then the inner (contracted) parallelogram disappears and the figure is simply a single expanded parallelogram. The clip parameter specifies the current clip in effect in device coordinates and can be used to prune the data for the operation, but the renderer is not required to perform any clipping.

Upon returning, this method will fill the bbox parameter with 4 values indicating the bounds of the iteration of the tile generator. The iteration order of the tiles will be as specified by the pseudo-code:

    for (y = bbox[1]; y < bbox[3]; y += tileheight) {
        for (x = bbox[0]; x < bbox[2]; x += tilewidth) {
        }
    }
If there is no output to be rendered, this method may return null.
Annotations
@Override
getMinimumAAPenSizeback to summary
public float getMinimumAAPenSize()

Implements abstract sun.java2d.pipe.RenderingEngine.getMinimumAAPenSize.

Returns the minimum pen width that the antialiasing rasterizer can represent without dropouts occurring.

Annotations
@Override
Since
1.7
getRendererContextback to summary
pack-priv static RendererContext getRendererContext()

Get the RendererContext instance dedicated to the current thread

Returns:RendererContext

RendererContext instance

logSettingsback to summary
private static void logSettings(final String reClass)
nearZeroback to summary
private static boolean nearZero(final double num)
pathToback to summary
private static void pathTo(final RendererContext rdrCtx, final PathIterator pi, DPathConsumer2D pc2d)
pathToLoopback to summary
private static void pathToLoop(final double[] coords, final PathIterator pi, final DPathConsumer2D pc2d)
returnRendererContextback to summary
pack-priv static void returnRendererContext(final RendererContext rdrCtx)

Reset and return the given RendererContext instance for reuse

Parameters
rdrCtx:RendererContext

RendererContext instance

strokeToback to summary
public void strokeTo(Shape src, AffineTransform at, BasicStroke bs, boolean thin, boolean normalize, boolean antialias, final PathConsumer2D consumer)

Implements abstract sun.java2d.pipe.RenderingEngine.strokeTo.

Sends the geometry for a widened path as specified by the parameters to the specified consumer.

The specified src Shape is widened according to the parameters specified by the BasicStroke object. Adjustments are made to the path as appropriate for the java.awt.RenderingHints#VALUE_STROKE_NORMALIZE hint if the normalize boolean parameter is true. Adjustments are made to the path as appropriate for the java.awt.RenderingHints#VALUE_ANTIALIAS_ON hint if the antialias boolean parameter is true.

The geometry of the widened path is forwarded to the indicated PathConsumer2D object as it is calculated.

Parameters
src:Shape

the source path to be widened

at:AffineTransform

the transform to be applied to the shape and the stroke attributes

bs:BasicStroke

the BasicStroke object specifying the decorations to be applied to the widened path

thin:boolean

true if the transformed stroke attributes are smaller than the minimum dropout pen width

normalize:boolean

indicates whether stroke normalization should be applied

antialias:boolean

indicates whether or not adjustments appropriate to antialiased rendering should be applied

consumer:PathConsumer2D

the PathConsumer2D instance to forward the widened geometry to

Annotations
@Override
Since
1.7
strokeToback to summary
public void strokeTo(Shape src, AffineTransform at, Region clip, BasicStroke bs, boolean thin, boolean normalize, boolean antialias, final PathConsumer2D consumer)

Overrides sun.java2d.pipe.RenderingEngine.strokeTo.

Sends the geometry for a widened path as specified by the parameters to the specified consumer.

The specified src Shape is widened according to the parameters specified by the BasicStroke object. Adjustments are made to the path as appropriate for the java.awt.RenderingHints#VALUE_STROKE_NORMALIZE hint if the normalize boolean parameter is true. Adjustments are made to the path as appropriate for the java.awt.RenderingHints#VALUE_ANTIALIAS_ON hint if the antialias boolean parameter is true.

The geometry of the widened path is forwarded to the indicated PathConsumer2D object as it is calculated.

Parameters
src:Shape

the source path to be widened

at:AffineTransform

the transform to be applied to the shape and the stroke attributes

clip:Region

the current clip in effect in device coordinates

bs:BasicStroke

the BasicStroke object specifying the decorations to be applied to the widened path

thin:boolean

true if the transformed stroke attributes are smaller than the minimum dropout pen width

normalize:boolean

indicates whether stroke normalization should be applied

antialias:boolean

indicates whether or not adjustments appropriate to antialiased rendering should be applied

consumer:PathConsumer2D

the PathConsumer2D instance to forward the widened geometry to

Since
17
strokeToback to summary
pack-priv void strokeTo(final RendererContext rdrCtx, Shape src, AffineTransform at, BasicStroke bs, boolean thin, DMarlinRenderingEngine.NormMode normalize, boolean antialias, DPathConsumer2D pc2d)
strokeToback to summary
pack-priv void strokeTo(final RendererContext rdrCtx, Shape src, AffineTransform at, double width, DMarlinRenderingEngine.NormMode norm, int caps, int join, float miterlimit, float[] dashes, float dashphase, DPathConsumer2D pc2d)
userSpaceLineWidthback to summary
private double userSpaceLineWidth(AffineTransform at, double lw)
sun.java2d.marlin back to summary

pack-priv abstract Class DMarlinRenderingEngine.NormalizingPathIterator

extends Object
implements PathIterator
Class Inheritance
  • java.lang.Object
  • sun.java2d.marlin.DMarlinRenderingEngine.NormalizingPathIterator
All Implemented Interfaces
java.awt.geom.PathIterator
Known Direct Subclasses
sun.java2d.marlin.DMarlinRenderingEngine.NormalizingPathIterator.NearestPixelCenter, sun.java2d.marlin.DMarlinRenderingEngine.NormalizingPathIterator.NearestPixelQuarter

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private double
private double
private double
private double
private PathIterator
private final double[]

Constructor Summary

AccessConstructor and Description
pack-priv
NormalizingPathIterator(final double[] tmp)

Method Summary

Modifier and TypeMethod and Description
public final int
currentSegment(final double[] coords)

Implements java.awt.geom.PathIterator.currentSegment.

Returns the coordinates and type of the current path segment in the iteration.

public final int
currentSegment(final float[] coords)

Implements java.awt.geom.PathIterator.currentSegment.

Returns the coordinates and type of the current path segment in the iteration.

pack-priv final void
dispose()

Disposes this path iterator: clean up before reusing this instance

public final int
getWindingRule()

Implements java.awt.geom.PathIterator.getWindingRule.

Returns the winding rule for determining the interior of the path.

pack-priv final DMarlinRenderingEngine.NormalizingPathIterator
init(final PathIterator src)

public final boolean
isDone()

Implements java.awt.geom.PathIterator.isDone.

Tests if the iteration is complete.

public final void
next()

Implements java.awt.geom.PathIterator.next.

Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.

pack-priv abstract double
normCoord(final double coord)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

curx_adjustback to summary
private double curx_adjust
cury_adjustback to summary
private double cury_adjust
movx_adjustback to summary
private double movx_adjust
movy_adjustback to summary
private double movy_adjust
srcback to summary
private PathIterator src
tmpback to summary
private final double[] tmp

Constructor Detail

NormalizingPathIteratorback to summary
pack-priv NormalizingPathIterator(final double[] tmp)

Method Detail

currentSegmentback to summary
public final int currentSegment(final double[] coords)

Implements java.awt.geom.PathIterator.currentSegment.

Doc from java.awt.geom.PathIterator.currentSegment.

Returns the coordinates and type of the current path segment in the iteration. The return value is the path-segment type: SEG_MOVETO, SEG_LINETO, SEG_QUADTO, SEG_CUBICTO, or SEG_CLOSE. A double array of length 6 must be passed in and can be used to store the coordinates of the point(s). Each point is stored as a pair of double x,y coordinates. SEG_MOVETO and SEG_LINETO types returns one point, SEG_QUADTO returns two points, SEG_CUBICTO returns 3 points and SEG_CLOSE does not return any points.

Annotations
@Override
currentSegmentback to summary
public final int currentSegment(final float[] coords)

Implements java.awt.geom.PathIterator.currentSegment.

Doc from java.awt.geom.PathIterator.currentSegment.

Returns the coordinates and type of the current path segment in the iteration. The return value is the path-segment type: SEG_MOVETO, SEG_LINETO, SEG_QUADTO, SEG_CUBICTO, or SEG_CLOSE. A float array of length 6 must be passed in and can be used to store the coordinates of the point(s). Each point is stored as a pair of float x,y coordinates. SEG_MOVETO and SEG_LINETO types returns one point, SEG_QUADTO returns two points, SEG_CUBICTO returns 3 points and SEG_CLOSE does not return any points.

Annotations
@Override
disposeback to summary
pack-priv final void dispose()

Disposes this path iterator: clean up before reusing this instance

getWindingRuleback to summary
public final int getWindingRule()

Implements java.awt.geom.PathIterator.getWindingRule.

Doc from java.awt.geom.PathIterator.getWindingRule.

Returns the winding rule for determining the interior of the path.

Annotations
@Override
initback to summary
pack-priv final DMarlinRenderingEngine.NormalizingPathIterator init(final PathIterator src)
isDoneback to summary
public final boolean isDone()

Implements java.awt.geom.PathIterator.isDone.

Doc from java.awt.geom.PathIterator.isDone.

Tests if the iteration is complete.

Annotations
@Override
nextback to summary
public final void next()

Implements java.awt.geom.PathIterator.next.

Doc from java.awt.geom.PathIterator.next.

Moves the iterator to the next segment of the path forwards along the primary direction of traversal as long as there are more points in that direction.

Annotations
@Override
normCoordback to summary
pack-priv abstract double normCoord(final double coord)
sun.java2d.marlin back to summary

pack-priv final Class DMarlinRenderingEngine.NormalizingPathIterator.NearestPixelCenter

extends NormalizingPathIterator
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv
NearestPixelCenter(final double[] tmp)

Constructor Detail

NearestPixelCenterback to summary
pack-priv NearestPixelCenter(final double[] tmp)

Method Detail

normCoordback to summary
pack-priv double normCoord(final double coord)

Implements abstract sun.java2d.marlin.DMarlinRenderingEngine.NormalizingPathIterator.normCoord.

Annotations
@Override
sun.java2d.marlin back to summary

pack-priv final Class DMarlinRenderingEngine.NormalizingPathIterator.NearestPixelQuarter

extends NormalizingPathIterator
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv
NearestPixelQuarter(final double[] tmp)

Constructor Detail

NearestPixelQuarterback to summary
pack-priv NearestPixelQuarter(final double[] tmp)

Method Detail

normCoordback to summary
pack-priv double normCoord(final double coord)

Implements abstract sun.java2d.marlin.DMarlinRenderingEngine.NormalizingPathIterator.normCoord.

Annotations
@Override
sun.java2d.marlin back to summary

private sealed Enum DMarlinRenderingEngine.NormMode

extends Enum<DMarlinRenderingEngine.NormMode>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final DMarlinRenderingEngine.NormMode
public static final DMarlinRenderingEngine.NormMode
public static final DMarlinRenderingEngine.NormMode

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract PathIterator
public static DMarlinRenderingEngine.NormMode
public static DMarlinRenderingEngine.NormMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

OFFback to summary
public static final DMarlinRenderingEngine.NormMode OFF
ON_NO_AAback to summary
public static final DMarlinRenderingEngine.NormMode ON_NO_AA
ON_WITH_AAback to summary
public static final DMarlinRenderingEngine.NormMode ON_WITH_AA

Constructor Detail

NormModeback to summary
private NormMode()

Method Detail

getNormalizingPathIteratorback to summary
pack-priv abstract PathIterator getNormalizingPathIterator(RendererContext rdrCtx, PathIterator src)
valueOfback to summary
public static DMarlinRenderingEngine.NormMode valueOf(String name)
valuesback to summary
public static DMarlinRenderingEngine.NormMode[] values()