SRect
Index
Functions Index
Properties Index
Functions
Contains
bool Contains (SVector point) bool Contains (SVector point, bool allowInverse)
Returns true if the x and y components of point is a point inside this rectangle. If allowInverse is present and true, the width and height of the Rect are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
newRect=Rect.New(0,0,150,150)
otherRect = Rect.New(0,0,150,150)
isContains = newRect.Contains(otherRect)
--or
isContains = newRect.Contains(otherRect , true)Overlaps
bool Overlaps (SRect other) bool Overlaps (SRect other, bool allowInverse)
Returns true if the other rectangle overlaps this one. If allowInverse is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.
newRect=Rect.New(0,0,150,150)
otherRect = Rect.New(0,0,150,150)
isOverlapping = newRect.Overlaps(otherRect)
--or
isOverlapping = newRect.Overlaps(otherRect , true)Equals
bool Equals (SRect other)
Returns true if the rectangles are the same.
newRect=Rect.New(0,0,150,150)
otherRect = Rect.New(0,0,150,150)
AreEqual = newRect.Equals(otherRect)ToString
string ToString (string format) string ToString ()
Returns string for this Rect.
newRect=Rect.New(0,0,150,150)
otherRect = Rect.New(0,0,150,150)
AreEqual = newRect.Equals(otherRect)New
static SRect New (float x, float y, float width, float height)
Constructs a new SRect
newRect=Rect.New(0,0,150,150)Properties
X
float X get set
Property Description
newRect=Rect.New(0,0,150,150)
newRect.X = 10.0Y
float Y get set
Property Description
newRect=Rect.New(0,0,150,150)
newRect.Y = 10.0Width
float Width get set
Property Description
newRect=Rect.New(0,0,150,150)
newRect.Width = 10.0Height
float Height get set
Property Description
newRect=Rect.New(0,0,150,150)
newRect.Height = 10.0Position
SVector Position get
The X and Y position of the rectangle.
newRect=Rect.New(50,50,150,150)
positionVector = newRect.positionCenter
SVector Center get
The position of the center of the rectangle.
newRect = Rect.New(50,50,150,150)
VectorCenter = newRect.CenterMin
SVector Min get
The position of the minimum corner of the rectangle.
newRect=Rect.New(0,0,150,150)
vectorMin = newRect.MinMax
SVector Max get
The position of the maximum corner of the rectangle.
newRect=Rect.New(0,0,150,150)
vectorMax = newRect.MaxSize
SVector Size get
The width and height of the rectangle.
newRect=Rect.New(0,0,150,150)
vectorSize = newRect.SizeXMin
float XMin get
The minimum X coordinate of the rectangle.
newRect=Rect.New(0,0,150,150)
floatXMin = newRect.XMinYMin
float YMin get
The minimum Y coordinate of the rectangle.
newRect=Rect.New(0,0,150,150)
floatYMin = newRect.YMinXMax
float XMax get
The maximum Y coordinate of the rectangle.
newRect=Rect.New(0,0,150,150)
floatXMax = newRect.XMaxYMax
float YMax get
The maximum Y coordinate of the rectangle.
newRect=Rect.New(0,0,150,150)
floatYMax = newRect.YMaxLeft
float Left get
Property Description
newRect=Rect.New(0,0,150,150)
floatLeft = newRect.LeftRight
float Right get
Property Description
newRect=Rect.New(0,0,150,150)
floatRight = newRect.RightTop
float Top get
Property Description
newRect=Rect.New(0,0,150,150)
floatTop = newRect.TopBottom
float Bottom get
Property Description
newRect=Rect.New(0,0,150,150)
floatBottom = newRect.Bottom