mapscript.symbolObj¶
- class mapscript.symbolObj(symbolname: char, imagefile: char const = None)¶
The SYMBOL object
Overview
The symbolObj has the following relationships:
Attributes
anchorpoint_x
double See ANCHORPOINT
anchorpoint_y
double See ANCHORPOINT
character
char For TrueType symbols - see CHARACTER
filled
font
char For TrueType symbols - see FONT
imagepath
char immutable Path to pixmap file - see IMAGE
inmapfile
int Boolean value for writing - if set to
TRUE
, the symbol will be saved inside the Mapfile.maxx
double
MS_SYMBOL_VECTOR
andMS_SYMBOL_ELLIPSE
optionmaxy
double
MS_SYMBOL_VECTOR
andMS_SYMBOL_ELLIPSE
optionminx
double
MS_SYMBOL_VECTOR
andMS_SYMBOL_ELLIPSE
optionminy
double
MS_SYMBOL_VECTOR
andMS_SYMBOL_ELLIPSE
optionname
char Symbol name - see NAME
numpoints
int immutable Number of points of a vector symbol
refcount
int immutable Reference counter
sizex
double
MS_SYMBOL_VECTOR
andMS_SYMBOL_ELLIPSE
optionsizey
double
MS_SYMBOL_VECTOR
andMS_SYMBOL_ELLIPSE
optionthisown
The membership flag
transparent
int TODO Remove
transparentcolor
int TODO Remove
type
int See TYPE
Methods
- __init__(symbolname: char, imagefile: char const = None)[المصدر]¶
Create new default
symbolObj
namedsymbolname
. Ifimagefile
is specified, then the symbol will be of typeMS_SYMBOL_PIXMAP
.
- getImage(input_format: outputFormatObj) imageObj [المصدر]¶
Returns a pixmap symbol's imagery as an
imageObj
.
- setImage(image: imageObj) int [المصدر]¶
Set a pixmap symbol's imagery from image. Returns
MS_SUCCESS
orMS_FAILURE
- setImagepath(imagefile: char const) int [المصدر]¶
Sets the
imagefile
path for aMS_SYMBOL_PIXMAP
. ReturnsMS_SUCCESS
orMS_FAILURE