14. Specifying Display Attributes

14.1 Defining the display: the <display> tag

X2D documents will be viewed on many different devices, ranging from murals to PDAs to monitors. Since these displays will have many different resolutions, it is important that X2D documents can be viewed correctly across the varying screen sizes.

The <display> tag allows the user to specify the display attributes for which the X2D document was intended, such as its dimensions, color capabilities, type, etc. By providing a <display> description, X2D documents that were intended for a particular display can be viewed correctly on other displays by reconfiguring the X2D components for the new display.

<x2d w="100" h="100">
  <display dim="3796 1436"/>

The <display> tag can be specified per component. This allows authors to compose components made for different displays in a single document. The <display> tag will apply to all nested elements within a container, unless the nested elements themselves contain <display> tags.

In some instances this reconfiguration will not be desired. To prevent automatic reconfiguration, the reconfigurable attribute can be set to false.

14.2 Examples

Suppose a user created a document on a workstation window which has a resolution of 900x300. Now the user wants to display the document on a mural with resolution 3600x1200. The X2D browser will be able to scale the document's dimensions to the mural's size so that it is shown at the mural's resolution, rather than a tiny box in the corner of the display.

Another scenario may involve reconfiguring color. Suppose an image was created on a display with 24-bit color and then is to be displayed on a Palm Pilot with four levels of gray. The browser can perform the necessary color transformations to make the image viewable on the Palm Pilot.