Defs

Description

The Defs element serves as a container for a Pattern element that is referred to by an Interior element.

Context

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

Table 1. Context
Contained by Element Contains

Interior

Defs

Pattern

Attributes

The Defs element has no attributes.

Example

This example shows a Pattern element contained within a Defs element, which is in turn contained within an Interior element. Note how the Interior element's fill attribute refers to the underlying Pattern element by its id attribute.

<?xml version="1.0" encoding="UTF-8"?>
<NamedStyle
    version="MXP_WorkSpace_1_5"
    xmlns="http://www.mapinfo.com/mxp">
    <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>
</NamedStyle>