Class RMMorphShape.Morphing2D
- java.lang.Object
- 
- com.inductiveautomation.rm.shape.RMMorphShape.Morphing2D
 
- 
- All Implemented Interfaces:
- java.awt.Shape
 - Enclosing class:
- RMMorphShape
 
 public static class RMMorphShape.Morphing2D extends java.lang.Object implements java.awt.ShapeA morphing shape is a shape which geometry is constructed from two other shapes: a start shape and an end shape. The morphing property of a morphing shape defines the amount of transformation applied to the start shape to turn it into the end shape. Both shapes must have the same winding rule. 
- 
- 
Field SummaryFields Modifier and Type Field Description static intWIND_EVEN_ODDstatic intWIND_NON_ZEROA non-zero winding rule for determining the interior of a path.
 - 
Constructor SummaryConstructors Constructor Description Morphing2D(java.awt.Shape startShape, java.awt.Shape endShape)Creates a new morphing shape.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(double x, double y)booleancontains(double x, double y, double w, double h)booleancontains(java.awt.geom.Point2D p)booleancontains(java.awt.geom.Rectangle2D r)java.awt.RectanglegetBounds()java.awt.geom.Rectangle2DgetBounds2D()doublegetMorphing()Returns the morphing value between the two shapes.java.awt.geom.PathIteratorgetPathIterator(java.awt.geom.AffineTransform at)java.awt.geom.PathIteratorgetPathIterator(java.awt.geom.AffineTransform at, double flatness)booleanintersects(double x, double y, double w, double h)booleanintersects(java.awt.geom.Rectangle2D r)voidsetMorphing(double morph)Sets the morphing value between the two shapes.
 
- 
- 
- 
Field Detail- 
WIND_EVEN_ODDpublic static final int WIND_EVEN_ODD - See Also:
- Constant Field Values
 
 - 
WIND_NON_ZEROpublic static final int WIND_NON_ZERO A non-zero winding rule for determining the interior of a path.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
Morphing2Dpublic Morphing2D(java.awt.Shape startShape, java.awt.Shape endShape)Creates a new morphing shape. A morphing shape can be used to turn one shape into another one. The transformation can be controlled by the morph property. - Parameters:
- startShape- the shape to morph from
- endShape- the shape to morph to
- Throws:
- java.awt.geom.IllegalPathStateException- if the shapes do not have the same winding rule
- See Also:
- getMorphing(),- setMorphing(double)
 
 
- 
 - 
Method Detail- 
getMorphingpublic double getMorphing() Returns the morphing value between the two shapes. - Returns:
- the morphing value between the two shapes
- See Also:
- setMorphing(double)
 
 - 
setMorphingpublic void setMorphing(double morph) Sets the morphing value between the two shapes. This value controls the transformation from the start shape to the end shape. A value of 0.0 is the start shap. A value of 1.0 is the end shape. A value of 0.5 is a new shape, morphed half way from the start shape to the end shape. The specified value should be between 0.0 and 1.0. If not, the value is clamped in the appropriate range. - Parameters:
- morph- the morphing value between the two shapes
- See Also:
- getMorphing()
 
 - 
getBoundspublic java.awt.Rectangle getBounds() - Specified by:
- getBoundsin interface- java.awt.Shape
 
 - 
getBounds2Dpublic java.awt.geom.Rectangle2D getBounds2D() - Specified by:
- getBounds2Din interface- java.awt.Shape
 
 - 
containspublic boolean contains(double x, double y)- Specified by:
- containsin interface- java.awt.Shape
 
 - 
containspublic boolean contains(java.awt.geom.Point2D p) - Specified by:
- containsin interface- java.awt.Shape
 
 - 
intersectspublic boolean intersects(double x, double y, double w, double h)- Specified by:
- intersectsin interface- java.awt.Shape
 
 - 
intersectspublic boolean intersects(java.awt.geom.Rectangle2D r) - Specified by:
- intersectsin interface- java.awt.Shape
 
 - 
containspublic boolean contains(double x, double y, double w, double h)- Specified by:
- containsin interface- java.awt.Shape
 
 - 
containspublic boolean contains(java.awt.geom.Rectangle2D r) - Specified by:
- containsin interface- java.awt.Shape
 
 - 
getPathIteratorpublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at) - Specified by:
- getPathIteratorin interface- java.awt.Shape
 
 - 
getPathIteratorpublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)- Specified by:
- getPathIteratorin interface- java.awt.Shape
 
 
- 
 
-