qubx :: toolspace :: RotRect :: Class RotRect
[hide private]
[frames] | no frames]

Class RotRect

source code

object --+
         |
        RotRect

Represents a rectangle that has been rotated theta radians about (x0, y0).

Instance Methods [hide private]
 
__init__(self, l, t, r, b, x0=0, y0=0, theta=0, **kw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
contains(self, x, y)
Returns True if (x,y) is within the rotated rectangle.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
  b
bottom
  l
left
  r
right
  t
top
  theta
radians to rotate about x0, y0
  x0
x-coord of the center of rotation
  y0
y-coord of the center of rotation
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, l, t, r, b, x0=0, y0=0, theta=0, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • l - left
  • t - top
  • r - right
  • b - bottom
  • x0 - x-coord of the center of rotation
  • y0 - y-coord of the center of rotation
  • theta - radians to rotate about x0, y0
  • ... - adds any additional keyword arguments as instance variables
Overrides: object.__init__