<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?> 
<!DOCTYPE document SYSTEM "../rml.dtd"> 
<document filename="example_8.pdf"> 

<template>
	<pageTemplate id="main">
	<pageGraphics>
		<fill color="red"/>
		<setFont name="Helvetica" size="24"/>
		<drawCentredString x="297.5" y="800">Translate, Scale, Rotate and Skew</drawCentredString>
	</pageGraphics>
	<frame id="first" x1="72" y1="72" width="451" height="698"/> 
	</pageTemplate>
</template>

<stylesheet>
</stylesheet>

<story>
<h1>
Translate
</h1>

<illustration width="256" height="152">
	<lineMode width="2" cap="square"/>
	<lines>
		16 40 116 40
		16 40 16 140

		156 40 256 40
		156 40 156 140
	</lines>
	<setFont name="Times-Roman" size="12"/>
	<fill color="black"/>
	<drawCentredString x="58" y="12">Original</drawCentredString>

	<setFont name="Helvetica-Bold" size="50"/>
	<fill color="red"/>
	<drawString x="16" y="41">X</drawString>
	<translate dx="142"/>

	<setFont name="Times-Roman" size="12"/>
	<fill color="black"/>
	<drawCentredString x="58" y="12">dx=50 dy=50</drawCentredString>
	<!-- This is relative to the origin of the black lines in the illustration,
	     which is why it doesn't match the actual translate performed:
		 it is what the translate would be if the origin was at 15,40  -->

	<setFont name="Helvetica-Bold" size="50"/>

	<!-- this would give you a pale version of the original X -->
	<!--
	<fill color="lightpink"/>
	<stroke color="gray"/>
	<drawString x="15" y="41">X</drawString>
	-->
	
	<fill color="red"/>
	<stroke color="black"/>
	<translate dx="55" dy="91"/>
	<drawString x="0" y="0">X</drawString>
	<lineMode width="1" dash="5,4"/>
	<stroke color="lightgrey"/>
	<lines>
		0 0 0 50
		0 0 50 0
	</lines>
	<translate dx="-50" dy="-50"/>
	<lines>
		50 50 50 0
		8 50 50 50
	</lines>
	
</illustration>

<spacer length="20"/>


<h1>
Scale
</h1>
<illustration width="256" height="152">
	<lineMode width="2" cap="square"/>
	<lines>
		16 40 116 40
		16 40 16 140

		156 40 256 40
		156 40 156 140
	</lines>
	<setFont name="Times-Roman" size="12"/>
	<fill color="black"/>
	<drawCentredString x="58" y="12">Original</drawCentredString>

	<setFont name="Helvetica-Bold" size="50"/>
	<fill color="red"/>
	<drawString x="16" y="41">X</drawString>
	<translate dx="142"/>

	<setFont name="Times-Roman" size="12"/>
	<fill color="black"/>
	<drawCentredString x="58" y="12">sx=2 sy=2</drawCentredString>

	<setFont name="Helvetica-Bold" size="50"/>

	<!-- this would give you a pale version of the original X -->
	<!--
	<fill color="lightpink"/>
	<stroke color="gray"/>
	<drawString x="15" y="41">X</drawString>
	-->

	<fill color="red"/>
	<stroke color="black"/>
	<scale sx="2" sy="2"/>
	<drawString x="8" y="20.5">X</drawString>
	
</illustration>

<spacer length="20"/>


<h1>
Rotate
</h1>
<illustration width="256" height="152">
	<lineMode width="2" cap="square"/>
	<lines>
		16 40 116 40
		16 40 16 140

		156 40 256 40
		156 40 156 140
	</lines>
	<setFont name="Times-Roman" size="12"/>
	<fill color="black"/>
	<drawCentredString x="58" y="12">Original</drawCentredString>

	<setFont name="Helvetica-Bold" size="50"/>
	<fill color="red"/>
	<drawString x="56" y="41">P</drawString>
	<translate dx="142"/>

	<setFont name="Times-Roman" size="12"/>
	<fill color="black"/>
	<drawCentredString x="58" y="12">degrees = 45</drawCentredString>

	<setFont name="Helvetica-Bold" size="50"/>

	<fill color="red"/>
	<stroke color="black"/>
	<translate dx="52" dy="41"/>
	<fill color="red"/>
	<setFont name="Helvetica-Bold" size="50"/>
	<rotate degrees="45"/>
	<drawString x="0" y="0">P</drawString>
	
</illustration>

<spacer length="92"/>

<para><i>Examples continue on next page...</i></para>
<nextFrame/>

<para alignment="CENTER">
	<font size="18" face="Helvetica" color="red">
		(continued)
	</font>
</para>

<spacer length="15"/>

<illustration width="256" height="152">
	<lineMode width="2" cap="square"/>
	<lines>
		16 40 116 40
		16 40 16 140

		156 40 256 40
		156 40 156 140
	</lines>
	<setFont name="Times-Roman" size="12"/>
	<fill color="black"/>
	<drawCentredString x="58" y="12">Original</drawCentredString>

	<setFont name="Helvetica-Bold" size="50"/>
	<fill color="red"/>
	<drawString x="56" y="41">P</drawString>
	<translate dx="142"/>

	<setFont name="Times-Roman" size="12"/>
	<fill color="black"/>
	<drawCentredString x="58" y="12">degrees = - 45</drawCentredString>

	<setFont name="Helvetica-Bold" size="50"/>

	<fill color="red"/>
	<stroke color="black"/>
	<translate dx="62" dy="41"/>
	<fill color="red"/>
	<setFont name="Helvetica-Bold" size="50"/>
	<rotate degrees="-45"/>
	<drawString x="0" y="0">P</drawString>
	
</illustration>

<spacer length="20"/>


<h1>
Skew
</h1>

<illustration width="256" height="152">
	<lineMode width="2" cap="square"/>
	<lines>
		16 40 116 40
		16 40 16 140

		156 40 256 40
		156 40 156 140
	</lines>
	<setFont name="Times-Roman" size="12"/>
	<fill color="black"/>
	<drawCentredString x="58" y="12">Original</drawCentredString>

	<setFont name="Helvetica-Bold" size="50"/>
	<fill color="red"/>
	<drawString x="16" y="41">X</drawString>
	<translate dx="142"/>

	<setFont name="Times-Roman" size="12"/>
	<fill color="black"/>
	<drawCentredString x="58" y="12">alpha=10 beta=30</drawCentredString>

	
	<translate dy="42" dx="15"/>
	<fill color="gray"/>
	<setFont name="Times-Roman" size="8"/>
	<drawString x="55" y="2">alpha</drawString>
	<drawString x="5" y="50">beta</drawString>
	
	<setFont name="Helvetica-Bold" size="50"/>

	<fill color="red"/>
	<stroke color="black"/>
	<skew alpha="10" beta="30"/>
	<lineMode width="1" dash="5,4"/>
	<stroke color="lightgrey"/>
	<lines>
		0 0 0 50
		0 0 50 0
	</lines>
	<drawString x="0" y="0">X</drawString>
	
</illustration>


<spacer length="20"/>

<para>
	<font size="8">
	These are the examples taken from the section on these tags in the RML user guide (rml_user_guide.rml/rml_user_guide.pdf)
	</font>
</para>	
</story>

</document>
