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)[source]¶
Create new default
symbolObj
namedsymbolname
. Ifimagefile
is specified, then the symbol will be of typeMS_SYMBOL_PIXMAP
.
- getImage(input_format: mapscript.outputFormatObj) mapscript.imageObj [source]¶
Returns a pixmap symbol’s imagery as an
imageObj
.
- getPoints() mapscript.lineObj [source]¶
Returns the symbol points as a
lineObj
.
- setImage(image: mapscript.imageObj) int [source]¶
Set a pixmap symbol’s imagery from image. Returns
MS_SUCCESS
orMS_FAILURE
- setImagepath(imagefile: char const) int [source]¶
Sets the
imagefile
path for aMS_SYMBOL_PIXMAP
. ReturnsMS_SUCCESS
orMS_FAILURE
- setPoints(line: mapscript.lineObj) int [source]¶
Sets the symbol points from the points of line. Returns the updated number of points.