GridStyle
Description
A GridStyle element defines a style for a MapInfo grid image.
Context
Table 1 lists the elements that can contain, or be contained by, a GridStyle element.
Contained by | Element | Contains |
---|---|---|
NamedStyle or CompositeStyle |
GridStyle |
Attributes
Table 2 lists the attributes of a GridStyle element.
Attribute | Description |
---|---|
id |
A unique identifier for the element. |
name |
A descriptive name for the element. |
contrast |
A floating-point value from 0 to 1 specifying the contrast of the image. A value of 0 means that the image has minimum contrast. A value of 1 means that the image has maximum contrast. A value of 0.5 means that the image has 50% contrast. The |
brightness |
A floating-point value from 0 to 1 specifying the brightness of the image. Brightness is a measure of the lightness or darkness of the image. A value of 0 means that the image has minimum brightness. A value of 1 means that the image has maximum brightness. A value of 0.5 means that the image has 50% brightness. The |
opacity |
A floating-point value from 0 to 1 specifying the opacity of the image. A value of 0 means that the image is totally transparent. A value of 1 means that the image is totally opaque. A value of 0.5 means that the image is 50% translucent. The |
grayscale |
A boolean value ( The |
show-hillshade |
A boolean value ( The |
null-color |
A string value specifying the color used to indicate that a value is null. The value can be any valid CSS color. (See http://www.w3.org/TR/REC-CSS1#color-units.) The Note: This attribute has no effect if
null-transparent is true . |
null-transparent |
A boolean value ( The |
Example
This example specifies a grid image style that contains a collection of three grid inflection points.
<?xml version="1.0" encoding="UTF-8"?>
<NamedStyle
version="MXP_WorkSpace_1_5"
xmlns="http://www.mapinfo.com/mxp">
<GridStyle
id="migridstyle"
name="migridstyle"
contrast="0.5"
brightness="0.5"
opacity="1"
grayscale="false"
show-hillshade="false"
null-color="black"
null-transparent="true"/>
<GridInflectionList>
<GridInflection
value="0.4"
color="yellow"/>
<GridInflection
value="0.5"
color="green"/>
<GridInflection
value="0.6"
color="blue"/>
</GridInflectionList>
</GridStyle>
</NamedStyle>