|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stimulsoft.base.system.geometry.StiRectangle
public class StiRectangle
Class represent rectangle & operations with it Copyright Stimulsoft
Field Summary | |
---|---|
double |
height
|
double |
width
|
double |
x
|
double |
y
|
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double width
public double height
public double y
public double x
Constructor Detail |
---|
public StiRectangle()
public StiRectangle(StiRectangle rectangleD)
StiRectangle
rectangleD
- StiRectangle
public 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.Method Detail |
---|
public static StiRectangle empty()
public StiRectangle clone()
clone
in class java.lang.Object
StiRectangle
public StiRectangle move(java.lang.Double deltaX, java.lang.Double deltaY)
deltaX
- deltaY
-
StiRectangle
public StiRectangle inflate(java.lang.Double width, java.lang.Double height)
StiRectangle
width
- height
-
StiRectangle
public StiRectangle inflate(int width, int height)
StiRectangle
width
- height
-
StiRectangle
public java.lang.Boolean isEmpty()
StiRectangle
is empty
public static StiRectangle alignSizeInRect(StiRectangle rect, StiSize size, StiContentAlignment alignment)
rect
- StiRectangle
Fitten rectanglesize
- StiSize
Size to fitinalignment
- StiContentAlignment
public java.lang.Boolean intersectsWith(StiRectangle rect)
StiRectangle
intersects with other rectangle
rect
- StiRectangle
public java.lang.Boolean contains(java.lang.Double x, java.lang.Double y)
StiRectangle
contains point
x
- y
-
public StiRectangle zoom(java.lang.Double zoom)
StiRectangle
zoom
-
public StiRectangle round(double digits)
digits
-
StiRectangle
public StiRectangle round(java.lang.Double digits, java.lang.Boolean smartRound)
digits
- smartRound
-
StiRectangle
public StiRectangle normalize()
StiRectangle
public java.awt.Rectangle toRectangle()
StiRectangle
to Rectangle
public java.lang.String toString()
toString
in class java.lang.Object
public 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()
IStiSerializableToString
serialize
in interface IStiSerializableToString
public StiRectangle deserializeString(java.lang.String strObject)
public void deserialize(java.lang.String strObject)
IStiSerializableToString
deserialize
in interface IStiSerializableToString
public 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.NumberFormatException
JSONException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |