• No results found

A font style specifies the visual characteristics of a string of text.

FontStyle

Description

The FontStyle element defines a style for a text string.

Context

Table 24: Contexton page 145 lists the elements that can contain, or be contained by, a FontStyle element. Table 24: Context Contains Element Contained by (empty) FontStyle NamedStyle orCompositeStyle Attributes

Table 25: Attributeson page 145 lists the attributes of a FontStyle element.

Table 25: Attributes

Description Attribute

A unique identifier for the element. id

A descriptive name for the element. name

A string value specifying the name of a TrueType font. family

The family attribute is optional. The default value is arial. A floating-point value specifying the font size.

size

The size attribute is optional. The default value is 12.

A reference to a length in the mapinfo codespace, which specifies the unit of measurement used for the size attribute.

size-unit

The size-unit attribute is optional. The default value is mapinfo:length pt.

A string value specifying the color of the font. stroke

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

The stroke attribute is optional. The default value is black. A floating-point value from 0 to 1 specifying the opacity of the font. stroke-opacity

A value of 0 means that the font is totally transparent. A value of 1 means that the font is totally opaque. A value of 0.5 means that the font is 50% translucent.

An enumeration value specifying the font style. Possible values are: font-style

• normal • italic • oblique

The font-style attribute is optional. The default value is normal. A string value specifying the color of the text effect provided by the effect-typeattribute.

effect

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

The effect attribute is optional. The default value is none.

A floating-point value from 0 to 1 specifying the opacity of the text effect. effect-opacity

A value of 0 means that the effect is totally transparent. A value of 1 means that the effect is totally opaque. A value of 0.5 means that the effect is 50% translucent.

The effect-opacity attribute is optional. The default value is 1. An enumeration value specifying the text effect type. Possible values are: effect-type

• box • halo

• glyph-outline • none

The effect-type attribute is optional. The default value is none. An enumeration value specifying the font weight. Possible values are: font-weight • normal • bold • 100 • 200 • 300 • 400 • 500 • 600 • 700 • 800 • 900

normalis equivalent to 200; bold is equivalent to 400.

Note:

The font-weight attribute is optional. The default value is normal. A string value specifying the text decoration.

text-decoration

The value must have the following pattern: a choice of one or more of (underline | line-through) separated by a single space or the single value none. Examples: line-through underline, underline, none. The text-decoration attribute is optional. The default value is none.

Description Attribute

An enumeration value specifying the text case. Possible values are: text-case

• upper • lower • default

defaultmeans 'retain the current case'.

Note:

The text-case attribute is optional. The default value is default. A boolean value (true or false) specifying whether to have a drop-shadow drawn behind the font. A value of false (the default) specifies no

drop-shadow. shadow

The shadow attribute is optional. The default value is false.

A boolean value (true or false) specifying whether a space character should be inserted between each pair of visible characters in the text string. expand

The expand attribute is optional. The default value is false.

Example

This example specifies a 12-point black sans serif font.

<?xml version="1.0" encoding="UTF-8"?> <NamedStyle

version="MXP_WorkSpace_1_5"

xmlns="http://www.mapinfo.com/mxp">

<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"/> </NamedStyle>

Symbol Styles

A symbol style specifies the visual characteristics of a symbol.

FontSymbol

Description

Table 26: Contexton page 148 lists the elements that can contain, or be contained by, a FontSymbol element. Table 26: Context Contains Element Contained by (empty) FontSymbol NamedStyle orPointStyle Attributes

Table 27: Attributeson page 148 lists the attributes of a FontSymbol element.

Table 27: Attributes

Description Attribute

A unique identifier for the element. id

A descriptive name for the element. name

A one-character string value specifying the symbol character to use. text

If the family attribute is set to the name of a TrueType font, set this attribute to the character for the font symbol.

If the family attribute is set to MapInfo 3.0 Compatible or MapInfo Symbols, refer to the set of symbols and symbol codes shown inMapInfo 3.0 Symbol Codeson page 163.

Either of the following: family

• A string value specifying the name of a TrueType symbol font (for example, "WingDings").

• The string value MapInfo 3.0 Compatible or MapInfo Symbols, specifying the symbols shown inMapInfo 3.0 Symbol Codeson page 163. The family attribute is optional. The default value is arial.

A floating-point value specifying the size of the symbol. size

The size attribute is optional. The default value is 12.

A reference to a length in the mapinfo codespace, which specifies the unit of measurement used for the size attribute.

size-unit

The size-unit attribute is optional. The default value is mapinfo:length pt.

A string value specifying the color of the symbol. stroke

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

The stroke attribute is optional. The default value is black. A floating-point value from 0 to 1 specifying the opacity of the symbol. stroke-opacity

A value of 0 means that the symbol is totally transparent. A value of 1 means that the symbol is totally opaque. A value of 0.5 means that the symbol is 50% translucent.

Description Attribute

The stroke-opacity attribute is optional. The default value is 1. An enumeration value specifying the font style. Possible values are: font-style

• normal • italic • oblique

The font-style attribute is optional. The default value is normal. A string value specifying the color of the text effect provided by the effect-typeattribute.

effect

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

The effect attribute is optional. The default value is none.

A floating-point value from 0 to 1 specifying the opacity of the text effect. effect-opacity

A value of 0 means that the effect is totally transparent. A value of 1 means that the effect is totally opaque. A value of 0.5 means that the effect is 50% translucent.

The effect-opacity attribute is optional. The default value is 1. An enumeration value specifying the text effect type. Possible values are: effect-type

• box • halo

• glyph-outline • none

The effect-type attribute is optional. The default value is none. An enumeration value specifying the font weight. Possible values are: font-weight • normal • bold • 100 • 200 • 300 • 400 • 500 • 600 • 700 • 800 • 900

normalis equivalent to 200; bold is equivalent to 400.

Note:

The font-weight attribute is optional. The default value is normal. A string value specifying the text decoration.

text-decoration

The value must have the following pattern: a choice of one or more of (underline | line-through) separated by a single space or the single value none. Examples: line-through underline, underline, none.

The text-decoration attribute is optional. The default value is none. An enumeration value specifying the text case. Possible values are: text-case

• upper • lower • default

defaultmeans 'retain the current case'.

Note:

The text-case attribute is optional. The default value is default. A boolean value (true or false) specifying whether to have a drop-shadow drawn behind the symbol. A value of false (the default) specifies no drop-shadow.

shadow

The shadow attribute is optional. The default value is false.

A boolean value (true or false) specifying whether a space character should be inserted between each pair of visible characters in the text string. expand

The expand attribute is optional. The default value is false. A floating-point value specifying the rotation angle of the symbol. angle

A string value specifying the unit of measurement used for the angle attribute. angle-unit

Examples

This example specifies an 18-point red push-pin symbol from theMapInfo 3.0 Symbolsset.

Note that the text attribute is set to C, which is decimal code 67 in the UTF-8 encoding, and the family attribute is set to MapInfo Symbols, which specifies the MapInfo 3.0 Symbols set. In the MapInfo 3.0 Symbols set, code 67 specifies a push-pin symbol.

<?xml version="1.0" encoding="UTF-8"?> <NamedStyle version="MXP_WorkSpace_1_5" xmlns="http://www.mapinfo.com/mxp"> <FontSymbol size="18" size-unit="mapinfo:length pt" stroke="red" stroke-opacity="1" text="C" family="MapInfo Symbols"/> </NamedStyle>

This example specifies a 14-point blue star symbol from theMapInfo 3.0 Symbolsset.

Note that the text attribute is set to #, which is decimal code 35 in the UTF-8 encoding, and the family attribute is set to MapInfo Symbols, which specifies the MapInfo 3.0 Symbols set. In the MapInfo 3.0 Symbols set, code 35 specifies a star symbol.

<?xml version="1.0" encoding="UTF-8"?> <NamedStyle

version="MXP_WorkSpace_1_5" xmlns="http://www.mapinfo.com/mxp"> <FontSymbol size="14" size-unit="mapinfo:length pt" stroke="blue" stroke-opacity="1" text="#" family="MapInfo Symbols"/> </NamedStyle>

Image Styles

An image style specifies the visual characteristics of an image.

RasterStyle

Description

A RasterStyle element defines a style for a raster image.

Context

Table 28: Contexton page 151 lists the elements that can contain, or be contained by, a RasterStyle element. Table 28: Context Contains Element Contained by (empty) RasterStyle NamedStyle orCompositeStyle Attributes

Table 29: Attributeson page 151 lists the attributes of a RasterStyle element.

Table 29: Attributes

Description Attribute

A unique identifier for the element. id

A descriptive name for the element. name

A floating-point value from 0 to 1 specifying the contrast of the image. contrast

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 contrast attribute is optional. The default value is 0.5.

A floating-point value from 0 to 1 specifying the brightness of the image. brightness

Brightness is a measure of the lightness of 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 brightness attribute is optional. The default value is 0.5. A floating-point value from 0 to 1 specifying the opacity of the image. opacity

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 opacity attribute is optional. The default value is 1.

A boolean value (true or false) specifying whether the image should be displayed using only shades of gray, ranging from white to black.

grayscale

The grayscale attribute is optional. The default value is false.

A boolean value (true or false) specifying whether the color identified by transparent-colorshould be displayed with an opacity of 0

(transparent). transparent

The transparent attribute is optional. The default value is false. A string value specifying the color to be displayed with an opacity of 0 if transparentis set to true.

transparent-color

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

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>

GridStyle

Description

Context

Table 30: Contexton page 153 lists the elements that can contain, or be contained by, a GridStyle element. Table 30: Context Contains Element Contained by GridInflectionList GridStyle NamedStyle orCompositeStyle Attributes

Table 31: Attributeson page 153 lists the attributes of a GridStyle element.

Table 31: Attributes

Description Attribute

A unique identifier for the element. id

A descriptive name for the element. name

A floating-point value from 0 to 1 specifying the contrast of the image. contrast

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 contrast attribute is optional. The default value is 0.5.

A floating-point value from 0 to 1 specifying the brightness of the image. brightness

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 brightness attribute is optional. The default value is 0.5. A floating-point value from 0 to 1 specifying the opacity of the image. opacity

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 opacity attribute is optional. The default value is 1.

A boolean value (true or false) specifying whether the image should be displayed using only shades of gray, ranging from white to black.

grayscale

The grayscale attribute is optional. The default value is false. A boolean value (true or false) specifying whether to display the grid image with relief shading in order to provide a more 3D appearance. show-hillshade

The show-hillshade attribute is optional. The default value is false. A string value specifying the color used to indicate that a value is null. null-color

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.)

This attribute has no effect if null-transparent is true.

Note:

A boolean value (true or false) specifying whether null values should be displayed as transparent (true) or displayed as the color specified in null-color(false).

null-transparent

The null-transparent attribute is optional. The default value is false.

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>

GridInflectionList

Description

A GridInflectionList element defines an ordered collection of inflection points (as defined by a series of zero or moreGridInflectionelements) used to interpret a Grid file.

The contained collection ofGridInflectionelements must be ordered in ascending order of the value attribute.

A value in the data that lies between two GridInflections will have its color determined by blending the colors at the two inflection points.

Context

Table 32: Contexton page 155 lists the elements that can contain, or be contained by, a GridInflectionListelement.

Table 32: Context Contains Element Contained by GridInflection GridInflectionList GridStyle Attributes

The GridInflectionList element has no attributes.

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>

GridInflection

Description

A GridInflection element defines a style for a grid inflection point. A grid inflection point indicates that a cell with the specified value should be rendered with the specified color.

Context

Table 33: Contexton page 156 lists the elements that can contain, or be contained by, a GridInflectionelement.

Contains Element Contained by (empty) GridInflection GridInflectionList Attributes

Table 34: Attributeson page 156 lists the attributes of a GridInflection element.

Table 34: Attributes

Description Attribute

A floating-point value specifying the value of the grid inflection point. value

This attribute is required.

Note:

A string value specifying the color of the grid inflection point. color

The value can be any valid CSS color. (See

http://www.w3.org/TR/REC-CSS1#color-units.) This attribute is required.

Note:

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>

Related documents