Package pyscript :: Module objects :: Class Area
[show private | hide private]
[frames | no frames]

Class Area

object --+        
         |        
     PsObj --+    
             |    
     AffineObj --+
                 |
                Area

Known Subclasses:
Boxed, Circled, Epsf, Group, Paper, Rectangle, TeX, Text

A Rectangular area defined by sw corner and width and height.

defines the following compass points that can be set and retrived:
     nw--n--ne
     |       |
     w   c   e
     |       |
     sw--s--se

The origin is the sw corner and the others are calculated from the width and height attributes.

If a subclass should have the origin somewhere other than sw then overide the sw attribute to make it a function
Method Summary
  bbox(self)
Return the bounding box of the object
    Inherited from AffineObj
self concat(self, t, p)
concat matrix t to tranformation matrix
P etoi(self, p_e)
convert external to internal co-ords
P itoe(self, p_i)
convert internal to external co-ords
self move(self, *args)
translate object by a certain amount
string postbody(self)
undo coordinate system transformation
string prebody(self)
set up transformation of coordinate system
self reflect(self, angle, p)
reflect object in mirror
self rotate(self, angle, p)
rotate object, the rotation is around p when supplied otherwise it's the objects origin
self scale(self, sx, sy, p)
scale object size (towards objects origin or p)
self shear(self, s, angle, p)
shear object
    Inherited from PsObj
  __init__(self, **options)
can pass a dict of atributes to set
self __call__(self, **options)
Set a whole lot of attributes in one go
string __repr__(self)
Return a representation of this object
string __str__(self)
return actual postscript string to generate object
string body(self)
subclasses should overide this for generating postscipt code
self copy(self, **options)
return a copy of this object with listed attributes modified
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
    Inherited from type
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T

Property Summary
  c
  e
  n
  ne
  nw
  s
  se
  sw
  w

Class Variable Summary
  c = pyscript.objects.Area.c
int height: the height
P isw = <class 'pyscript.vectors.P'>
int width: the width
    Inherited from AffineObj
P o = <class 'pyscript.vectors.P'>
Matrix T = <pyscript.vectors.Matrix instance at 0x40449cec>

Method Details

bbox(self)

Return the bounding box of the object
Overrides:
pyscript.base.PsObj.bbox

Property Details

c

Get Method:
_get_c(self)
Set Method:
_set_c(self, pe)

e

Get Method:
_get_e(self)
Set Method:
_set_e(self, pe)

n

Get Method:
_get_n(self)
Set Method:
_set_n(self, pe)

ne

Get Method:
_get_ne(self)
Set Method:
_set_ne(self, pe)

nw

Get Method:
_get_nw(self)
Set Method:
_set_nw(self, pe)

s

Get Method:
_get_s(self)
Set Method:
_set_s(self, pe)

se

Get Method:
_get_se(self)
Set Method:
_set_se(self, pe)

sw

Get Method:
_get_sw(self)
Set Method:
_set_sw(self, pe)

w

Get Method:
_get_w(self)
Set Method:
_set_w(self, pe)

Class Variable Details

height

the height
Type:
int
Value:
0                                                                     

isw

Type:
P
Value:
<class 'pyscript.vectors.P'>                                           

width

the width
Type:
int
Value:
0                                                                     

Generated by Epydoc 2.0 on Mon Apr 24 17:02:36 2006 http://epydoc.sf.net