rectObj
final class rectObj (View source)
rectObj are sometimes embedded inside other objects. New ones can also be created with:
Properties
float | $minx | ||
float | $miny | ||
float | $maxx | ||
float | $maxy |
Methods
No description
Old style constructor
Adjust extents of the rectangle to fit the width/height specified.
Project the rectangle from "in" projection (1st argument) to "out" projection (2nd argument). Returns MS_SUCCESS/MS_FAILURE.
Set object property to a new value.
Set the rectangle extents.
Details
final
__construct()
.. note:: the members (minx, miny, maxx ,maxy) are initialized to -1;
final RectObj
ms_newRectObj()
Old style constructor
final int
draw(mapObj $map, layerObj $layer, imageObj $img, int $class_index, string $text)
Draws the individual rectangle using layer. The class_index is used to classify the rectangle based on the classes defined for the layer.
The text string is used to annotate the rectangle. (Optional) Returns MS_SUCCESS/MS_FAILURE.
final float
fit(int $width, int $height)
Adjust extents of the rectangle to fit the width/height specified.
final int
project(projectionObj $in, projectionObj $out)
Project the rectangle from "in" projection (1st argument) to "out" projection (2nd argument). Returns MS_SUCCESS/MS_FAILURE.
final int
set(string $property_name, $new_value)
Set object property to a new value.
final void
setextent(float $minx, float $miny, float $maxx, float $maxy)
Set the rectangle extents.