HSRect
TypeThis is a JavaScript object used to represent a rectangle, as used in various places throughout Hammerspoon's API, particularly where dealing with portions of a display. Behind the scenes it is a wrapper for the CGRect type in Swift/ObjectiveC.
Properties
origin
HSPoint
The "origin" of the rectangle, ie the coordinates of its top left corner, as an HSPoint object
Methods
constructor(x, y, w, h) -> None
Create a new HSRect object
Declaration
constructor(x, y, w, h) -> None
Parameters
| Name | Type | Description |
|---|---|---|
| x | number | The x-axis coordinate of the top-left corner |
| y | number | The y-axis coordinate of the top-left corner |
| w | number | The width of the rectangle |
| h | number | The height of the rectangle |
Returns
None