Top Inners Fields Constructors Methods
com.sun.marlin

pack-priv final Class Helpers

extends Object
implements MarlinConst
Class Inheritance
All Implemented Interfaces
com.sun.marlin.MarlinConst
Imports
java.util.Arrays, com.sun.marlin.stats.Histogram, .StatLong

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 static final double

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static int
cubicRootsInAB(final double d, double a, double b, double c, final double[] pts, final int off, final double A, final double B)

pack-priv static double
curvelen(final double x0, final double y0, final double x1, final double y1, final double x2, final double y2, final double x3, final double y3)

pack-priv static double
evalCubic(final double a, final double b, final double c, final double d, final double t)

pack-priv static double
evalQuad(final double a, final double b, final double c, final double t)

pack-priv static double
fastCurvelen(final double x0, final double y0, final double x1, final double y1, final double x2, final double y2, final double x3, final double y3)

pack-priv static double
fastLineLen(final double x0, final double y0, final double x1, final double y1)

pack-priv static double
fastQuadLen(final double x0, final double y0, final double x1, final double y1, final double x2, final double y2)

pack-priv static int
filterOutNotInAB(final double[] nums, final int off, final int len, final double a, final double b)

pack-priv static int
findClipPoints(final Curve curve, final double[] pts, final double[] ts, final int type, final int outCodeOR, final double[] clipRect)

pack-priv static int
findSubdivPoints(final Curve c, final double[] pts, final double[] ts, final int type, final double w2)

pack-priv static void
isort(final double[] a, final int len)

pack-priv static boolean
isPointCurve(final double[] curve, final int type)

pack-priv static boolean
isPointCurve(final double[] curve, final int type, final double err)

pack-priv static double
linelen(final double x0, final double y0, final double x1, final double y1)

pack-priv static int
outcode(final double x, final double y, final double[] clipRect)

pack-priv static double
quadlen(final double x0, final double y0, final double x1, final double y1, final double x2, final double y2)

pack-priv static int
quadraticRoots(final double a, final double b, final double c, final double[] zeroes, final int off)

pack-priv static void
subdivide(final double[] src, final double[] left, final double[] right, final int type)

pack-priv static void
subdivideAt(final double t, final double[] src, final int offS, final double[] pts, final int offL, final int type)

pack-priv static void
subdivideCubic(final double[]
the array holding the coordinates for the source curve
src
,
final double[]
the array for storing the coordinates for the first half of the subdivided curve
left
,
final double[]
the array for storing the coordinates for the second half of the subdivided curve
right
)

Subdivides the cubic curve specified by the coordinates stored in the src array at indices srcoff through (srcoff + 7) and stores the resulting two subdivided curves into the two result arrays at the corresponding indices.

pack-priv static void
subdivideCubicAt(final double t, final double[] src, final int offS, final double[] pts, final int offL, final int offR)

pack-priv static void
subdivideLineAt(final double t, final double[] src, final int offS, final double[] pts, final int offL, final int offR)

pack-priv static void
subdivideQuad(final double[] src, final double[] left, final double[] right)

pack-priv static void
subdivideQuadAt(final double t, final double[] src, final int offS, final double[] pts, final int offL, final int offR)

pack-priv static boolean
within(final double x, final double y)

pack-priv static boolean
within(final double x, final double y, final double err)

pack-priv static boolean
withinD(final double d, final double err)

pack-priv static boolean
withinD(final double dx, final double dy, final double err)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EPSback to summary
private static final double EPS

Constructor Detail

Helpersback to summary
private Helpers()

Method Detail

