RasterStyle
Description
A RasterStyle element defines a style for a raster image.
Context
Table 1 lists the elements that can contain, or be contained by, a RasterStyle element.
Contained by | Element | Contains |
---|---|---|
NamedStyle or CompositeStyle |
RasterStyle |
(empty) |
Attributes
Table 2 lists the attributes of a RasterStyle 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 |
transparent |
A boolean value ( The |
transparent-color |
A string value specifying the color to be displayed with an The value can be any valid CSS color. (See http://www.w3.org/TR/REC-CSS1#color-units.) The default color is black. |
Example
This example specifies a raster image style that sets any red areas to transparent.
<?xml version="1.0" encoding="UTF-8"?>
<NamedStyle
version="MXP_WorkSpace_1_5"
xmlns="http://www.mapinfo.com/mxp">
<RasterStyle
id="mirasterstyle"
name="mirasterstyle"
contrast="0.5"
brightness="0.5"
opacity="1"
grayscale="false"
transparent="true"
transparent-color="red"/>
</NamedStyle>