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

__construct()

No description

RectObj
ms_newRectObj()

Old style constructor

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.

float
fit(int $width, int $height)

Adjust extents of the rectangle to fit the width/height specified.

int
project(projectionObj $in, projectionObj $out)

Project the rectangle from "in" projection (1st argument) to "out" projection (2nd argument). Returns MS_SUCCESS/MS_FAILURE.

int
set(string $property_name, $new_value)

Set object property to a new value.

void
setextent(float $minx, float $miny, float $maxx, float $maxy)

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

Return Value

RectObj

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.

Parameters

mapObj $map
layerObj $layer
imageObj $img
int $class_index
string $text

Return Value

int

final float fit(int $width, int $height)

Adjust extents of the rectangle to fit the width/height specified.

Parameters

int $width
int $height

Return Value

float

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.

Parameters

projectionObj $in
projectionObj $out

Return Value

int

final int set(string $property_name, $new_value)

Set object property to a new value.

Parameters

string $property_name
$new_value

Return Value

int

final void setextent(float $minx, float $miny, float $maxx, float $maxy)

Set the rectangle extents.

Parameters

float $minx
float $miny
float $maxx
float $maxy

Return Value

void