Command: wcloth

Syntax

wcloth <window>, <xmlfile>

Description

Define the backcloth characteristics for a graphic window. A backcloth is one or more image files over which entity graphics are displayed.

Several layers (levels) of image files are permitted to accommodate different levels of detail.

Parameters

Switches

XML

The outer tag of the xml must be <cloth>.

<cloth> sub-tags

Within the <cloth> tag, the following tags are available (they provide general information for the whole cloth system):

Within the <cloth> tag, the following tags are available and their values are inherited by images defined within levels unless overridden within the <level> tag:

<level> sub-tags

Within each <level> tag, the following tags are available:

Within a <level> tag, the following tags are available and their values are inherited by images within the level unless individually overridden within the <image> or <tileset> sub-tags. If they are omitted, they inherit any values set by the enclosing <cloth> tag.

<image> sub-tags

An <image> tag defines an image to be displayed within its parent level. Within each <image> tag, the following tags are available:

Within an <image> tag, the following tags are available. If they are omitted, an image will inherit any values set by the enclosing <cloth> or <level> tags.

If the image file defines its own geopositioning, e.g. ECW, the <pixel_factor> tag may be omitted. Remember, the <angle> tag may not be used in conjunction with the <clip> or <mbr> tags.

<tileset> sub-tags

A <tileset> tag defines a matrix of contiguous tiled images to be displayed within its parent level. Within each <tileset> tag, the following tags are available:

Within an <tileset> tag, the following tags are available. If they are omitted, images inherit any values set by the enclosing <cloth> or <level> tags.

Notes

A window's backcloth characteristics may also be set to the contents of a file by setting the window.cloth attribute to the name of the xml file.

Earlier versions of Fire had a non-xml cloth definition. This is still supported but its use is discouraged because it will eventually be dropped. It can be reviewed here.

This command will also add a cloth layer to the window's window.layers array.

To illustrate image interpolation (specified via the interpolate tag) compare the 2 images below. The left image has interpolation on, the right image has interpolation off. Both are shown in a graphic window with a yellow background, with a file-to-screen pixel resolution of 6.

Examples

Consider an xml definition:

<?xml version="1.0" encoding="ISO-8859-1"?>
<cloth>
<title>Wilmington Test Cloth</title>
<thresholds>pixel_factor</thresholds>
<units>m</units>
<justification>TL</justification>
<level>
<title>Based on 8 meter image</title>
<pixel_factor>8</pixel_factor> <max>50</max>
<image>
<dims>638,638</dims>
<file>c:/delaware/layout/lev8/1_1.jpg</file>
<geo>186900,196200</geo>
</image>
</level>
<level>
<title>Based on 2.5 meter image</title>
<pixel_factor>2.5</pixel_factor>
<tileset>
<matrix>3,3</matrix>
<dims>680,680</dims><residue>680,680</residue>
<file>c:/delaware/layout/lev2.5/$x$_$y$.jpg</file>
<geo>186900,196200</geo>
</tileset>
</level>
<level>
<title>Based on 1 meter image</title>
<pixel_factor>1</pixel_factor>
<tileset>
<matrix>8,8</matrix>
<dims>680,680</dims><residue>340,340</residue>
<file>c:/delaware/layout/lev1/$x$_$y$.jpg</file>
<geo>186900,196200</geo>
</tileset>
</level>
<level>
<title>Based on 0.25 meter image</title>
<pixel_factor>0.25</pixel_factor> <min>0.1</min>
<tileset>
<matrix>30,30</matrix>
<dims>680,680</dims><residue>680,680</residue>
<file>c:/delaware/layout/lev0.25/$x$_$y$.jpg</file>
<geo>186900,196200</geo>
</tileset>
</level>
</cloth>

The above code, stored in a file named clothinfo.xml, could be assigned to a window by the following:

wcloth win1, clothinfo.xml

   or

win1.cloth = 'clothinfo.xml'

See Also

Commands:

rasdump, tile, window, wpaint

Structures:

window (graphic), window.cloth_layers, window.layers