mapscript.symbolObj

class mapscript.symbolObj(symbolname: char, imagefile: char const = None)

The SYMBOL object

Overview

The symbolObj has the following relationships:

../../../_images/symbolObj_symbolSetObj.png

Attributes

anchorpoint_x

double See ANCHORPOINT

anchorpoint_y

double See ANCHORPOINT

character

char For TrueType symbols - see CHARACTER

filled

int MS_TRUE or MS_FALSE - see 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 and MS_SYMBOL_ELLIPSE option

maxy

double MS_SYMBOL_VECTOR and MS_SYMBOL_ELLIPSE option

minx

double MS_SYMBOL_VECTOR and MS_SYMBOL_ELLIPSE option

miny

double MS_SYMBOL_VECTOR and MS_SYMBOL_ELLIPSE option

name

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 and MS_SYMBOL_ELLIPSE option

sizey

double MS_SYMBOL_VECTOR and MS_SYMBOL_ELLIPSE option

thisown

The membership flag

transparent

int TODO Remove

transparentcolor

int TODO Remove

type

int See TYPE

Methods

__init__(symbolname: char, imagefile: char const = None)[źródło]

Create new default symbolObj named symbolname. If imagefile is specified, then the symbol will be of type MS_SYMBOL_PIXMAP.

getImage(input_format: outputFormatObj) imageObj[źródło]

Returns a pixmap symbol’s imagery as an imageObj.

getPoints() lineObj[źródło]

Returns the symbol points as a lineObj.

setImage(image: imageObj) int[źródło]

Set a pixmap symbol’s imagery from image. Returns MS_SUCCESS or MS_FAILURE

setImagepath(imagefile: char const) int[źródło]

Sets the imagefile path for a MS_SYMBOL_PIXMAP. Returns MS_SUCCESS or MS_FAILURE

setPoints(line: lineObj) int[źródło]

Sets the symbol points from the points of line. Returns the updated number of points.