Class s7sdk.Rectangle
Rectangle class.
Constructor Attributes | Constructor Name and Description |
---|---|
s7sdk.Rectangle(x, y, w, h)
|
Method Attributes | Method Name and Description |
---|---|
containsPoint(x, y)
Check if the rectangle contains the argument point.
|
|
containsRect(rect)
Check if the rectangle contains the argument rect.
|
|
equals(rect)
Check if the rectangle is the same as another rectangle rect.
|
|
intersection(rect)
Find the intersection of the current object with rect.
|
|
isEmpty()
Check if the rectangle is empty.
|
|
topLeft()
|
|
toString()
|
Class Detail
s7sdk.Rectangle(x, y, w, h)
- Parameters:
- {Number} x
- Upper-left X.
- {Number} y
- Upper-left Y.
- {Number} w
- Width in pixels.
- {Number} h
- Height in pixels.
Method Detail
bottomRight()
- Returns:
- Lower-right coordinate as Point2D object.
containsPoint(x, y)
Check if the rectangle contains the argument point.
- Parameters:
- {Number} x
- X coordinate.
- {Number} y
- Y coordinate.
- Returns:
- True if point is inside this object.
containsRect(rect)
Check if the rectangle contains the argument rect.
- Parameters:
- {Object} rect
- Rectangle object.
- Returns:
- True if rect is inside this object.
equals(rect)
Check if the rectangle is the same as another rectangle rect.
- Parameters:
- rect
- Rectangle to compare this to.
- Returns:
- True if this and rect are the same.
intersection(rect)
Find the intersection of the current object with rect.
- Parameters:
- {Object} rect
- Rectangle object.
- Returns:
- Intersection Rectangle.
isEmpty()
Check if the rectangle is empty.
- Returns:
- False if the rectangle has at least one width or height.
topLeft()
- Returns:
- Upper-left coordinate as Point2D object.
toString()
- Returns:
- String represents Rectangle.