|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttwaver.Size
twaver.Rect
twaver.RoundRect
public class RoundRect
圆角矩形,继承于Rect,增加了radius参数,用来表示圆角半径
Field Summary | |
---|---|
float |
radius
圆角半径 |
Fields inherited from class twaver.Rect |
---|
x, y |
Fields inherited from class twaver.Size |
---|
height, width |
Constructor Summary | |
---|---|
RoundRect()
圆角矩形,继承于Rect,增加了radius参数,用来表示圆角半径 |
|
RoundRect(float x,
float y,
float width,
float height,
float radius)
圆角矩形,继承于Rect,增加了radius参数,用来表示圆角半径 |
|
RoundRect(RoundRect roundRect)
构造函数,从指定圆角矩形中获取参数信息 |
Method Summary | |
---|---|
RoundRect |
clone()
拷贝一份新的数据,避免对原始数据的更改 |
void |
deserialize(java.lang.String string)
反序列化属性,根据字符串生成对象的属性 |
boolean |
intersects(double x2,
double y2)
是否包含坐标点 |
boolean |
intersects(double x2,
double y2,
double w2,
double h2)
矩形是否相交 |
java.lang.String |
serialize()
序列化该对象 |
Methods inherited from class twaver.Rect |
---|
add, add, add, contains, equals, equals, getBottom, getCenter, getCenterX, getCenterY, getLeft, getLocation, getRight, getTop, getX, getY, grow, grow, grow, intersection, intersects, intersects, intersects, isEmpty, offset, offset, reset, set, set, set, toGraphicRect, toGraphicRectF, toString, translate, union |
Methods inherited from class twaver.Size |
---|
setHeight, setWidth |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public float radius
Constructor Detail |
---|
public RoundRect()
public RoundRect(float x, float y, float width, float height, float radius)
x
- x坐标y
- y坐标width
- 宽度height
- 高度radius
- 圆角半径public RoundRect(RoundRect roundRect)
roundRect
- 圆角矩形Method Detail |
---|
public boolean intersects(double x2, double y2, double w2, double h2)
Rect
intersects
in interface twaver.core.topo.IShape
intersects
in class Rect
x2
- 矩形x坐标y2
- 矩形y坐标w2
- 矩形宽度h2
- 矩形高度
public boolean intersects(double x2, double y2)
Rect
intersects
in interface twaver.core.topo.IShape
intersects
in class Rect
x2
- x坐标y2
- y坐标
public RoundRect clone()
IStruct
clone
in interface IStruct
clone
in class Rect
public java.lang.String serialize()
ISerializable
serialize
in interface ISerializable
serialize
in class Rect
public void deserialize(java.lang.String string)
ISerializable
deserialize
in interface ISerializable
deserialize
in class Rect
string
- 字符串
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |