<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html40/loose.dtd"> <html> <head> <title>Class: transform</title> </head> <body bgcolor="#ffffff"> <p><i><a href="../../index.html">Table of Contents</a></i></p> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr> <th rowspan="2" valign="top" align="left" width="10%" bgcolor="#88bbee"><font color="#000000">Class: transform</font> </th> <th bgcolor="#88bbee" width="90%" align="right"><font color="#000000">../bkchem/transform.py</font> </th> </tr> <tr> <td> <p>this class provides basic higher-level interface for coordinate transforms</p> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="Methods">Methods</a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000"> </font> </th> </tr> <tr> <td> <table border="0" cellspacing="2" cellpadding="2" width="100%"> <tr> <td align="LEFT" valign="TOP"> <a href="#__init__">__init__</a><br> <a href="#get_scaling">get_scaling</a><br> <a href="#get_scaling_xy">get_scaling_xy</a><br> <a href="#map_transform">map_transform</a><br> <a href="#set_move">set_move</a><br> <a href="#set_rotation">set_rotation</a><br> </td> <td align="LEFT" valign="TOP"> <a href="#set_scaling">set_scaling</a><br> <a href="#set_scaling_xy">set_scaling_xy</a><br> <a href="#transform_4">transform_4</a><br> <a href="#transform_list">transform_list</a><br> <a href="#transform_xy">transform_xy</a><br> <a href="#transform_xy_flat_list">transform_xy_flat_list</a><br> </td> </tr> </table> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="__init__"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">__init__ </font> </th> </tr> <tr> <td> <font color="#000088"><pre> __init__ ( self, mat=None ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="get_scaling"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">get_scaling </font> </th> </tr> <tr> <td> <font color="#000088"><pre> get_scaling ( self ) </pre></font> <p>computes the value of scaling from self</p> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="get_scaling_xy"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">get_scaling_xy </font> </th> </tr> <tr> <td> <font color="#000088"><pre> get_scaling_xy ( self ) </pre></font> <p>computes the scaling for <code>x</code> and <code>y</code> separately</p> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="map_transform"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">map_transform </font> </th> </tr> <tr> <td> <font color="#000088"><pre> map_transform ( self, l ) </pre></font> <p>this method can be used with map() function</p> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="set_move"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">set_move </font> </th> </tr> <tr> <td> <font color="#000088"><pre> set_move ( self, dx, dy, ) </pre></font> <p>add an moving step to transformation matrix</p> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="set_rotation"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">set_rotation </font> </th> </tr> <tr> <td> <font color="#000088"><pre> set_rotation ( self, angle ) </pre></font> <p>add an rotation step to transformation matrix</p> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="set_scaling"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">set_scaling </font> </th> </tr> <tr> <td> <font color="#000088"><pre> set_scaling ( self, scale ) </pre></font> <p>add an scaling step to transformation matrix, same scaling for both dimensions</p> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="set_scaling_xy"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">set_scaling_xy </font> </th> </tr> <tr> <td> <font color="#000088"><pre> set_scaling_xy ( self, mx, my, ) </pre></font> <p>add an scaling step to transformation matrix</p> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="transform_4"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">transform_4 </font> </th> </tr> <tr> <td> <font color="#000088"><pre> transform_4 ( self, list ) </pre></font> <p>for items that have 4 coordinates (lines, rectangles) this transforms 'em all</p> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="transform_list"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">transform_list </font> </th> </tr> <tr> <td> <font color="#000088"><pre> transform_list ( self, l ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="transform_xy"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">transform_xy </font> </th> </tr> <tr> <td> <font color="#000088"><pre> transform_xy ( self, x, y, ) </pre></font> <tr> <th bgcolor="#99ccff" rowspan="2" valign="top" align="left" width="20%" > <font color="#000000"> <a name="transform_xy_flat_list"></a> </font> </th> <th bgcolor="#99ccff" valign="top" align="left" width="80%" > <font color="#000000">transform_xy_flat_list </font> </th> </tr> <tr> <td> <font color="#000088"><pre> transform_xy_flat_list ( self, coords ) </pre></font> <p>transforms a list that cointains alternating x,y values (not list of pairs as self.transform_list)</p> </td></tr> </td></tr> </table> </td> </tr> </table> <hr> <p><i><a href="../../index.html">Table of Contents</a></i></p> <font size="-2"><i>This document was automatically generated on Tue Dec 12 13:46:43 2006 by <a href="http://happydoc.sourceforge.net">HappyDoc</a> version 2.1</i></font> </body> </html>