public final class SnapState extends Object
This class is used by SnapContext
to process
snap results
.
Constructor and Description |
---|
SnapState(PointD location)
Initializes a new instance of the
SnapState class. |
SnapState(PointD location,
SnapTypes snapType)
Initializes a new instance of the
SnapState class. |
Modifier and Type | Method and Description |
---|---|
PointD |
getLocation()
Gets the current location.
|
SnapTypes |
getSnapType()
Gets the type of the snap.
|
void |
setSnapType(SnapTypes value)
Sets the type of the snap.
|
void |
snapTo(PointD newLocation)
|
void |
snapX(double newX)
|
void |
snapY(double newY)
|
String |
toString() |
public SnapState(PointD location)
SnapState
class.location
- The initial location.public final PointD getLocation()
snapX(double)
, snapY(double)
, and snapTo(PointD)
methods.public final SnapTypes getSnapType()
setSnapType(SnapTypes)
public final void setSnapType(SnapTypes value)
value
- The type of the snap.getSnapType()
public final void snapTo(PointD newLocation)
newLocation
- The new location.public final void snapX(double newX)
newX
- The new X.public final void snapY(double newY)
newY
- The new Y.