mapscript.styleObj¶
- class mapscript.styleObj(parent_class: classObj | None = None)¶
The STYLE object. An instance of styleObj is associated with one instance of
classObj
.Overview
The styleObj has the following relationships:
Attributes
angle
double Angle, given in degrees, to draw the line work, default is 0, for symbols of Type HATCH, this is the angle of the hatched lines - see ANGLE
antialiased
int See ANTIALIAS
autoangle
int If the angle is set to
AUTO
- see ANGLEcolor
gap
double See GAP - moved from symbolObj in version 6.0
initialgap
double See INITIALGAP
linecap
int See LINECAP
linejoin
int See LINEJOIN - moved from symbolObj in version 6.0
linejoinmaxsize
double See LINEJOINMAXSIZE - moved from symbolObj in version 6.0
maxcolor
colorObj
Maximum color in the COLORRANGEmaxscaledenom
double See MAXSCALEDENOM
maxsize
double Maximum pen or symbol width for scaling - see MAXSIZE
maxvalue
double related to color ranges
maxwidth
double Maximum width of the symbol - see MAXWIDTH
mincolor
colorObj
Minimum color in the COLORRANGEminscaledenom
double See MINSCALEDENOM
minsize
double Minimum pen or symbol width for scaling styles - see MINSIZE
minvalue
double related to color ranges
minwidth
double Minimum width of the symbol - see MINWIDTH
offsetx
double Draw with pen or symbol offset from map data, for shadows, hollow symbols, etc - see OFFSET
offsety
double Draw with pen or symbol offset from map data, for shadows, hollow symbols, etc - see OFFSET
opacity
int See OPACITY
outlinecolor
colorObj
Outline pen color - see OUTLINECOLORoutlinewidth
double See OUTLINEWIDTH
pattern
pattern : list Python Only
patternlength
int immutable Number of elements in the pattern attribute
polaroffsetangle
double Specified the angle - see POLAROFFSET
polaroffsetpixel
double Specifies the radius/distance - see POLAROFFSET
rangeitem
char Attribute/field that stores the values for the Color Range Mapping - see RANGEITEM
rangeitemindex
int The index of the range item - see RANGEITEM
refcount
int immutable number of references to this object
size
double Pixel width of the style's pen or symbol - see SIZE
sizeunits
int Supersedes class's SIZEUNITS to allow fine-grained sizing for improved SLD (RFC 124)
symbol
int The index within the map symbolset of the style's symbol - see SYMBOL
symbolname
char immutable Name of the style's symbol - see symbolname
thisown
The membership flag
width
double Width refers to the thickness of line work drawn, in pixels - default is 1, for symbols of type
HATCH
, the with is how thick the hatched lines are - see WIDTHMethods
- __init__(parent_class: classObj | None = None)[Quellcode]¶
Returns new default
styleObj
instance. Theparent_class
is optional.
- clone() styleObj [Quellcode]¶
Return an independent copy of the style with no parent class.
Bemerkung
In the Java & PHP modules this method is named
cloneStyle
.
- convertToString() char [Quellcode]¶
Saves the object to a string. Provides the inverse option for
styleObj.updateFromString()
- getBinding(binding: int) char const [Quellcode]¶
Get the attribute binding for a specified style property. Returns NULL if there is no binding for this property.
- getGeomTransform() char [Quellcode]¶
Get the GEOMTRANSFORM for the style.
- pattern_get() void [Quellcode]¶
Python Only** Get the pattern for the style.
- pattern_set(nListSize: int) void [Quellcode]¶
Python Only** Set the pattern for the style.
- removeBinding(binding: int) int [Quellcode]¶
Remove the attribute binding for a specified style property.
- setBinding(binding: int, item: char const) int [Quellcode]¶
Remove the attribute binding for a specified style property.
- setGeomTransform(transform: char) void [Quellcode]¶
Set the GEOMTRANSFORM for the style.
- setSymbolByName(map: mapObj, symbolname: char) int [Quellcode]¶
Setting the symbol of the
styleObj
given the reference of the map object and the symbol name.
- updateFromString(snippet: char) int [Quellcode]¶
Update a style from a string snippet. Returns
MS_SUCCESS
orMS_FAILURE