labelObj
final class labelObj (View source)
labelObj are always embedded inside other classes.
Properties
int | $align | ||
float | $angle | ||
int | $anglemode | ||
int | $antialias | ||
int | $autominfeaturesize | ||
colorObj | $backgroundcolor | (deprecated since 6.0) |
|
colorObj | $backgroundshadowcolor | (deprecated since 6.0) |
|
int | $backgroundshadowsizex | (deprecated since 6.0) |
|
int | $backgroundshadowsizey | (deprecated since 6.0) |
|
int | $buffer | ||
colorObj | $color | ||
string | $encoding | ||
string | $font | ||
int | $force | ||
int | $maxlength | ||
int | $maxsize | ||
int | $mindistance | ||
int | $minfeaturesize | ||
int | $minlength | ||
int | $minsize | ||
int | $numstyles | ||
int | $offsetx | ||
int | $offsety | ||
colorObj | $outlinecolor | ||
int | $outlinewidth | ||
int | $partials | ||
int | $position | ||
int | $priority | ||
int | $repeatdistance | ||
colorObj | $shadowcolor | ||
int | $shadowsizex | ||
int | $shadowsizey | ||
int | $size | ||
int | $wrap |
Methods
No description
Saves the object to a string. Provides the inverse option for updateFromString.
Delete the style specified by the style index. If there are any style that follow the deleted style, their index will decrease by 1.
Free the object properties and break the internal references.
Get the attribute binding for a specified label property. Returns NULL if there is no binding for this property.
Returns the label expression string.
Return the style object using an index. index >= 0 && index < label->numstyles.
Returns the label text string.
The style specified by the style index will be moved down into the array of classes. Returns MS_SUCCESS or MS_FAILURE.
The style specified by the style index will be moved up into the array of classes. Returns MS_SUCCESS or MS_FAILURE.
Remove the attribute binding for a specfiled style property.
Set object property to a new value.
Set the attribute binding for a specified label property.
Set the label expression.
Set the label text.
Update a label from a string snippet. Returns MS_SUCCESS/MS_FAILURE.
Details
final
__construct()
No description
final string
convertToString()
Saves the object to a string. Provides the inverse option for updateFromString.
final int
deleteStyle(int $index)
Delete the style specified by the style index. If there are any style that follow the deleted style, their index will decrease by 1.
final void
free()
Free the object properties and break the internal references.
Note that you have to unset the php variable to free totally the resources.
final string
getBinding(mixed $labelbinding)
Get the attribute binding for a specified label property. Returns NULL if there is no binding for this property.
Example: .. code-block:: php $oLabel->setbinding(MS_LABEL_BINDING_COLOR, "FIELD_NAME_COLOR"); echo $oLabel->getbinding(MS_LABEL_BINDING_COLOR); // FIELD_NAME_COLOR
final string
getExpressionString()
Returns the label expression string.
final styleObj
getStyle(int $index)
Return the style object using an index. index >= 0 && index < label->numstyles.
final string
getTextString()
Returns the label text string.
final int
moveStyleDown(int $index)
The style specified by the style index will be moved down into the array of classes. Returns MS_SUCCESS or MS_FAILURE.
ex label->movestyledown(0) will have the effect of moving style 0 up to position 1, and the style at position 1 will be moved to position 0.
final int
moveStyleUp(int $index)
The style specified by the style index will be moved up into the array of classes. Returns MS_SUCCESS or MS_FAILURE.
ex label->movestyleup(1) will have the effect of moving style 1 up to position 0, and the style at position 0 will be moved to position 1.
final int
removeBinding(mixed $labelbinding)
Remove the attribute binding for a specfiled style property.
Example: .. code-block:: php $oStyle->removebinding(MS_LABEL_BINDING_COLOR);
final int
set(string $property_name, $new_value)
Set object property to a new value.
final int
setBinding(mixed $labelbinding, string $value)
Set the attribute binding for a specified label property.
Example: .. code-block:: php $oLabel->setbinding(MS_LABEL_BINDING_COLOR, "FIELD_NAME_COLOR"); This would bind the color parameter with the data (ie will extract the value of the color from the field called "FIELD_NAME_COLOR"
final int
setExpression(string $expression)
Set the label expression.
final int
setText(string $text)
Set the label text.
final int
updateFromString(string $snippet)
Update a label from a string snippet. Returns MS_SUCCESS/MS_FAILURE.