# Image Rendering Reference

## Navigation:

Index General Information Elements Utils Examples

## Drawing Example

This example shows different ways of drawing elements, with different borders, background colors and thickness and it also shows how fields are placed onto drawn elements like lines or rectangles.

- Template: templates/example5.xsl
- Record: records/empty.xml

## Drawing Example (Template)

<xsl:stylesheet version="2.0" >
<xsl:template match="Record" >
<image height="300" width="400" >
<field border="2" height="30" width="150" x="10" y="20" >
<label font-size="18" >
Bordered field
</label>
</field>
<rect height="50" width="200" x="10" y="80" >
</rect>
<field background-color="black" border="2" border-color="white" height="30" valign="center" width="180" x="20" y="90" >
<label align="center" color="white" >
Label
</label>
</field>
<rect border="5" fill="false" height="50" width="50" x="10" y="150" >
</rect>
<line thickness="5" x-from="10" x-to="210" y-from="220" y-to="220" >
</line>
<rect border="5" height="20" width="300" x="10" y="250" >
</rect>
<line color="white" x-from="20" x-to="300" y-from="260" y-to="260" >
</line>
<line thickness="3" x-from="220" x-to="380" y-from="20" y-to="240" >
</line>
</image>
</xsl:template>
</xsl:stylesheet>

## Generated Image