public final class Rectangle extends Object implements Comparable
Class represents rectangle.
Constructor and Description |
---|
Rectangle(double llx,
double lly,
double urx,
double ury)
Constructor of Rectangle.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clones the Rectangle object.
|
int |
compareTo(Object arg0) |
boolean |
equals(Object other)
Check if rectangles are equal i.e. hase same position and sizes.
|
static Rectangle |
fromRect(android.graphics.Rect src) |
static Rectangle |
fromRect(com.aspose.java.awt.Rectangle src) |
double |
getHeight()
Height of rectangle.
|
double |
getLLX()
X-coordinate of lower - left corner.
|
double |
getLLY()
Y - coordinate of lower-left corner.
|
static Rectangle |
getTrivial()
Initializes trivial rectangle i.e. rectangle with zero position and size.
|
double |
getURX()
X - coordinate of upper-right corner.
|
double |
getURY()
Y - coordinate of upper-right corner.
|
double |
getWidth()
Width of rectangle.
|
void |
intersect(Rectangle otherRect)
Intersects rectangles
|
boolean |
isEmpty()
Checks if rectangle is empty.
|
boolean |
isPoint()
Checks if rectangle is point i.e.
|
boolean |
isTrivial()
Checks if rectangle is trivial i.e. has zero size and position.
|
static Rectangle |
parse(String value)
Try to parse string and extract from it rectangle components llx, lly, urx, ury.
|
void |
rotate(int angle)
Rotate rectangle by the specified angle.
|
void |
setLLX(double value) |
void |
setLLY(double value) |
void |
setURX(double value) |
void |
setURY(double value) |
com.aspose.pdf.engine.data.PdfArray |
toArray(com.aspose.pdf.engine.data.ITrailerable trailerable) |
android.graphics.Rect |
toRect() |
String |
toString()
Gets rectangle string representation.
|
public static Rectangle Empty
public Rectangle(double llx, double lly, double urx, double ury)
Constructor of Rectangle.
llx
- X of lower left corner.lly
- Y of lower left corner.urx
- X of upper right corner.ury
- Y of upper right corner.public double getWidth()
Width of rectangle.
public double getHeight()
Height of rectangle.
public double getLLX()
X-coordinate of lower - left corner.
public void setLLX(double value)
public double getLLY()
Y - coordinate of lower-left corner.
public void setLLY(double value)
public double getURX()
X - coordinate of upper-right corner.
public void setURX(double value)
public double getURY()
Y - coordinate of upper-right corner.
public void setURY(double value)
public android.graphics.Rect toRect()
public static Rectangle fromRect(android.graphics.Rect src)
public static Rectangle fromRect(com.aspose.java.awt.Rectangle src)
public com.aspose.pdf.engine.data.PdfArray toArray(com.aspose.pdf.engine.data.ITrailerable trailerable)
public String toString()
Gets rectangle string representation.
public static Rectangle parse(String value)
Try to parse string and extract from it rectangle components llx, lly, urx, ury.
value
- String to parse.public static Rectangle getTrivial()
Initializes trivial rectangle i.e. rectangle with zero position and size.
public boolean isTrivial()
Checks if rectangle is trivial i.e. has zero size and position.
public boolean isEmpty()
public boolean isPoint()
public boolean equals(Object other)
Check if rectangles are equal i.e. hase same position and sizes.
public void intersect(Rectangle otherRect)
otherRect
- public void rotate(int angle)
Rotate rectangle by the specified angle.
angle
- Angle of rotation. Member of Rotation enumeration.public int compareTo(Object arg0)
compareTo
in interface Comparable
Copyright © 2017 Aspose. All Rights Reserved.