CompositeStyle

Description

A CompositeStyle element defines a composite style that comprises zero or one of each of the following: AreaStyle, LineStyle, RasterStyle, FontStyle, GridStyle, PointStyle, and MapinfoTextObjectStyle.

Context

Table 1 lists the elements that can contain, or be contained by, a CompositeStyle element.

Table 1. Context
Contained by Element Contains

NamedStyle

CompositeStyle

Zero or one of each of the following:

Attributes

Table 2 lists the attributes of a CompositeStyle element.

Table 2. Attributes
Attribute Description

id

A unique identifier for the element.

name

A descriptive name for the element.

Example

This example specifies a composite style that has these features:

  • An area filled with a solid light green color, bounded by a 1-pixel dashed black line.
  • A 12-point sans serif font for the text content, and 1-pixel black line for the callout line.
<?xml version="1.0" encoding="UTF-8"?>
<NamedStyle
    version="MXP_WorkSpace_1_5"
    xmlns="http://www.mapinfo.com/mxp"
    xmlns:gml="http://www.opengis.net/gml"
    <CompositeStyle>
        <AreaStyle>
            <LineStyle
                width="1"
                width-unit="mapinfo:imagesize pixel">
                <Pen>mapinfo:pen 9</Pen>
            </LineStyle>
            <Interior fill-opacity="1" fill="(#id7)">
                <Defs>
                    <Pattern id="id7">
                        <Bitmap uri="mapinfo:brush 2">
                            <ColorAdjustmentSet>
                                <ColorAdjustment
                                    color-1="nonWhite"
                                    color-2="rgb(224,255,176)"
                                    opacity="1"/>
                                <ColorAdjustment
                                    color-1="white"
                                    color-2="white"
                                    opacity="1"/>
                            </ColorAdjustmentSet>
                        </Bitmap>
                    </Pattern>
                </Defs>
            </Interior>
        </AreaStyle>
        <MapinfoTextObjectStyle>
            <FontStyle
                family="Microsoft Sans Serif"
                font-style="normal"
                effect="white"
                effect-opacity="1"
                effect-type="none"
                font-weight="normal"
                text-decoration="none"
                text-case="default"
                shadow="false"
                expand="false"
                size="12"
                size-unit="mapinfo:length pt"
                stroke="black"/>
            <LineStyle
                stroke="black"
                stroke-opacity="1"
                width="1"
                width-unit="mapinfo:imagesize pixel">
                <Pen>mapinfo:pen 2</Pen>
            </LineStyle>
        </MapinfoTextObjectStyle>
    </CompositeStyle>
</NamedStyle>