APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.javafx.geom

public final Class ConcentricShapePair

extends ShapePair
Class Inheritance
Imports
com.sun.javafx.geom.transform.BaseTransform

An implementation of ShapePair that represents the space between two concentric, non-intersecting Shapes. The pair of shapes could also be represented by a regular Path2D by simply concatenating the two shapes and using a WIND_EVEN_ODD winding rule. (Note that a WIND_NON_ZERO winding rule could be used if the two shapes have opposite windings, but that cannot be guaranteed without further inspection of the two shapes and the WIND_NON_ZERO rule works fine without that restriction.)

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private final Shape
private final Shape
Inherited from com.sun.javafx.geom.ShapePair:
INCLUDES_I_NOT_OINCLUDES_NEITHERINCLUDES_O_AND_IINCLUDES_O_NOT_ITYPE_INTERSECTTYPE_SUBTRACT

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
contains(float x, float y)

Implements abstract com.sun.javafx.geom.Shape.contains.

Tests if the specified coordinates are inside the boundary of the Shape.

public boolean
contains(float x, float y, float w, float h)

Implements abstract com.sun.javafx.geom.Shape.contains.

Tests if the interior of the Shape entirely contains the specified rectangular area.

public Shape
copy()

Implements abstract com.sun.javafx.geom.Shape.copy.

Returns a new copy of this Shape instance.

public RectBounds
getBounds()

Implements abstract com.sun.javafx.geom.Shape.getBounds.

Note that there is no guarantee that the returned RectBounds is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated RectBounds.

public int
getCombinationType()

Implements abstract com.sun.javafx.geom.ShapePair.getCombinationType.

Returns the method with which to combine the two shapes.

public Shape
getInnerShape()

Implements abstract com.sun.javafx.geom.ShapePair.getInnerShape.

Returns the inner Shape.

public Shape
getOuterShape()

Implements abstract com.sun.javafx.geom.ShapePair.getOuterShape.

Returns the outer Shape.

public PathIterator
getPathIterator(BaseTransform tx)

Implements abstract com.sun.javafx.geom.Shape.getPathIterator.

Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline.

public PathIterator
getPathIterator(BaseTransform tx, float flatness)

Implements abstract com.sun.javafx.geom.Shape.getPathIterator.

Returns an iterator object that iterates along the Shape boundary and provides access to a flattened view of the Shape outline geometry.

public boolean
intersects(float x, float y, float w, float h)

Implements abstract com.sun.javafx.geom.Shape.intersects.

Tests if the interior of the Shape intersects the interior of a specified rectangular area.

Field Detail

innerback to summary
private final Shape inner
outerback to summary
private final Shape outer

Constructor Detail

ConcentricShapePairback to summary
public ConcentricShapePair(Shape outer, Shape inner)

Method Detail

containsback to summary
public boolean contains(float x, float y)

Implements abstract com.sun.javafx.geom.Shape.contains.

Doc from com.sun.javafx.geom.Shape.contains.

Tests if the specified coordinates are inside the boundary of the Shape.

Annotations
@Override
containsback to summary
public boolean contains(float x, float y, float w, float h)

Implements abstract com.sun.javafx.geom.Shape.contains.

Doc from com.sun.javafx.geom.Shape.contains.

Tests if the interior of the Shape entirely contains the specified rectangular area. All coordinates that lie inside the rectangular area must lie within the Shape for the entire rectanglar area to be considered contained within the Shape.

The Shape.contains() method allows a Shape implementation to conservatively return false when:

  • the intersect method returns true and
  • the calculations to determine whether or not the Shape entirely contains the rectangular area are prohibitively expensive.
This means that for some Shapes this method might return false even though the Shape contains the rectangular area. The Area class performs more accurate geometric computations than most Shape objects and therefore can be used if a more precise answer is required.
Annotations
@Override
copyback to summary
public Shape copy()

Implements abstract com.sun.javafx.geom.Shape.copy.

Doc from com.sun.javafx.geom.Shape.copy.

Returns a new copy of this Shape instance.

Annotations
@Override
getBoundsback to summary
public RectBounds getBounds()

Implements abstract com.sun.javafx.geom.Shape.getBounds.

Doc from com.sun.javafx.geom.Shape.getBounds.

Note that there is no guarantee that the returned RectBounds is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated RectBounds.

Annotations
@Override
getCombinationTypeback to summary
public int getCombinationType()

Implements abstract com.sun.javafx.geom.ShapePair.getCombinationType.

Doc from com.sun.javafx.geom.ShapePair.getCombinationType.

Returns the method with which to combine the two shapes. For now, only TYPE_SUBTRACT and TYPE_INTERSECT are supported.

Annotations
@Override
getInnerShapeback to summary
public Shape getInnerShape()

