Top Inners Fields Constructors Methods
jogamp.graph.geom.plane

public final Class Path2D

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.util.NoSuchElementException, com.jogamp.graph.geom.SVertex, .Vertex, com.jogamp.opengl.math.geom.AABBox

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final int
BUFFER_CAPACITY

The buffers capacity

private static final int
BUFFER_SIZE

The buffers size

pack-priv static final String
pack-priv static final String
pack-priv float[]
points

The points buffer

pack-priv static int[]
pointShift

The space amount in points buffer for different segmenet's types

pack-priv int
pointSize

The points buffer size

pack-priv int
rule

The path rule

pack-priv byte[]
types

The point's types buffer

pack-priv int
typeSize

The point's type buffer size

public static final int
public static final int

Constructor Summary

AccessConstructor and Description
public
public
Path2D(final int rule)

public
Path2D(final int rule, final int initialCapacity)

public
Path2D(final Path2D path)

Method Summary

Modifier and TypeMethod and Description
public void
append(final Path2D path, final boolean connect)

public void
append(final PathIterator path, boolean connect)

pack-priv void
checkBuf(final int
- the point count to be added in buffer
pointCount
,
final boolean checkMove)

Checks points and types buffer size to add pointCount points.

public Object
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
public void
public boolean
contains(final float px, final float py)

public boolean
contains(final float rx, final float ry, final float rw, final float rh)

public boolean
contains(final Vertex p)

public boolean
contains(final AABBox r)

public Path2D
public void
curveTo(final float x1, final float y1, final float x2, final float y2, final float x3, final float y3)

public final synchronized AABBox
public SVertex
public int
public boolean
intersects(final float rx, final float ry, final float rw, final float rh)

public boolean
intersects(final AABBox r)

public final boolean
pack-priv boolean

Returns:

true if point is inside path, or false otherwise
isInside
(final int
- the point cross count
cross
)

Checks cross count according to path rule to define is it point inside shape or not.

public PathIterator
public PathIterator
public void
lineTo(final float x, final float y)

public void
moveTo(final float x, final float y)

public void
quadTo(final float x1, final float y1, final float x2, final float y2)

public void
public void
setWindingRule(final int rule)

public final int
size()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public void
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

BUFFER_CAPACITYback to summary
private static final int BUFFER_CAPACITY

The buffers capacity

BUFFER_SIZEback to summary
private static final int BUFFER_SIZE

The buffers size

invalidWindingRuleValueback to summary
pack-priv static final String invalidWindingRuleValue
iteratorOutOfBoundsback to summary
pack-priv static final String iteratorOutOfBounds
pointsback to summary
pack-priv float[] points

The points buffer

pointShiftback to summary
pack-priv static int[] pointShift

The space amount in points buffer for different segmenet's types

pointSizeback to summary
pack-priv int pointSize

The points buffer size

ruleback to summary
pack-priv int rule

The path rule

typesback to summary
pack-priv byte[] types

The point's types buffer

typeSizeback to summary
pack-priv int typeSize

The point's type buffer size

WIND_EVEN_ODDback to summary
public static final int WIND_EVEN_ODD
WIND_NON_ZEROback to summary
public static final int WIND_NON_ZERO

Constructor Detail

Path2Dback to summary
public Path2D()
Path2Dback to summary
public Path2D(final int rule)
Path2Dback to summary
public Path2D(final int rule, final int initialCapacity)
Path2Dback to summary
public Path2D(final Path2D path)

Method Detail

appendback to summary
public void append(final Path2D path, final boolean connect)
appendback to summary
public void append(final PathIterator path, boolean connect)
checkBufback to summary
pack-priv void checkBuf(final int pointCount, final boolean checkMove)

Checks points and types buffer size to add pointCount points. If necessary realloc buffers to enlarge size.

Parameters
pointCount:int

- the point count to be added in buffer

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:Object

a clone of this instance.

