<html> <head> <title>Developer's Guide: Coordinate Systems </title> </head> <body bgcolor=white text=black link=blue vlink=navy alink=red> <TABLE WIDTH="100%"> <TR> <TH ALIGN="left" WIDTH="33%"><img SRC="Images/arrow-left.png" WIDTH="16" HEIGHT="16" ALIGN="top" ALT="Prev"></TH> <TH ALIGN="center" WIDTH="33%"><img SRC="Images/arrow-up.png" WIDTH="16" HEIGHT="16" ALIGN="top" ALT="Up"></TH> <TH ALIGN="right" WIDTH="33%"><img SRC="Images/arrow-right.png" WIDTH="16" HEIGHT="16" ALIGN="top" ALT="Next"></TH> </TR> <TR> <TD ALIGN="left"><A HREF="devguide-3.html">General Remarks</A></TD> <TD ALIGN="center"><A HREF="devguide.html">Developer's Guide</A></TD> <TD ALIGN="right"><A HREF="devguide-8.html">Curve Objects </A></TD> </TR> </TABLE> <HR NOSHADE> <H1><FONT face="Helvetica,Arial"><A NAME="N1"></A>Coordinate Systems </font></H1> <P>All coordinates used by the document and graphics objects are given in the <EM>document coordinate system</EM>. This coordinate system has its origin in the lower left corner of the page; x increases to the right, y increases to the top. The unit for these coordinates is the DTP-point (or PostScript-point), that is, 1/72 inch. Thus Sketch's document coordinate system is the same as the default coordinate system of a PostScript interpreter. Coordinates are stored as floats.</P> <P>The page size is a user settable document property, usually `A4', `letter' or something similar. Sketch can display the outline of the page if desired to allow the user to position the drawing on the page.</P> <P>When displaying the document in a window, the canvas widget (to be more precise, the graphics device object the canvas uses) converts document coordinates to <EM>window coordinates</EM>. These are the standard X-Window coordinates with the origin in the top left corner of the window and x increasing to the right and y increasing downwards. The unit is 1 pixel.</P> <P>Sketch defines a few builtin objects to represent and manipulate coordinates: Points, Rects and Transformations. All of the related functions, objects and constants are exported by the <CODE>Sketch</CODE> package.</P> <H4><FONT face="Helvetica,Arial"><img SRC="Images/bullet.png" WIDTH="9" HEIGHT="9"><A HREF="devguide-5.html">Point Objects </A></font></H4> <H4><FONT face="Helvetica,Arial"><img SRC="Images/bullet.png" WIDTH="9" HEIGHT="9"><A HREF="devguide-6.html">Rect Objects </A></font></H4> <H4><FONT face="Helvetica,Arial"><img SRC="Images/bullet.png" WIDTH="9" HEIGHT="9"><A HREF="devguide-7.html">Transformation Objects </A></font></H4> <HR NOSHADE> <TABLE WIDTH="100%"> <TR> <TD ALIGN="left"><A HREF="devguide-3.html">General Remarks</A></TD> <TD ALIGN="center"><A HREF="devguide.html">Developer's Guide</A></TD> <TD ALIGN="right"><A HREF="devguide-8.html">Curve Objects </A></TD> </TR> <TR> <TH ALIGN="left" WIDTH="33%"><img SRC="Images/arrow-left.png" WIDTH="16" HEIGHT="16" ALIGN="top" ALT="Prev"></TH> <TH ALIGN="center" WIDTH="33%"><img SRC="Images/arrow-up.png" WIDTH="16" HEIGHT="16" ALIGN="top" ALT="Up"></TH> <TH ALIGN="right" WIDTH="33%"><img SRC="Images/arrow-right.png" WIDTH="16" HEIGHT="16" ALIGN="top" ALT="Next"></TH> </TR> </TABLE> </body> </html>