Implements abstract com.sun.javafx.geom.ShapePair.getInnerShape.

Doc from com.sun.javafx.geom.ShapePair.getInnerShape.

Returns the inner Shape.

Annotations
@Override
getOuterShapeback to summary
public Shape getOuterShape()

Implements abstract com.sun.javafx.geom.ShapePair.getOuterShape.

Doc from com.sun.javafx.geom.ShapePair.getOuterShape.

Returns the outer Shape.

Annotations
@Override
getPathIteratorback to summary
public PathIterator getPathIterator(BaseTransform tx)

Implements abstract com.sun.javafx.geom.Shape.getPathIterator.

Doc from com.sun.javafx.geom.Shape.getPathIterator.

Returns an iterator object that iterates along the Shape boundary and provides access to the geometry of the Shape outline. If an optional BaseTransform is specified, the coordinates returned in the iteration are transformed accordingly.

Each call to this method returns a fresh PathIterator object that traverses the geometry of the Shape object independently from any other PathIterator objects in use at the same time.

It is recommended, but not guaranteed, that objects implementing the Shape interface isolate iterations that are in process from any changes that might occur to the original object's geometry during such iterations.

Annotations
@Override
getPathIteratorback to summary
public PathIterator getPathIterator(BaseTransform tx, float flatness)

Implements abstract com.sun.javafx.geom.Shape.getPathIterator.

Doc from com.sun.javafx.geom.Shape.getPathIterator.

Returns an iterator object that iterates along the Shape boundary and provides access to a flattened view of the Shape outline geometry.

Only SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types are returned by the iterator.

If an optional BaseTransform is specified, the coordinates returned in the iteration are transformed accordingly.

The amount of subdivision of the curved segments is controlled by the flatness parameter, which specifies the maximum distance that any point on the unflattened transformed curve can deviate from the returned flattened path segments. Note that a limit on the accuracy of the flattened path might be silently imposed, causing very small flattening parameters to be treated as larger values. This limit, if there is one, is defined by the particular implementation that is used.

Each call to this method returns a fresh PathIterator object that traverses the Shape object geometry independently from any other PathIterator objects in use at the same time.

It is recommended, but not guaranteed, that objects implementing the Shape interface isolate iterations that are in process from any changes that might occur to the original object's geometry during such iterations.

Annotations
@Override
intersectsback to summary
public boolean intersects(float x, float y, float w, float h)

Implements abstract com.sun.javafx.geom.Shape.intersects.

Doc from com.sun.javafx.geom.Shape.intersects.

Tests if the interior of the Shape intersects the interior of a specified rectangular area. The rectangular area is considered to intersect the Shape if any point is contained in both the interior of the Shape and the specified rectangular area.

The Shape.intersects() method allows a Shape implementation to conservatively return true when:

  • there is a high probability that the rectangular area and the Shape intersect, but
  • the calculations to accurately determine this intersection are prohibitively expensive.
This means that for some Shapes this method might return true even though the rectangular area does not intersect the Shape. The Area class performs more accurate computations of geometric intersection than most Shape objects and therefore can be used if a more precise answer is required.
Annotations
@Override
com.sun.javafx.geom back to summary

pack-priv Class ConcentricShapePair.PairIterator

extends Object
implements PathIterator
Class Inheritance
All Implemented Interfaces
com.sun.javafx.geom.PathIterator

Field Summary

Modifier and TypeField and Description
pack-priv PathIterator
pack-priv PathIterator

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

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

Implements com.sun.javafx.geom.PathIterator.currentSegment.

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

public int
getWindingRule()

Implements com.sun.javafx.geom.PathIterator.getWindingRule.

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

public boolean
isDone()

Implements com.sun.javafx.geom.PathIterator.isDone.

Tests if the iteration is complete.

public void
next()

Implements com.sun.javafx.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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

innerback to summary
pack-priv PathIterator inner
outerback to summary
pack-priv PathIterator outer

Constructor Detail

PairIteratorback to summary
pack-priv PairIterator(PathIterator outer, PathIterator inner)

Method Detail

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

Implements com.sun.javafx.geom.PathIterator.currentSegment.

Doc from com.sun.javafx.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
getWindingRuleback to summary
public int getWindingRule()

Implements com.sun.javafx.geom.PathIterator.getWindingRule.

Doc from com.sun.javafx.geom.PathIterator.getWindingRule.

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

Annotations
@Override
isDoneback to summary
public boolean isDone()

Implements com.sun.javafx.geom.PathIterator.isDone.

Doc from com.sun.javafx.geom.PathIterator.isDone.

Tests if the iteration is complete.

Annotations
@Override
nextback to summary
public void next()

Implements com.sun.javafx.geom.PathIterator.next.

Doc from com.sun.javafx.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