public interface IMutableOrientedRectangle extends IOrientedRectangle, IMutableSize
ISize
,
IOrientedRectangle
,
OrientedRectangle
EMPTY
Modifier and Type | Method and Description |
---|---|
double |
getAnchorX()
Gets the x coordinate for the anchor of the rectangle.
|
double |
getAnchorY()
Gets the y coordinate for the anchor of the rectangle.
|
default void |
resize(ISize size)
Sets the size of the rectangle to the provided value.
|
default void |
resize(SizeD size)
Sets the size of the rectangle to the provided value.
|
default void |
setAnchor(PointD location)
Sets the anchor vector of the oriented rectangle to the given value.
|
void |
setAnchorX(double value)
Sets the x coordinate for the anchor of the rectangle.
|
void |
setAnchorY(double value)
Sets the y coordinate for the anchor of the rectangle.
|
default void |
setCenter(PointD center)
Sets the center of the oriented rectangle to the given value.
|
void |
setUpVector(double upx,
double upy)
Sets the orientation of this oriented rectangle by modifying the up vector components.
|
default void |
setUpVector(PointD up)
Sets up vector of the oriented rectangle to the given value.
|
contains, createTransform, getAnchorLocation, getBounds, getCenter, getDynamicCenter, getTopLeftLocation, getUp, getUpX, getUpY, hits, toSizeD
double getAnchorX()
Implementations may adjust the coordinates internally, e.g. to automatically snap the coordinates to grid points. So depending on context the value that can be read might not necessarily be the exact same value that has just been written.
getAnchorX
in interface IOrientedRectangle
setAnchorX(double)
double getAnchorY()
Implementations may adjust the coordinates internally, e.g. to automatically snap the coordinates to grid points. So depending on context the value that can be read might not necessarily be the exact same value that has just been written.
getAnchorY
in interface IOrientedRectangle
setAnchorY(double)
default void resize(ISize size)
resize
in interface IMutableSize
size
- The size to set.default void resize(SizeD size)
resize
in interface IMutableSize
size
- The size to set.default void setAnchor(PointD location)
location
- The coordinates of the new anchor location.void setAnchorX(double value)
Implementations may adjust the coordinates internally, e.g. to automatically snap the coordinates to grid points. So depending on context the value that can be read might not necessarily be the exact same value that has just been written.
value
- The AnchorX to set.getAnchorX()
void setAnchorY(double value)
Implementations may adjust the coordinates internally, e.g. to automatically snap the coordinates to grid points. So depending on context the value that can be read might not necessarily be the exact same value that has just been written.
value
- The AnchorY to set.getAnchorY()
default void setCenter(PointD center)
center
- The coordinates of the new center.void setUpVector(double upx, double upy)
It is up to the caller to assure that the values describe a vector of length 1.
upx
- The x component of the normalized up vector.upy
- The y component of the normalized up vector.IOrientedRectangle.getUpX()
,
IOrientedRectangle.getUpY()
default void setUpVector(PointD up)
up
- The coordinates of the new up vector.