Defs

説明

Defs 要素は、Interior 要素で参照する Pattern 要素のコンテナとして使用します。

コンテキスト

表 1に、Defs 要素を含むことができる要素と、これに含めることができる要素の一覧を示します。

表 1. コンテキスト
これを含む要素 要素 が次の値を含む

Interior

Defs

Pattern

属性

Defs 要素に属性はありません。

この例は、Pattern 要素に Defs 要素が含まれ、さらにその中に含まれる Interior 要素を示します。Interior 要素の fill 属性が、ここで定義されている Pattern 要素の id 属性を参照している点に注意してください。



<?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>