cubicRootsInABback to summary
pack-priv static int cubicRootsInAB(final double d, double a, double b, double c, final double[] pts, final int off, final double A, final double B)
curvelenback to summary
pack-priv static double curvelen(final double x0, final double y0, final double x1, final double y1, final double x2, final double y2, final double x3, final double y3)
evalCubicback to summary
pack-priv static double evalCubic(final double a, final double b, final double c, final double d, final double t)
evalQuadback to summary
pack-priv static double evalQuad(final double a, final double b, final double c, final double t)
fastCurvelenback to summary
pack-priv static double fastCurvelen(final double x0, final double y0, final double x1, final double y1, final double x2, final double y2, final double x3, final double y3)
fastLineLenback to summary
pack-priv static double fastLineLen(final double x0, final double y0, final double x1, final double y1)
fastQuadLenback to summary
pack-priv static double fastQuadLen(final double x0, final double y0, final double x1, final double y1, final double x2, final double y2)
filterOutNotInABback to summary
pack-priv static int filterOutNotInAB(final double[] nums, final int off, final int len, final double a, final double b)
findClipPointsback to summary
pack-priv static int findClipPoints(final Curve curve, final double[] pts, final double[] ts, final int type, final int outCodeOR, final double[] clipRect)
findSubdivPointsback to summary
pack-priv static int findSubdivPoints(final Curve c, final double[] pts, final double[] ts, final int type, final double w2)
isortback to summary
pack-priv static void isort(final double[] a, final int len)
isPointCurveback to summary
pack-priv static boolean isPointCurve(final double[] curve, final int type)
isPointCurveback to summary
pack-priv static boolean isPointCurve(final double[] curve, final int type, final double err)
linelenback to summary
pack-priv static double linelen(final double x0, final double y0, final double x1, final double y1)
outcodeback to summary
pack-priv static int outcode(final double x, final double y, final double[] clipRect)
quadlenback to summary
pack-priv static double quadlen(final double x0, final double y0, final double x1, final double y1, final double x2, final double y2)
quadraticRootsback to summary
pack-priv static int quadraticRoots(final double a, final double b, final double c, final double[] zeroes, final int off)
subdivideback to summary
pack-priv static void subdivide(final double[] src, final double[] left, final double[] right, final int type)
subdivideAtback to summary
pack-priv static void subdivideAt(final double t, final double[] src, final int offS, final double[] pts, final int offL, final int type)
subdivideCubicback to summary
pack-priv static void subdivideCubic(final double[] src, final double[] left, final double[] right)

Subdivides the cubic curve specified by the coordinates stored in the src array at indices srcoff through (srcoff + 7) and stores the resulting two subdivided curves into the two result arrays at the corresponding indices. Either or both of the left and right arrays may be null or a reference to the same array as the src array. Note that the last point in the first subdivided curve is the same as the first point in the second subdivided curve. Thus, it is possible to pass the same array for left and right and to use offsets, such as rightoff equals (leftoff + 6), in order to avoid allocating extra storage for this common point.

Parameters
src:double[]

the array holding the coordinates for the source curve

left:double[]

the array for storing the coordinates for the first half of the subdivided curve

right:double[]

the array for storing the coordinates for the second half of the subdivided curve

Since
1.7
subdivideCubicAtback to summary
pack-priv static void subdivideCubicAt(final double t, final double[] src, final int offS, final double[] pts, final int offL, final int offR)
subdivideLineAtback to summary
pack-priv static void subdivideLineAt(final double t, final double[] src, final int offS, final double[] pts, final int offL, final int offR)
subdivideQuadback to summary
pack-priv static void subdivideQuad(final double[] src, final double[] left, final double[] right)
subdivideQuadAtback to summary
pack-priv static void subdivideQuadAt(final double t, final double[] src, final int offS, final double[] pts, final int offL, final int offR)
withinback to summary
pack-priv static boolean within(final double x, final double y)
withinback to summary
pack-priv static boolean within(final double x, final double y, final double err)
withinDback to summary
pack-priv static boolean withinD(final double d, final double err)
withinDback to summary
pack-priv static boolean withinD(final double dx, final double dy, final double err)
com.sun.marlin back to summary

pack-priv final Class Helpers.IndexStack

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
private final Histogram
private int[]
private final ArrayCacheInt.Reference
private int
private static final int
private final StatLong
private final StatLong

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
IndexStack(final RendererContext rdrCtx, final StatLong stat_idxstack_indices, final Histogram hist_idxstack_indices, final StatLong stat_array_idxstack_indices)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
dispose()

Disposes this PolyStack: clean up before reusing this instance

pack-priv boolean
pack-priv void
pullAll(final double[] points, final DPathConsumer2D io, final boolean moveFirst)

pack-priv void
push(final int v)

pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

endback to summary
private int end
hist_idxstack_indicesback to summary
private final Histogram hist_idxstack_indices
indicesback to summary
private int[] indices
indices_refback to summary
private final ArrayCacheInt.Reference indices_ref
indicesUseMarkback to summary
private int indicesUseMark
INITIAL_COUNTback to summary
private static final int INITIAL_COUNT
stat_array_idxstack_indicesback to summary
private final StatLong stat_array_idxstack_indices
stat_idxstack_indicesback to summary
private final StatLong stat_idxstack_indices

