public class StiRectangle extends java.lang.Object implements IStiSerializableToString
| Modifier and Type | Field and Description |
|---|---|
double |
height |
double |
width |
double |
x |
double |
y |
| Constructor and Description |
|---|
StiRectangle() |
StiRectangle(double x,
double y,
double width,
double height)
Constructor
|
StiRectangle(long x,
long y,
long width,
long height)
Constructor
|
StiRectangle(StiPoint location,
StiSize size)
Initializes a new instance of the RectangleD class with the specified location and size.
|
StiRectangle(StiRectangle rectangleD)
Constructor, create StiRectangle form
StiRectangle |
| Modifier and Type | Method and Description |
|---|---|
static StiRectangle |
alignSizeInRect(StiRectangle rect,
StiSize size,
StiContentAlignment alignment)
Align rectangle to fit in rect
|
StiRectangle |
AlignToGrid(double gridSize,
boolean aligningToGrid)
Align the rectangle to grid.
|
StiRectangle |
clone()
Clone current StiRectangle
|
boolean |
contains(double x,
double y) |
java.lang.Boolean |
contains(java.lang.Double x,
java.lang.Double y)
Is this
StiRectangle contains point |
boolean |
contains(StiPoint pt) |
void |
deserialize(java.lang.String strObject)
Десериализация объекта из строки.
|
StiRectangle |
deserializeString(java.lang.String strObject) |
static StiRectangle |
empty() |
StiRectangle |
FitToRectangle(StiRectangle rectangle)
Fit rectangle to rectangle.
|
int |
getBi()
Return rounded Integer bottom value
|
double |
getBottom() |
static StiRectangle |
getEmpty() |
double |
getHeight() |
int |
getHi()
Return rounded Integer height value
|
boolean |
getIsEmpty()
Tests whether all numeric properties of this StiRectangle have values of zero.
|
double |
getLeft() |
int |
getLi() |
StiPoint |
getLocation() |
StiRectangle |
getNormalize() |
int |
getRi()
Return rounded Integer right value
|
double |
getRight() |
StiSize |
getSize() |
int |
getTi() |
double |
getTop() |
int |
getWi()
Return rounded Integer width value
|
double |
getWidth() |
double |
getX() |
int |
getXi()
Return rounded Integer X value
|
double |
getY() |
int |
getYi()
Return rounded Integer Y value
|
StiRectangle |
inflate(java.lang.Double width,
java.lang.Double height)
Inflate current
StiRectangle |
StiRectangle |
inflate(int width,
int height)
Inflate current
StiRectangle |
java.lang.Boolean |
intersectsWith(StiRectangle rect)
Is this
StiRectangle intersects with other rectangle |
boolean |
IntersectsWith(StiRectangle rect) |
java.lang.Boolean |
isEmpty()
Check if
StiRectangle is empty |
void |
LoadFromJson(JSONObject jObject) |
StiRectangle |
move(java.lang.Double deltaX,
java.lang.Double deltaY)
Move rectangle by delta values
|
StiRectangle |
Multiply(double multipleFactor) |
StiRectangle |
normalize()
Normalize
StiRectangle |
StiRectangle |
OffsetRect(StiRectangle offsettingRectangle)
Changes the sizes of the rectangle.
|
StiRectangle |
round(double digits)
Round double x,y,width,height values to digits after point
|
StiRectangle |
round(java.lang.Double digits,
java.lang.Boolean smartRound)
Round double x,y,width,height values to digits after point with smart reound
|
static StiRectangle |
round(StiRectangle labelRect) |
java.lang.String |
serialize()
Сериализация объекта в строку.
|
void |
setBottom(double bottom) |
void |
setHeight(double height) |
void |
setLeft(double left) |
void |
setLocation(StiPoint value) |
void |
setRight(double right)
Set right
|
void |
setSize(StiSize value) |
void |
setTop(double top)
Set top
|
void |
setWidth(double width) |
void |
setX(double x) |
void |
setY(double y) |
java.awt.Rectangle |
toRectangle()
Convert
StiRectangle to Rectangle |
java.lang.String |
toString() |
static StiRectangle |
union(StiRectangle a,
StiRectangle b) |
StiRectangle |
zoom(java.lang.Double zoom)
Zoom
StiRectangle |
public double width
public double height
public double y
public double x
public StiRectangle()
public StiRectangle(StiRectangle rectangleD)
StiRectanglerectangleD - StiRectanglepublic StiRectangle(long x,
long y,
long width,
long height)
x - y - width - height - public StiRectangle(double x,
double y,
double width,
double height)
x - y - width - height - public StiRectangle(StiPoint location, StiSize size)
location - A StiPoint that represents the upper-left corner of the rectangular region.size - A StiSize that represents the width and height of the rectangular region.public static StiRectangle empty()
public StiRectangle clone()
clone in class java.lang.ObjectStiRectanglepublic StiRectangle move(java.lang.Double deltaX, java.lang.Double deltaY)
deltaX - deltaY - StiRectanglepublic StiRectangle inflate(java.lang.Double width, java.lang.Double height)
StiRectanglewidth - height - StiRectanglepublic StiRectangle inflate(int width, int height)
StiRectanglewidth - height - StiRectanglepublic java.lang.Boolean isEmpty()
StiRectangle is emptypublic static StiRectangle alignSizeInRect(StiRectangle rect, StiSize size, StiContentAlignment alignment)
rect - StiRectangle Fitten rectanglesize - StiSize Size to fitinalignment - StiContentAlignmentpublic java.lang.Boolean intersectsWith(StiRectangle rect)
StiRectangle intersects with other rectanglerect - StiRectanglepublic java.lang.Boolean contains(java.lang.Double x,
java.lang.Double y)
StiRectangle contains pointx - y - public StiRectangle zoom(java.lang.Double zoom)
StiRectanglezoom - public StiRectangle round(double digits)
digits - StiRectanglepublic StiRectangle round(java.lang.Double digits, java.lang.Boolean smartRound)
digits - smartRound - StiRectanglepublic StiRectangle normalize()
StiRectanglepublic java.awt.Rectangle toRectangle()
StiRectangle to Rectanglepublic java.lang.String toString()
toString in class java.lang.Objectpublic double getLeft()
public double getRight()
public double getTop()
public double getBottom()
public void setBottom(double bottom)
bottom - the bottom to setpublic double getY()
public void setY(double y)
y - the y to setpublic double getX()
public void setX(double x)
x - the x to setpublic double getWidth()
public void setWidth(double width)
width - the width to setpublic double getHeight()
public void setHeight(double height)
height - the height to setpublic void setLeft(double left)
left - public void setRight(double right)
right - public void setTop(double top)
top - public int getHi()
public int getWi()
public int getXi()
public int getYi()
public int getRi()
public int getBi()
public int getLi()
public int getTi()
public static StiRectangle round(StiRectangle labelRect)
public StiSize getSize()
public void setSize(StiSize value)
public StiPoint getLocation()
public void setLocation(StiPoint value)
public static StiRectangle union(StiRectangle a, StiRectangle b)
public boolean contains(double x,
double y)
public boolean contains(StiPoint pt)
public static StiRectangle getEmpty()
public boolean getIsEmpty()
public java.lang.String serialize()
IStiSerializableToStringserialize in interface IStiSerializableToStringpublic StiRectangle deserializeString(java.lang.String strObject)
public void deserialize(java.lang.String strObject)
IStiSerializableToStringdeserialize in interface IStiSerializableToStringpublic StiRectangle Multiply(double multipleFactor)
public StiRectangle getNormalize()
public StiRectangle FitToRectangle(StiRectangle rectangle)
rectangle - Rectangle, which will be fited.public StiRectangle OffsetRect(StiRectangle offsettingRectangle)
offsettingRectangle - Data for change the size.public StiRectangle AlignToGrid(double gridSize, boolean aligningToGrid)
gridSize - Grid size.aligningToGrid - Align or no.public boolean IntersectsWith(StiRectangle rect)
public void LoadFromJson(JSONObject jObject) throws java.lang.NumberFormatException, JSONException
java.lang.NumberFormatExceptionJSONExceptionCopyright © 2020 Stimulsoft. All Rights Reserved.