Annotations
@Override
closePathback to summary
public void closePath()
containsback to summary
public boolean contains(final float px, final float py)
containsback to summary
public boolean contains(final float rx, final float ry, final float rw, final float rh)
containsback to summary
public boolean contains(final Vertex p)
containsback to summary
public boolean contains(final AABBox r)
createTransformedShapeback to summary
public Path2D createTransformedShape(final AffineTransform t)
curveToback to summary
public void curveTo(final float x1, final float y1, final float x2, final float y2, final float x3, final float y3)
getBounds2Dback to summary
public final synchronized AABBox getBounds2D()
getCurrentPointback to summary
public SVertex getCurrentPoint()
getWindingRuleback to summary
public int getWindingRule()
intersectsback to summary
public boolean intersects(final float rx, final float ry, final float rw, final float rh)
intersectsback to summary
public boolean intersects(final AABBox r)
isClosedback to summary
public final boolean isClosed()
isInsideback to summary
pack-priv boolean isInside(final int cross)

Checks cross count according to path rule to define is it point inside shape or not.

Parameters
cross:int

- the point cross count

Returns:boolean

true if point is inside path, or false otherwise

iteratorback to summary
public PathIterator iterator()
iteratorback to summary
public PathIterator iterator(final AffineTransform t)
lineToback to summary
public void lineTo(final float x, final float y)
moveToback to summary
public void moveTo(final float x, final float y)
quadToback to summary
public void quadTo(final float x1, final float y1, final float x2, final float y2)
resetback to summary
public void reset()
setWindingRuleback to summary
public void setWindingRule(final int rule)
sizeback to summary
public final int size()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
transformback to summary
public void transform(final AffineTransform t)
jogamp.graph.geom.plane back to summary

pack-priv Class Path2D.Iterator

extends Object
implements PathIterator
Class Inheritance
All Implemented Interfaces
jogamp.graph.geom.plane.PathIterator

Field Summary

Modifier and TypeField and Description
pack-priv Path2D
p

The source GeneralPath object

pack-priv int
pointIndex

The current cursor position in points buffer

pack-priv AffineTransform
t

The path iterator transformation

pack-priv int
typeIndex

The current cursor position in types buffer

Constructor Summary

AccessConstructor and Description
pack-priv
Iterator(final Path2D
- the source GeneralPath object
path
)

Constructs a new GeneralPath.Iterator for given general path

pack-priv
Iterator(final Path2D
- the source GeneralPath object
path
,
final AffineTransform
- the AffineTransform object to apply rectangle path
at
)

Constructs a new GeneralPath.Iterator for given general path and transformation

Method Summary

Modifier and TypeMethod and Description
public int
public int
public boolean
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

pback to summary
pack-priv Path2D p

The source GeneralPath object

pointIndexback to summary
pack-priv int pointIndex

The current cursor position in points buffer

tback to summary
pack-priv AffineTransform t

The path iterator transformation

typeIndexback to summary
pack-priv int typeIndex

The current cursor position in types buffer

Constructor Detail

Iteratorback to summary
pack-priv Iterator(final Path2D path)

Constructs a new GeneralPath.Iterator for given general path

Parameters
path:Path2D

- the source GeneralPath object

Iteratorback to summary
pack-priv Iterator(final Path2D path, final AffineTransform at)

Constructs a new GeneralPath.Iterator for given general path and transformation

Parameters
path:Path2D

- the source GeneralPath object

at:AffineTransform

- the AffineTransform object to apply rectangle path

Method Detail

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

Implements jogamp.graph.geom.plane.PathIterator.currentSegment.

Annotations
@Override
getWindingRuleback to summary
public int getWindingRule()

Implements jogamp.graph.geom.plane.PathIterator.getWindingRule.

Annotations
@Override
isDoneback to summary
public boolean isDone()

Implements jogamp.graph.geom.plane.PathIterator.isDone.

Annotations
@Override
nextback to summary
public void next()

Implements jogamp.graph.geom.plane.PathIterator.next.

Annotations
@Override