Constructor Detail

IndexStackback to summary
pack-priv IndexStack(final RendererContext rdrCtx)
IndexStackback to summary
pack-priv IndexStack(final RendererContext rdrCtx, final StatLong stat_idxstack_indices, final Histogram hist_idxstack_indices, final StatLong stat_array_idxstack_indices)

Method Detail

disposeback to summary
pack-priv void dispose()

Disposes this PolyStack: clean up before reusing this instance

isEmptyback to summary
pack-priv boolean isEmpty()
pullAllback to summary
pack-priv void pullAll(final double[] points, final DPathConsumer2D io, final boolean moveFirst)
pushback to summary
pack-priv void push(final int v)
resetback to summary
pack-priv void reset()
com.sun.marlin back to summary

pack-priv final Class Helpers.PolyStack

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv double[]
pack-priv final ArrayCacheDouble.Reference
pack-priv int
pack-priv byte[]
pack-priv final ArrayCacheByte.Reference
pack-priv int
pack-priv int
private final Histogram
private static final int
private static final int
pack-priv int
private final StatLong
private final StatLong
private final StatLong
private final StatLong
private static final byte
private static final byte
private static final byte

Constructor Summary

AccessConstructor and Description
pack-priv
PolyStack(final RendererContext rdrCtx)

pack-priv
PolyStack(final RendererContext rdrCtx, final StatLong stat_polystack_types, final StatLong stat_polystack_curves, final Histogram hist_polystack_curves, final StatLong stat_array_polystack_curves, final StatLong stat_array_polystack_curveTypes)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
dispose()

Disposes this PolyStack: clean up before reusing this instance

private void
ensureSpace(final int n)

pack-priv void
pack-priv void
pack-priv void
pushCubic(double x0, double y0, double x1, double y1, double x2, double y2)

pack-priv void
pushLine(double x, double y)

pack-priv void
pushQuad(double x0, double y0, double x1, double y1)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

curvesback to summary
pack-priv double[] curves
curves_refback to summary
pack-priv final ArrayCacheDouble.Reference curves_ref
curvesUseMarkback to summary
pack-priv int curvesUseMark
curveTypesback to summary
pack-priv byte[] curveTypes
curveTypes_refback to summary
pack-priv final ArrayCacheByte.Reference curveTypes_ref
curveTypesUseMarkback to summary
pack-priv int curveTypesUseMark
endback to summary
pack-priv int end
hist_polystack_curvesback to summary
private final Histogram hist_polystack_curves
INITIAL_CURVES_COUNTback to summary
private static final int INITIAL_CURVES_COUNT
INITIAL_TYPES_COUNTback to summary
private static final int INITIAL_TYPES_COUNT
numCurvesback to summary
pack-priv int numCurves
stat_array_polystack_curvesback to summary
private final StatLong stat_array_polystack_curves
stat_array_polystack_curveTypesback to summary
private final StatLong stat_array_polystack_curveTypes
stat_polystack_curvesback to summary
private final StatLong stat_polystack_curves
stat_polystack_typesback to summary
private final StatLong stat_polystack_types
TYPE_CUBICTOback to summary
private static final byte TYPE_CUBICTO
TYPE_LINETOback to summary
private static final byte TYPE_LINETO
TYPE_QUADTOback to summary
private static final byte TYPE_QUADTO

Constructor Detail

PolyStackback to summary
pack-priv PolyStack(final RendererContext rdrCtx)
PolyStackback to summary
pack-priv PolyStack(final RendererContext rdrCtx, final StatLong stat_polystack_types, final StatLong stat_polystack_curves, final Histogram hist_polystack_curves, final StatLong stat_array_polystack_curves, final StatLong stat_array_polystack_curveTypes)

Method Detail

disposeback to summary
pack-priv void dispose()

Disposes this PolyStack: clean up before reusing this instance

ensureSpaceback to summary
private void ensureSpace(final int n)
popAllback to summary
pack-priv void popAll(final DPathConsumer2D io)
pullAllback to summary
pack-priv void pullAll(final DPathConsumer2D io)
pushCubicback to summary
pack-priv void pushCubic(double x0, double y0, double x1, double y1, double x2, double y2)
pushLineback to summary
pack-priv void pushLine(double x, double y)
pushQuadback to summary
pack-priv void pushQuad(double x0, double y0, double x1, double y1)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override