<replaceable>x2</replaceable> , <replaceable>y2</replaceable> ) )
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ( <replaceable>x2</replaceable> , <replaceable>y2</replaceable> )
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , <replaceable>x2</replaceable> , <replaceable>y2</replaceable>
</synopsis>
where
<literal>(<replaceable>x1</replaceable>,<replaceable>y1</replaceable>)</literal>
and
<literal>(<replaceable>x2</replaceable>,<replaceable>y2</replaceable>)</literal>
are any two opposite corners of the box.
</para>
<para>
Boxes are output using the second syntax.
</para>
<para>
Any two opposite corners can be supplied on input, but the values
will be reordered as needed to store the
upper right and lower left corners, in that order.
</para>
</sect2>
<sect2 id="datatype-geometric-paths">
<title>Paths</title>
<indexterm>
<primary>path (data type)</primary>
</indexterm>
<para>
Paths are represented by lists of connected points. Paths can be
<firstterm>open</firstterm>, where
the first and last points in the list are considered not connected, or
<firstterm>closed</firstterm>,
where the first and last points are considered connected.
</para>
<para>
Values of type <type>path</type> are specified using any of the following
syntaxes:
<synopsis>
[ ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) ]
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable>
</synopsis>
where the points are the end points of the line segments
comprising the path. Square brackets (<literal>[]</literal>) indicate
an open path, while parentheses (<literal>()</literal>) indicate a
closed path. When the outermost parentheses are omitted, as
in the third through fifth syntaxes, a closed path is assumed.
</para>
<para>
Paths are output using the first or second syntax, as appropriate.
</para>
</sect2>
<sect2 id="datatype-polygon">
<title>Polygons</title>
<indexterm>
<primary>polygon</primary>
</indexterm>
<para>
Polygons are represented by lists of points (the vertices of the
polygon). Polygons are very similar to closed paths; the essential
semantic difference is that a polygon is considered to include the
area within it, while a path is not.
</para>
<para>
An important implementation difference between polygons and
paths is that the stored representation of a polygon includes its
smallest bounding box. This speeds up certain search operations,
although computing the bounding box adds overhead while constructing
new polygons.
</para>
<para>
Values of type <type>polygon</type> are specified using any of the
following syntaxes:
<synopsis>
( ( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> ) )
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> ) , ... , ( <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
( <replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable> , <replaceable>yn</replaceable> )
<replaceable>x1</replaceable> , <replaceable>y1</replaceable> , ... , <replaceable>xn</replaceable>