Package pyscript :: Module vectors :: Class P
[show private | hide private]
[frames | no frames]

Class P

object --+    
         |    
     PsObj --+
             |
            P

Known Subclasses:
R

A Vector (or point) operations always return type 'P' vectors
Method Summary
  __init__(self, **options)
can pass a dict of atributes to set
  __add__(self, o)
  __div__(self, o)
  __getitem__(self, i)
  __len__(self)
  __mul__(self, o)
  __neg__(self)
  __radd__(self, o)
  __rmul__(self, o)
  __rsub__(self, o)
  __setitem__(self, i, other)
  __sub__(self, o)
  body(self)
return postscript as string
  cross(self, other)
Calculate the cross product of two vectors
    Inherited from PsObj
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
Bbox bbox(self)
return objects bounding box this can be a Null Bbox() if object doesn't draw anything on the page.)
self copy(self, **options)
return a copy of this object with listed attributes modified
string postbody(self)
convenience function to allow clean subclassing
string prebody(self)
convenience function to allow clean subclassing
    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
  arg
  length
  U
  x
  y

Class Variable Summary
list point = [0, 0]

Method Details

__init__(self, x=0.0, y=0.0, **options)
(Constructor)

can pass a dict of atributes to set
Overrides:
pyscript.base.PsObj.__init__ (inherited documentation)

body(self)

return postscript as string
Overrides:
pyscript.base.PsObj.body

cross(self, other)

Calculate the cross product of two vectors

Property Details

arg

Get Method:
_get_arg(self)

length

Get Method:
_get_length(self)

U

Get Method:
_get_U(self)

x

Get Method:
_get_x(self)

y

Get Method:
_get_y(self)

Class Variable Details

point

Type:
list
Value:
[0, 0]                                                                 

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