Package pyscript :: Package lib :: Module presentation :: Class ColumnBox
[show private | hide private]
[frames | no frames]

Class ColumnBox

object --+                
         |                
     PsObj --+            
             |            
     AffineObj --+        
                 |        
              Area --+    
                     |    
                 Group --+
                         |
                        ColumnBox


A box, containing various objects, with a fixed width, but variable height

Should add more docs here too...
Method Summary
  __init__(self, poster)
  add_epsf(self, file, height, width)
Add an eps file to the column box.
  add_fig(self, fig, height, width, bg)
Add an arbitrary figure to the column box, with a background.
  add_object(self, obj)
Add a pre-defined object to the box, this could be an Align or Group object for example
  add_TeXBox(self, text)
Adds a TeXBox object to the column
  add_text(self, text)
Add arbitrarily placed text to the box
  set_title(self, title)
Set the title of the box within the column
    Inherited from Group
  __getitem__(self, i)
Get an item from the list of objects
  __getslice__(self, i, j)
Get a slice of items from the list of objects
  __len__(self)
Returns the length of the object list
  append(self, *objs, **options)
append object(s) to group
self apply(self, **options)
apply attributes to all objects
Bbox bbox(self)
Gather together common bounding box for group Don't use Area's bbox as transformations may mean a tighter bbox (eg a circle)
  body(self)
Returns the body postscript of the object
  clear(self)
Clear all the elements and reset group to an empty group
  insert(self, idx, obj)
insert object
  recalc_size(self)
recalculate internal container size based on objects within
  reverse(self)
Reverse the order of objects in the list of objects in the group
  validate(self, obj)
make sure this object can be inserted into group
    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
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
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
    Inherited from Area
  c
  e
  n
  ne
  nw
  s
  se
  sw
  w

Class Variable Summary
    Inherited from Area
  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

add_epsf(self, file, height=None, width=None)

Add an eps file to the column box.

If only one of the height or width is given then the figure is scaled appropriately, maintaining the original aspect ratio.
Parameters:
file - the file name of the eps file to add
           (type=string)
height - the height of the figure
           (type=float)
width - the width of the figure
           (type=float)

add_fig(self, fig, height=None, width=None, bg=<class 'pyscript.base.Color'>)

Add an arbitrary figure to the column box, with a background.

This could be a previously defined pyscript diagram (for instance). If only one of the height or width is given then the figure is scaled appropriately, maintaining the original aspect ratio.
Parameters:
fig - the figure to add
           (type=PyScript object)
height - the height of the figure
           (type=float)
width - the width of the figure
           (type=float)
bg - the colour of the figure background
           (type=Color object)

add_object(self, obj)

Add a pre-defined object to the box, this could be an Align or Group object for example
Parameters:
obj - the object to be added
           (type=pyscript object)

add_TeXBox(self, text)

Adds a TeXBox object to the column
Parameters:
text - the text of the TeXBox object to add
           (type=string)

add_text(self, text)

Add arbitrarily placed text to the box
Parameters:
text - the text to be added
           (type=string)

set_title(self, title)

Set the title of the box within the column
Parameters:
title - the title of the column box
           (type=string)

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