Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 51f7de0838007e2876221e819c82d833 > files > 573

sketch-0.6.13-2mdk.ppc.rpm

<html>
<head>
<title>Developer's Guide: The class Rectangle</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-17.html">The class Compound</A></TD>
<TD ALIGN="center"><A HREF="devguide-9.html">The Document and Graphics Classes</A></TD>
<TD ALIGN="right"><A HREF="devguide-19.html">The Undo Mechanism
</A></TD>
</TR>
</TABLE>
<HR NOSHADE>
<H2><FONT face="Helvetica,Arial"><A NAME="N1"></A>The class <A NAME="N2"></A><tt>Rectangle</tt></font></H2>

<P>The class <tt>Rectangle</tt> represents the drawing primitive of a
parallelogram with optional rounded corners. When drawn interactively
the object is an axis aligned rectangle. After applying affine
transformations the rectangle may not be a rectangle anymore, but it
will remain a parallelogram. </P>
<P>In Sketch, a rectangle is represented by the affine transformation
necessary to map the unit square (opposite corners (0, 0) and (1, 1)),
to the parallelogram. This is an elegant and convenient but also
somewhat unusual representation.</P>
<P>The transformation is of course stored as a <A HREF="devguide-7.html">transformation object</A>. </P>
<P>The rounded corners are defined by two floating point numbers
<tt>radius1</tt> and <tt>radius2</tt>. Both numbers define a radius of the
ellipses that make up the rounded corners of the unit square,
<tt>radius1</tt> defines the horizontal radius and <tt>radius2</tt> the
vertical radius. Valid values lie in the range 0.0 &lt;= radius1,radius2
&lt;= 0.5.</P>









<HR NOSHADE>
<TABLE WIDTH="100%">
<TR>
<TD ALIGN="left"><A HREF="devguide-17.html">The class Compound</A></TD>
<TD ALIGN="center"><A HREF="devguide-9.html">The Document and Graphics Classes</A></TD>
<TD ALIGN="right"><A HREF="devguide-19.html">The Undo Mechanism
</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>