Articles and Tutorials
GSRect
GSRect defines a rectangle. Rounded rectangles can be achieved by setting the rectangle's radius property.| Constructor Summary | |
| GSRect (<Object> params) Constructs a new GSRect that is initialized with the properties provided in the params associative array. | |
| Method Summary | |
| GSBounds | getBounds() Gets the minimum bounding box necessary to contain this map feature |
| void | setHeight(<integer> height) Sets the height of the rectangle |
| void | setOrigin(<GSPoint> origin) Sets the origin coordinate of the rectangle |
| void | setRadius(<integer> radius) Sets the the radius of the ellipse used to round off the corners of the rectangle. |
| void | setWidth(<integer> width) Sets the width of the rectangle |
| Field Detail |
graphicsEl
Object graphicsEl| Constructor Detail |
GSRect
GSRect(<Object> params)- Constructs a new GSRect that is initialized with the properties provided in the params associative array.
-
-
- radius - for rounded rectangles, the radius of the ellipse used to round off the corners of the rectangle
- width - the width of the rectangle in metres
- height - the height of the rectangle in metres
- origin - the NZMG coordinate that specifies the origin of the rectangle
- style - an associative array containing name-value pairs for each style property to set, see GSVectorGraphics.setStyle() for all supported properties
params - an associative array of named arguments used to initialize this shape, the following parameters may be specified:
Parameters: -
| Method Detail |
getBounds
GSBounds getBounds()- Gets the minimum bounding box necessary to contain this map feature
-
- the bounds of this map feature
Returns:
setHeight
void setHeight(<integer> height)- Sets the height of the rectangle
-
- height - the height of the rectangle in metres
Parameters:
setOrigin
void setOrigin(<GSPoint> origin)- Sets the origin coordinate of the rectangle
-
- origin - an NZMG coordinate
Parameters:
setRadius
void setRadius(<integer> radius)- Sets the the radius of the ellipse used to round off the corners of the rectangle.
-
- radius - the length of the radius of the ellipse in metres.
Parameters:
setWidth
void setWidth(<integer> width)- Sets the width of the rectangle
-
- width - the width of the rectangle in metres
Parameters:

