public final class SEShape
extends com.neurotec.lang.NObject
| Modifier and Type | Class and Description |
|---|---|
static class |
SEShape.PointCollection
Represents a collection of the SEShape point values that can be individually accessed by index.
|
| Constructor and Description |
|---|
SEShape()
Creates a new instance of SEShape.
|
| Modifier and Type | Method and Description |
|---|---|
Point2D.Double |
getCenter()
Gets automatically calculated shape center point.
|
double |
getHeading()
Gets orientation of the shape in radians 0..2pi.
|
SEShape.PointCollection |
getPoints()
Retrieves points collection.
|
boolean |
isLocked()
Checks if a shape is locked.
|
boolean |
isValid()
Checks if a shape is valid.
|
static com.neurotec.lang.NType |
nativeTypeOf() |
void |
rotate(double angle)
Rotates the shape by the specified number of radians around the center of the shape.
|
void |
scale(double scale)
Scales the shape around its center.
|
void |
setHeading(double value)
Sets user specified orientation of the shape in radians 0..2pi.
|
double |
testPoint(Point2D.Double point)
Gets test point and shape relative position.
|
double |
testPoint(Point2D.Double point,
boolean measureDistance)
Gets test point and shape relative position.
|
void |
translate(Point2D.Double distance)
Translates the shape.
|
addListener, addPropertyChangeListener, captureProperties, claimHandle, clone, compareTo, copyProperties, dispose, disposeArray, equals, fromHandle, fromHandle, fromObject, getFlags, getHandle, getNativeType, getOwner, getProperty, getProperty, getSize, getSize, getSizeMany, getSizeMany, hashCode, invoke, invoke, invoke, isDisposed, nObjectCallbackNativeTypeOf, nObjectPropertyChangedCallbackNativeTypeOf, ref, removeListener, removePropertyChangeListener, reset, resetProperty, save, save, save, save, save, save, save, save, save, save, save, save, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, setFlags, setProperty, setProperty, toHandle, toObject, toString, toString, unref, unrefArray, unrefElementspublic static com.neurotec.lang.NType nativeTypeOf()
public double testPoint(Point2D.Double point, boolean measureDistance)
point - A point which should be tested.measureDistance - If measureDistance is false distance is \-1, 0, 1.
If measureDistance is true distance is negative, zero, positive Euclidean
distance, for point being outside, on the edge and inside of the shape
respectively.public double testPoint(Point2D.Double point)
point - A point which should be tested.public void rotate(double angle)
angle - Angle in radians to rotate the shape.public void translate(Point2D.Double distance)
distance - A distance to translated shape.public void scale(double scale)
scale - Shape scale. Less than 1 shrinks it, more than 1 enlarges it.public boolean isValid()
public boolean isLocked()
public double getHeading()
public Point2D.Double getCenter()
public void setHeading(double value)
value - An orientation of the shape in radians.public SEShape.PointCollection getPoints()
Copyright © 2016 Neurotechnology. All rights reserved.