paper.js/dist/docs/classes/Matrix.html
2011-06-23 00:02:40 +01:00

1549 lines
No EOL
37 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Matrix</title>
<base target="classFrame">
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
<link rel="stylesheet" href="../resources/css/style.css" type="text/css">
<link rel="stylesheet" href="../resources/css/paperscript.css" type="text/css">
<link rel="stylesheet" href="../resources/css/codemirror.css" type="text/css">
<script src="../resources/js/bootstrap.js" type="text/javascript"></script>
<script src="../resources/js/paper.js" type="text/javascript"></script>
<script src="../resources/js/codemirror.js" type="text/javascript"></script>
<script src="../resources/js/reference.js" type="text/javascript"></script>
</head>
<body class="reference">
<div class="reference-class">
<h1>Matrix</h1>
<p>An affine transform performs a linear mapping from 2D coordinates
to other 2D coordinates that preserves the "straightness" and
"parallelness" of lines.</p>
<p>Such a coordinate transformation can be represented by a 3 row by 3
column matrix with an implied last row of [ 0 0 1 ]. This matrix
transforms source coordinates (x,y) into destination coordinates (x',y')
by considering them to be a column vector and multiplying the coordinate
vector by the matrix according to the following process:</p>
<pre class="code">
[ x'] [ m00 m01 m02 ] [ x ] [ m00x + m01y + m02 ]
[ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ]
[ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
</pre>
<p>This class is optimized for speed and minimizes calculations based on its
knowledge of the underlying matrix (as opposed to say simply performing
matrix multiplication).</p>
</div>
<!-- ============================== constructors ========================= -->
<div class="reference-members"><h2>Constructors</h2>
<div id="matrix-m00-m10-m01-m11-m02-m12-member" class="member">
<div id="matrix-m00-m10-m01-m11-m02-m12-link" class="member-link">
<a name="matrix-m00-m10-m01-m11-m02-m12" href="#" onClick="return toggleMember('matrix-m00-m10-m01-m11-m02-m12', false);"><tt><b>Matrix</b>(m00, m10, m01, m11, m02, m12)</tt></a>
</div>
<div id="matrix-m00-m10-m01-m11-m02-m12-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('matrix-m00-m10-m01-m11-m02-m12', false);"><tt><b>Matrix</b>(m00, m10, m01, m11, m02, m12)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('matrix-m00-m10-m01-m11-m02-m12', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Creates a 2D affine transform.</p>
<ul><b>Parameters:</b>
<li>
<tt>m00:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m00 coordinate of the transform.
</li>
<li>
<tt>m10:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m10 coordinate of the transform.
</li>
<li>
<tt>m01:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m01 coordinate of the transform.
</li>
<li>
<tt>m11:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m11 coordinate of the transform.
</li>
<li>
<tt>m02:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m02 coordinate of the transform.
</li>
<li>
<tt>m12:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m12 coordinate of the transform.
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- ============================== methods ================================ -->
<div class="reference-members"><h2>Methods</h2>
<div id="clone-member" class="member">
<div id="clone-link" class="member-link">
<a name="clone" href="#" onClick="return toggleMember('clone', false);"><tt><b>clone</b>()</tt></a>
</div>
<div id="clone-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('clone', false);"><tt><b>clone</b>()</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('clone', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;A copy of this transform.
</li>
</ul>
</div>
</div>
</div>
<div id="set-m00-m10-m01-m11-m02-m12-member" class="member">
<div id="set-m00-m10-m01-m11-m02-m12-link" class="member-link">
<a name="set-m00-m10-m01-m11-m02-m12" href="#" onClick="return toggleMember('set-m00-m10-m01-m11-m02-m12', false);"><tt><b>set</b>(m00, m10, m01, m11, m02, m12)</tt></a>
</div>
<div id="set-m00-m10-m01-m11-m02-m12-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('set-m00-m10-m01-m11-m02-m12', false);"><tt><b>set</b>(m00, m10, m01, m11, m02, m12)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('set-m00-m10-m01-m11-m02-m12', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Sets this transform to the matrix specified by the 6 values.</p>
<ul><b>Parameters:</b>
<li>
<tt>m00:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m00 coordinate of the transform.
</li>
<li>
<tt>m10:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m10 coordinate of the transform.
</li>
<li>
<tt>m01:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m01 coordinate of the transform.
</li>
<li>
<tt>m11:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m11 coordinate of the transform.
</li>
<li>
<tt>m02:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m02 coordinate of the transform.
</li>
<li>
<tt>m12:</tt>
<tt>Number</tt>
&mdash;&nbsp;The m12 coordinate of the transform.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="scale-scale-member" class="member">
<div id="scale-scale-link" class="member-link">
<a name="scale-scale" href="#" onClick="return toggleMember('scale-scale', false);"><tt><b>scale</b>(scale[, center])</tt></a>
</div>
<div id="scale-scale-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('scale-scale', false);"><tt><b>scale</b>(scale[, center])</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('scale-scale', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Concatentates this transform with a scaling transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>scale:</tt>
<tt>Number</tt>
&mdash;&nbsp;The scaling factor.
</li>
<li>
<tt>center:</tt>
<a href="../classes/Point.html"><tt>Point</tt></a>
&mdash;&nbsp;The center for the scaling
transformation.
&mdash;&nbsp;optional
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="scale-sx-sy-member" class="member">
<div id="scale-sx-sy-link" class="member-link">
<a name="scale-sx-sy" href="#" onClick="return toggleMember('scale-sx-sy', false);"><tt><b>scale</b>(sx, sy[, center])</tt></a>
</div>
<div id="scale-sx-sy-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('scale-sx-sy', false);"><tt><b>scale</b>(sx, sy[, center])</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('scale-sx-sy', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Concatentates this transform with a scaling transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>sx:</tt>
<tt>Number</tt>
&mdash;&nbsp;The x-axis scaling factor.
</li>
<li>
<tt>sy:</tt>
<tt>Number</tt>
&mdash;&nbsp;The y-axis scaling factor.
</li>
<li>
<tt>center:</tt>
<a href="../classes/Point.html"><tt>Point</tt></a>
&mdash;&nbsp;The center for the scaling
transformation.
&mdash;&nbsp;optional
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="translate-point-member" class="member">
<div id="translate-point-link" class="member-link">
<a name="translate-point" href="#" onClick="return toggleMember('translate-point', false);"><tt><b>translate</b>(point)</tt></a>
</div>
<div id="translate-point-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('translate-point', false);"><tt><b>translate</b>(point)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('translate-point', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Concatentates this transform with a translate transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>point:</tt>
<a href="../classes/Point.html"><tt>Point</tt></a>
&mdash;&nbsp;The vector to translate by.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="translate-dx-dy-member" class="member">
<div id="translate-dx-dy-link" class="member-link">
<a name="translate-dx-dy" href="#" onClick="return toggleMember('translate-dx-dy', false);"><tt><b>translate</b>(dx, dy)</tt></a>
</div>
<div id="translate-dx-dy-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('translate-dx-dy', false);"><tt><b>translate</b>(dx, dy)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('translate-dx-dy', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Concatentates this transform with a translate transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>dx:</tt>
<tt>Number</tt>
&mdash;&nbsp;The distance to translate in the x direction.
</li>
<li>
<tt>dy:</tt>
<tt>Number</tt>
&mdash;&nbsp;The distance to translate in the y direction.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="rotate-angle-center-member" class="member">
<div id="rotate-angle-center-link" class="member-link">
<a name="rotate-angle-center" href="#" onClick="return toggleMember('rotate-angle-center', false);"><tt><b>rotate</b>(angle, center)</tt></a>
</div>
<div id="rotate-angle-center-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('rotate-angle-center', false);"><tt><b>rotate</b>(angle, center)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('rotate-angle-center', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Concatentates this transform with a rotation transformation around an
anchor point.</p>
<ul><b>Parameters:</b>
<li>
<tt>angle:</tt>
<tt>Number</tt>
&mdash;&nbsp;The angle of rotation measured in degrees.
</li>
<li>
<tt>center:</tt>
<a href="../classes/Point.html"><tt>Point</tt></a>
&mdash;&nbsp;The anchor point to rotate around.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="rotate-angle-x-y-member" class="member">
<div id="rotate-angle-x-y-link" class="member-link">
<a name="rotate-angle-x-y" href="#" onClick="return toggleMember('rotate-angle-x-y', false);"><tt><b>rotate</b>(angle, x, y)</tt></a>
</div>
<div id="rotate-angle-x-y-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('rotate-angle-x-y', false);"><tt><b>rotate</b>(angle, x, y)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('rotate-angle-x-y', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Concatentates this transform with a rotation transformation around an
anchor point.</p>
<ul><b>Parameters:</b>
<li>
<tt>angle:</tt>
<tt>Number</tt>
&mdash;&nbsp;The angle of rotation measured in degrees.
</li>
<li>
<tt>x:</tt>
<tt>Number</tt>
&mdash;&nbsp;The x coordinate of the anchor point.
</li>
<li>
<tt>y:</tt>
<tt>Number</tt>
&mdash;&nbsp;The y coordinate of the anchor point.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="shear-point-member" class="member">
<div id="shear-point-link" class="member-link">
<a name="shear-point" href="#" onClick="return toggleMember('shear-point', false);"><tt><b>shear</b>(point[, center])</tt></a>
</div>
<div id="shear-point-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('shear-point', false);"><tt><b>shear</b>(point[, center])</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('shear-point', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Concatentates this transform with a shear transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>point:</tt>
<a href="../classes/Point.html"><tt>Point</tt></a>
&mdash;&nbsp;The shear factor in x and y direction.
</li>
<li>
<tt>center:</tt>
<a href="../classes/Point.html"><tt>Point</tt></a>
&mdash;&nbsp;The center for the shear transformation.
&mdash;&nbsp;optional
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="shear-shx-shy-member" class="member">
<div id="shear-shx-shy-link" class="member-link">
<a name="shear-shx-shy" href="#" onClick="return toggleMember('shear-shx-shy', false);"><tt><b>shear</b>(shx, shy[, center])</tt></a>
</div>
<div id="shear-shx-shy-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('shear-shx-shy', false);"><tt><b>shear</b>(shx, shy[, center])</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('shear-shx-shy', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Concatentates this transform with a shear transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>shx:</tt>
<tt>Number</tt>
&mdash;&nbsp;The x shear factor.
</li>
<li>
<tt>shy:</tt>
<tt>Number</tt>
&mdash;&nbsp;The y shear factor.
</li>
<li>
<tt>center:</tt>
<a href="../classes/Point.html"><tt>Point</tt></a>
&mdash;&nbsp;The center for the shear transformation.
&mdash;&nbsp;optional
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="tostring-member" class="member">
<div id="tostring-link" class="member-link">
<a name="tostring" href="#" onClick="return toggleMember('tostring', false);"><tt><b>toString</b>()</tt></a>
</div>
<div id="tostring-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('tostring', false);"><tt><b>toString</b>()</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('tostring', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<ul><b>Returns:</b>
<li>
<tt><tt>String</tt></tt>&nbsp;&mdash;&nbsp;A string representation of this transform.
</li>
</ul>
</div>
</div>
</div>
<div id="concatenate-mx-member" class="member">
<div id="concatenate-mx-link" class="member-link">
<a name="concatenate-mx" href="#" onClick="return toggleMember('concatenate-mx', false);"><tt><b>concatenate</b>(mx)</tt></a>
</div>
<div id="concatenate-mx-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('concatenate-mx', false);"><tt><b>concatenate</b>(mx)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('concatenate-mx', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Concatenates an affine transform to this transform.</p>
<ul><b>Parameters:</b>
<li>
<tt>mx:</tt>
<a href="../classes/Matrix.html"><tt>Matrix</tt></a>
&mdash;&nbsp;The transform to concatenate.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="preconcatenate-mx-member" class="member">
<div id="preconcatenate-mx-link" class="member-link">
<a name="preconcatenate-mx" href="#" onClick="return toggleMember('preconcatenate-mx', false);"><tt><b>preConcatenate</b>(mx)</tt></a>
</div>
<div id="preconcatenate-mx-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('preconcatenate-mx', false);"><tt><b>preConcatenate</b>(mx)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('preconcatenate-mx', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Pre-concatenates an affine transform to this transform.</p>
<ul><b>Parameters:</b>
<li>
<tt>mx:</tt>
<a href="../classes/Matrix.html"><tt>Matrix</tt></a>
&mdash;&nbsp;The transform to preconcatenate.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="transform-point-src-srcOff-dst-dstOff-numPts-member" class="member">
<div id="transform-point-src-srcOff-dst-dstOff-numPts-link" class="member-link">
<a name="transform-point-src-srcOff-dst-dstOff-numPts" href="#" onClick="return toggleMember('transform-point-src-srcOff-dst-dstOff-numPts', false);"><tt><b>transform</b>(point, src, srcOff, dst, dstOff, numPts)</tt></a>
</div>
<div id="transform-point-src-srcOff-dst-dstOff-numPts-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('transform-point-src-srcOff-dst-dstOff-numPts', false);"><tt><b>transform</b>(point, src, srcOff, dst, dstOff, numPts)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('transform-point-src-srcOff-dst-dstOff-numPts', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Transforms a point or an array of coordinates by this matrix and returns
the result. If an array is transformed, the the result is stored into a
destination array.</p>
<ul><b>Parameters:</b>
<li>
<tt>point:</tt>
<a href="../classes/Point.html"><tt>Point</tt></a>
&mdash;&nbsp;The point to be transformed.
</li>
<li>
<tt>src:</tt>
<tt>Number</tt>
&mdash;&nbsp;The array containing the source points
as x, y value pairs.
</li>
<li>
<tt>srcOff:</tt>
<tt>Number</tt>
&mdash;&nbsp;The offset to the first point to be transformed.
</li>
<li>
<tt>dst:</tt>
<tt>Number</tt>
&mdash;&nbsp;The array into which to store the transformed
point pairs.
</li>
<li>
<tt>dstOff:</tt>
<tt>Number</tt>
&mdash;&nbsp;The offset of the location of the first
transformed point in the destination array.
</li>
<li>
<tt>numPts:</tt>
<tt>Number</tt>
&mdash;&nbsp;The number of points to tranform.
</li>
</ul>
</div>
</div>
</div>
<div id="getdeterminant-member" class="member">
<div id="getdeterminant-link" class="member-link">
<a name="getdeterminant" href="#" onClick="return toggleMember('getdeterminant', false);"><tt><b>getDeterminant</b>()</tt></a>
</div>
<div id="getdeterminant-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('getdeterminant', false);"><tt><b>getDeterminant</b>()</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('getdeterminant', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<ul><b>Returns:</b>
<li>
<tt><tt>Number</tt></tt>&nbsp;&mdash;&nbsp;The determinant of this transform.
</li>
</ul>
</div>
</div>
</div>
<div id="getrotation-member" class="member">
<div id="getrotation-link" class="member-link">
<a name="getrotation" href="#" onClick="return toggleMember('getrotation', false);"><tt><b>getRotation</b>()</tt></a>
</div>
<div id="getrotation-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('getrotation', false);"><tt><b>getRotation</b>()</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('getrotation', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<ul><b>Returns:</b>
<li>
<tt><tt>Number</tt></tt>&nbsp;&mdash;&nbsp;The rotation angle of the matrix. If a non-uniform
rotation is applied as a result of a shear() or scale() command,
undefined is returned, as the resulting transformation cannot be
expressed in one rotation angle.
</li>
</ul>
</div>
</div>
</div>
<div id="isidentity-member" class="member">
<div id="isidentity-link" class="member-link">
<a name="isidentity" href="#" onClick="return toggleMember('isidentity', false);"><tt><b>isIdentity</b>()</tt></a>
</div>
<div id="isidentity-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('isidentity', false);"><tt><b>isIdentity</b>()</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('isidentity', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<ul><b>Returns:</b>
<li>
<tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;Whether this transform is the identity transform.
</li>
</ul>
</div>
</div>
</div>
<div id="isinvertible-member" class="member">
<div id="isinvertible-link" class="member-link">
<a name="isinvertible" href="#" onClick="return toggleMember('isinvertible', false);"><tt><b>isInvertible</b>()</tt></a>
</div>
<div id="isinvertible-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('isinvertible', false);"><tt><b>isInvertible</b>()</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('isinvertible', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Returns whether the transform is invertible. A transform is not
invertible if the determinant is 0 or any value is non-finite or NaN.</p>
<ul><b>Returns:</b>
<li>
<tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;Whether the transform is invertible.
</li>
</ul>
</div>
</div>
</div>
<div id="issingular-member" class="member">
<div id="issingular-link" class="member-link">
<a name="issingular" href="#" onClick="return toggleMember('issingular', false);"><tt><b>isSingular</b>()</tt></a>
</div>
<div id="issingular-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('issingular', false);"><tt><b>isSingular</b>()</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('issingular', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Checks whether the matrix is singular or not. Singular matrices cannot be
inverted.</p>
<ul><b>Returns:</b>
<li>
<tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;Whether the matrix is singular.
</li>
</ul>
</div>
</div>
</div>
<div id="createinverse-member" class="member">
<div id="createinverse-link" class="member-link">
<a name="createinverse" href="#" onClick="return toggleMember('createinverse', false);"><tt><b>createInverse</b>()</tt></a>
</div>
<div id="createinverse-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('createinverse', false);"><tt><b>createInverse</b>()</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('createinverse', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;An Matrix object representing the inverse
transformation.
</li>
</ul>
</div>
</div>
</div>
<div id="settoscale-sx-sy-member" class="member">
<div id="settoscale-sx-sy-link" class="member-link">
<a name="settoscale-sx-sy" href="#" onClick="return toggleMember('settoscale-sx-sy', false);"><tt><b>setToScale</b>(sx, sy)</tt></a>
</div>
<div id="settoscale-sx-sy-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('settoscale-sx-sy', false);"><tt><b>setToScale</b>(sx, sy)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('settoscale-sx-sy', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Sets this transform to a scaling transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>sx:</tt>
<tt>Number</tt>
&mdash;&nbsp;The x-axis scaling factor.
</li>
<li>
<tt>sy:</tt>
<tt>Number</tt>
&mdash;&nbsp;The y-axis scaling factor.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="settotranslation-dx-dy-member" class="member">
<div id="settotranslation-dx-dy-link" class="member-link">
<a name="settotranslation-dx-dy" href="#" onClick="return toggleMember('settotranslation-dx-dy', false);"><tt><b>setToTranslation</b>(dx, dy)</tt></a>
</div>
<div id="settotranslation-dx-dy-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('settotranslation-dx-dy', false);"><tt><b>setToTranslation</b>(dx, dy)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('settotranslation-dx-dy', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Sets this transform to a translation transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>dx:</tt>
<tt>Number</tt>
&mdash;&nbsp;The distance to translate in the x direction.
</li>
<li>
<tt>dy:</tt>
<tt>Number</tt>
&mdash;&nbsp;The distance to translate in the y direction.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="settoshear-shx-shy-member" class="member">
<div id="settoshear-shx-shy-link" class="member-link">
<a name="settoshear-shx-shy" href="#" onClick="return toggleMember('settoshear-shx-shy', false);"><tt><b>setToShear</b>(shx, shy)</tt></a>
</div>
<div id="settoshear-shx-shy-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('settoshear-shx-shy', false);"><tt><b>setToShear</b>(shx, shy)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('settoshear-shx-shy', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Sets this transform to a shearing transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>shx:</tt>
<tt>Number</tt>
&mdash;&nbsp;The x-axis shear factor.
</li>
<li>
<tt>shy:</tt>
<tt>Number</tt>
&mdash;&nbsp;The y-axis shear factor.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="settorotation-angle-x-y-member" class="member">
<div id="settorotation-angle-x-y-link" class="member-link">
<a name="settorotation-angle-x-y" href="#" onClick="return toggleMember('settorotation-angle-x-y', false);"><tt><b>setToRotation</b>(angle, x, y)</tt></a>
</div>
<div id="settorotation-angle-x-y-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('settorotation-angle-x-y', false);"><tt><b>setToRotation</b>(angle, x, y)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('settorotation-angle-x-y', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Sets this transform to a rotation transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>angle:</tt>
<tt>Number</tt>
&mdash;&nbsp;The angle of rotation measured in degrees.
</li>
<li>
<tt>x:</tt>
<tt>Number</tt>
&mdash;&nbsp;The x coordinate of the anchor point.
</li>
<li>
<tt>y:</tt>
<tt>Number</tt>
&mdash;&nbsp;The y coordinate of the anchor point.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;This affine transform.
</li>
</ul>
</div>
</div>
</div>
<div id="applytocontext-ctx-member" class="member">
<div id="applytocontext-ctx-link" class="member-link">
<a name="applytocontext-ctx" href="#" onClick="return toggleMember('applytocontext-ctx', false);"><tt><b>applyToContext</b>(ctx[, reset])</tt></a>
</div>
<div id="applytocontext-ctx-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('applytocontext-ctx', false);"><tt><b>applyToContext</b>(ctx[, reset])</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('applytocontext-ctx', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Applies this matrix to the specified Canvas Context.</p>
<ul><b>Parameters:</b>
<li>
<tt>ctx:</tt>
<tt>CanvasRenderingContext2D</tt>
</li>
<li>
<tt>reset:</tt>
<tt>Boolean</tt>
&mdash;&nbsp;optional, default: <tt>false</tt>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="reference-members"><h2>Static Methods</h2>
<div id="getscaleinstance-sx-sy-member" class="member">
<div id="getscaleinstance-sx-sy-link" class="member-link">
<a name="getscaleinstance-sx-sy" href="#" onClick="return toggleMember('getscaleinstance-sx-sy', false);"><tt><b>Matrix.getScaleInstance</b>(sx, sy)</tt></a>
</div>
<div id="getscaleinstance-sx-sy-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('getscaleinstance-sx-sy', false);"><tt><b>Matrix.getScaleInstance</b>(sx, sy)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('getscaleinstance-sx-sy', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Creates a transform representing a scaling transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>sx:</tt>
<tt>Number</tt>
&mdash;&nbsp;The x-axis scaling factor.
</li>
<li>
<tt>sy:</tt>
<tt>Number</tt>
&mdash;&nbsp;The y-axis scaling factor.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;A transform representing a scaling
transformation.
</li>
</ul>
</div>
</div>
</div>
<div id="gettranslateinstance-dx-dy-member" class="member">
<div id="gettranslateinstance-dx-dy-link" class="member-link">
<a name="gettranslateinstance-dx-dy" href="#" onClick="return toggleMember('gettranslateinstance-dx-dy', false);"><tt><b>Matrix.getTranslateInstance</b>(dx, dy)</tt></a>
</div>
<div id="gettranslateinstance-dx-dy-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('gettranslateinstance-dx-dy', false);"><tt><b>Matrix.getTranslateInstance</b>(dx, dy)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('gettranslateinstance-dx-dy', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Creates a transform representing a translation transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>dx:</tt>
<tt>Number</tt>
&mdash;&nbsp;The distance to translate in the x direction.
</li>
<li>
<tt>dy:</tt>
<tt>Number</tt>
&mdash;&nbsp;The distance to translate in the y direction.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;A transform representing a translation
transformation.
</li>
</ul>
</div>
</div>
</div>
<div id="getshearinstance-shx-shy-center-member" class="member">
<div id="getshearinstance-shx-shy-center-link" class="member-link">
<a name="getshearinstance-shx-shy-center" href="#" onClick="return toggleMember('getshearinstance-shx-shy-center', false);"><tt><b>Matrix.getShearInstance</b>(shx, shy, center)</tt></a>
</div>
<div id="getshearinstance-shx-shy-center-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('getshearinstance-shx-shy-center', false);"><tt><b>Matrix.getShearInstance</b>(shx, shy, center)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('getshearinstance-shx-shy-center', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Creates a transform representing a shearing transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>shx:</tt>
<tt>Number</tt>
&mdash;&nbsp;The x-axis shear factor.
</li>
<li>
<tt>shy:</tt>
<tt>Number</tt>
&mdash;&nbsp;The y-axis shear factor.
</li>
<li>
<tt>center:</tt>
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;A transform representing a shearing transformation.
</li>
</ul>
</div>
</div>
</div>
<div id="getrotateinstance-angle-x-y-member" class="member">
<div id="getrotateinstance-angle-x-y-link" class="member-link">
<a name="getrotateinstance-angle-x-y" href="#" onClick="return toggleMember('getrotateinstance-angle-x-y', false);"><tt><b>Matrix.getRotateInstance</b>(angle, x, y)</tt></a>
</div>
<div id="getrotateinstance-angle-x-y-description" class="member-description hidden">
<div class="member-header">
<div class="member-title">
<div class="member-link">
<a href="#" onClick="return toggleMember('getrotateinstance-angle-x-y', false);"><tt><b>Matrix.getRotateInstance</b>(angle, x, y)</tt></a>
</div>
</div>
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('getrotateinstance-angle-x-y', false);"></div>
<div class="clear"></div>
</div>
<div class="member-text">
<p>Creates a transform representing a rotation transformation.</p>
<ul><b>Parameters:</b>
<li>
<tt>angle:</tt>
<tt>Number</tt>
&mdash;&nbsp;The angle of rotation measured in degrees.
</li>
<li>
<tt>x:</tt>
<tt>Number</tt>
&mdash;&nbsp;The x coordinate of the anchor point.
</li>
<li>
<tt>y:</tt>
<tt>Number</tt>
&mdash;&nbsp;The y coordinate of the anchor point.
</li>
</ul>
<ul><b>Returns:</b>
<li>
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt>&nbsp;&mdash;&nbsp;A transform representing a rotation transformation.
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- =========================== copyright notice ========================= -->
<p class="footer">Copyright &#169; 2011 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>
</body>