public abstract class RectangleProjectedShape extends Shape
Represents a shape which is projected over rectangle turned to a particular orientation. Specified by four points which can be rotated in space maintaining the same edges length and 90 degrees between adjacent edges.
Constructor and Description |
---|
RectangleProjectedShape()
Initializes a new instance of the
RectangleProjectedShape class. |
RectangleProjectedShape(RectangleF rectangle)
Initializes a new instance of the
RectangleProjectedShape class. |
Modifier and Type | Method and Description |
---|---|
RectangleF |
getBounds()
Gets the object's bounds.
|
RectangleF |
getBounds(Matrix matrix)
Gets the object's bounds.
|
RectangleF |
getBounds(Matrix matrix,
Pen pen)
Gets the object's bounds.
|
PointF |
getCenter()
Gets the shape's center.
|
PointF |
getLeftBottom()
Gets the left bottom rectangle point.
|
PointF |
getLeftTop()
Gets the left top rectangle point.
|
double |
getRectangleHeight()
Gets the rectangle height.
|
double |
getRectangleWidth()
Gets the rectangle width.
|
PointF |
getRightBottom()
Gets the right bottom rectangle point.
|
PointF |
getRightTop()
Gets the right top rectangle point.
|
boolean |
hasSegments()
Gets a value indicating whether shape has segments.
|
void |
transform(Matrix transform)
Applies the specified transformation to the shape.
|
getSegments
public RectangleProjectedShape()
Initializes a new instance of the RectangleProjectedShape
class.
public RectangleProjectedShape(RectangleF rectangle)
Initializes a new instance of the RectangleProjectedShape
class.
rectangle
- The rectangle to initialize from.public PointF getLeftTop()
Gets the left top rectangle point.
Value: The left top rectangle point.public PointF getRightTop()
Gets the right top rectangle point.
Value: The right top rectangle point.public PointF getLeftBottom()
Gets the left bottom rectangle point.
Value: The left bottom rectangle point.public PointF getRightBottom()
Gets the right bottom rectangle point.
Value: The right bottom rectangle point.public PointF getCenter()
Gets the shape's center.
Value: The shape's center.public RectangleF getBounds()
Gets the object's bounds.
Value: The object's bounds.getBounds
in class ObjectWithBounds
public double getRectangleWidth()
Gets the rectangle width.
Value: The rectangle width.public double getRectangleHeight()
Gets the rectangle height.
Value: The rectangle height.public boolean hasSegments()
Gets a value indicating whether shape has segments.
Value:True
if shape has segments; otherwise, false
.hasSegments
in class Shape
True
if shape has segments; otherwise, false
.public RectangleF getBounds(Matrix matrix)
Gets the object's bounds.
getBounds
in class ObjectWithBounds
matrix
- The matrix to apply before bounds will be calculated.public RectangleF getBounds(Matrix matrix, Pen pen)
Gets the object's bounds.
getBounds
in class ObjectWithBounds
matrix
- The matrix to apply before bounds will be calculated.pen
- The pen to use for object. This can influence the object's bounds size.public void transform(Matrix transform)
Applies the specified transformation to the shape.
transform
in class ObjectWithBounds
transform
- The transformation to apply.