new CRect()
common/Geometry.js, line 830
Example
var a = new CRect();//預設建構子
var b = new CRect(a);//複製指定CRect
var c = new CRect(0, 0, 0, 0);//指定left,top,right,bottom並建立CRect
var d = new CRect({left:0,top:0,right:0,bottom:0});//使用帶有left,top,right,bottom的Object建立CRect
Members
-
bottomNumber
-
下面
- Default Value:
- 0
-
readonlyHeight
-
高度
Properties:
Name Type Description Height
Number 高度
-
leftNumber
-
左邊
- Default Value:
- 0
-
rightNumber
-
右邊
- Default Value:
- 0
-
topNumber
-
上面
- Default Value:
- 0
-
readonlyWidth
-
寬度
Properties:
Name Type Description Width
Number 寬度
Methods
-
CopyFrom(obj, top, right, bottom){CRect}
common/Geometry.js, line 906 -
複製。
Name Type Description obj
CRect | number 為top,或本身就是一個CRect。
top
Number 若Obj參數為left使用,否則此參數無意義。
right
Number 若Obj參數為left使用,否則此參數無意義。
bottom
Number 若Obj參數為left使用,否則此參數無意義。
Returns:
Type Description CRect 傳回this。 -
IsEqual(rect){Boolean}
common/Geometry.js, line 926 -
是否相等。
Name Type Description rect
CRect 比較的Rect。
Returns:
Type Description Boolean 傳回比較的結果。 -
IsNotEqual(rect){Boolean}
common/Geometry.js, line 934 -
是否不相等。
Name Type Description rect
CRect 比較的Rect。
Returns:
Type Description Boolean 傳回比較的結果。 -
PtInRect(p){Boolean}
common/Geometry.js, line 951 -
檢查p是否位於Rect範圍內。
Name Type Description p
GeoPoint 檢查的值。
Returns:
Type Description Boolean 傳回檢查的結果。 -
SetNULL()
common/Geometry.js, line 940 -
將left,top,right,bottom都設為0