Package pycocoa :: Module geometry :: Class Rect
[frames] | no frames]

Class Rect

          object --+        
                   |        
internals._Objectype --+    
                       |    
        baseTypes._Type0 --+
                           |
                          Rect
Known Subclasses:

Python Type, wrapping an ObjC NSRect_t.

Instance Methods
 
__init__(self, rect)
New Rect from another (Rect, list, tuple or NSRect[4]_t).
 
__str__(self)
str(x)

Inherited from baseTypes._Type0: __repr__, type2strepr

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

Properties
  bottom
Get the lower y coordinate (float or int).
  bottomleft
Get the lower left (Point).
  lowerleft
Get the lower left (Point).
  bottomright
Get the lower right (Point).
  lowerright
Get the lower right (Point).
  center
Get the center (Point).
  height
Get the height (float).
  left
Get the lower x coordinate (float or int).
  origin
Get the origin (Point, list, tuple or NSPoint_t).
  ratio
Get th aspect ratio as 2-tuple (width, height).
  rect
Get x, y, width, height (4-tuple).
  rect4
Get left, bottom, right top (4-tuple).
  right
Get the upper x coordinate (float or int).
  size
Get the size (Size).
  top
Get the upper y coordinate (float or int).
  topleft
Get the upper left (Point).
  upperleft
Get the upper left (Point).
  topright
Get the upper right (Point).
  upperright
Get the upper right (Point).
  width
Get the width (float or int).
  x
Get the x coordinate (float or int).
  y
Get the y coordinate (float or int).

Inherited from baseTypes._Type0: NS, NSDelegate

Inherited from internals._Objectype: typename

Inherited from object: __class__

Method Details

__init__(self, rect)
(Constructor)

 

New Rect from another (Rect, list, tuple or NSRect[4]_t).

Overrides: object.__init__

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

Property Details

bottom

Get the lower y coordinate (float or int).

Get Method:
bottom(self) - Get the lower y coordinate (float or int).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

bottomleft

Get the lower left (Point).

Get Method:
bottomleft(self) - Get the lower left (Point).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

lowerleft

Get the lower left (Point).

Get Method:
bottomleft(self) - Get the lower left (Point).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

bottomright

Get the lower right (Point).

Get Method:
bottomright(self) - Get the lower right (Point).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

lowerright

Get the lower right (Point).

Get Method:
bottomright(self) - Get the lower right (Point).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

center

Get the center (Point).

Get Method:
center(self) - Get the center (Point).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

height

Get the height (float).

Get Method:
height(self) - Get the height (float).
Set Method:
height(self, height) - Set the height (float).

left

Get the lower x coordinate (float or int).

Get Method:
left(self) - Get the lower x coordinate (float or int).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

origin

Get the origin (Point, list, tuple or NSPoint_t).

Get Method:
origin(self) - Get the origin (Point, list, tuple or NSPoint_t).
Set Method:
origin(self, origin) - Set the origin (Point).

ratio

Get th aspect ratio as 2-tuple (width, height).

Get Method:
ratio(self) - Get th aspect ratio as 2-tuple (width, height).
Set Method:
ratio(self, ratio) - Adjust width and/or height to the given aspect ratio.

rect

Get x, y, width, height (4-tuple).

Get Method:
rect(self) - Get x, y, width, height (4-tuple).
Set Method:
rect(self, rect) - Set the rect (Rect, 2-list, 4-list, 2-tuple, 4-tuple or NSRect[4]_t).

See Also: Property rect4.

rect4

Get left, bottom, right top (4-tuple).

Get Method:
rect4(self) - Get left, bottom, right top (4-tuple).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

See Also: Property rect.

right

Get the upper x coordinate (float or int).

Get Method:
right(self) - Get the upper x coordinate (float or int).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

size

Get the size (Size).

Get Method:
size(self) - Get the size (Size).
Set Method:
size(self, size) - Set the size (Size, list, tuple or NSSize_t).

top

Get the upper y coordinate (float or int).

Get Method:
top(self) - Get the upper y coordinate (float or int).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

topleft

Get the upper left (Point).

Get Method:
topleft(self) - Get the upper left (Point).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

upperleft

Get the upper left (Point).

Get Method:
topleft(self) - Get the upper left (Point).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

topright

Get the upper right (Point).

Get Method:
topright(self) - Get the upper right (Point).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

upperright

Get the upper right (Point).

Get Method:
topright(self) - Get the upper right (Point).
Set Method:
Read_Only(inst, value) - Throws an AttributeError, always.

width

Get the width (float or int).

Get Method:
width(self) - Get the width (float or int).
Set Method:
width(self, width) - Set the width (float or int).

x

Get the x coordinate (float or int).

Get Method:
x(self) - Get the x coordinate (float or int).
Set Method:
x(self, x) - Set the x coordinate (float or int).

y

Get the y coordinate (float or int).

Get Method:
y(self) - Get the y coordinate (float or int).
Set Method:
y(self, y) - Set the y coordinate (float or int).