mapscript.scalebarObj

class mapscript.scalebarObj

The SCALEBAR object

Overview

The scalebarObj has the following relationships:

../../../_images/scalebarObj_labelObj.png ../../../_images/scalebarObj_mapObj.png

Attributes

align

int See ALIGN

backgroundcolor

colorObj Scalebar background color - see BACKGROUNDCOLOR

color

colorObj Scalebar foreground color - see COLOR

height

int Height in pixels - see SIZE

imagecolor

colorObj Background color of scalebar - see IMAGECOLOR

intervals

int Number of intervals - see INTERVALS

label

labelObj Scalebar label - see LABEL

offsetx

int See OFFSET

offsety

int See OFFSET

outlinecolor

colorObj Foreground outline color - see OUTLINECOLOR

position

int For embeded scalebars - see POSITION - MS_UL, MS_UC, MS_UR, MS_LL, MS_LC, or MS_LR

postlabelcache

int See POSTLABELCACHE - MS_TRUE or MS_FALSE

status

int ON, OFF or EMBED - see STATUS - MS_ON, MS_OFF, or MS_EMBED.

style

int 0 or 1 - see STYLE

thisown

The membership flag

transparent

int Allows transparency for an embedded scalebar - see TRANSPARENT

units

int See UNITS

width

int Height in pixels - see SIZE

Methods

__init__()[source]
convertToString() char[source]

Saves the object to a string. Provides the inverse option for updateFromString.

updateFromString(snippet: char) int[source]

Update a scalebar from a string snippet. Returns MS_SUCCESS or MS_FAILURE