Package pyscript :: Module groups
[show private | hide private]
[frames | no frames]

Module pyscript.groups

Groupies

Here are collected all the classes and functions to do with groups. Since much of the rendering is done by Eps, Page and Pages this module also contains some helper functions such as collecttex and TeXStuff.
Classes
Align Function to align a group of objects.
Eps Create the EPS
Group Groups together a list of objects
HAlign Horizontal align class
Page A postscript page
Pages Class to hold pages and write out a multi-page postsript document
VAlign Vertical align class

Function Summary
list collecttex(objects, tex)
Collect the TeX objects in the order they're rendered
Group Distribute(*items, **options)
Function to distribute a group of objects.
string TeXstuff(objects)
Get the actual postscript code and insert it into the tex objects.

Variable Summary
str __revision__ = '$Revision: 1.35 $'
str PSMacros = '%%BeginResource: procset pyscript\n/PyScript...

Function Details

collecttex(objects, tex=[])

Collect the TeX objects in the order they're rendered
Parameters:
objects - the objects to check for being TeX objects
           (type=object)
tex - list of TeX objects
           (type=

list

Used by render())
Returns:
list of TeX objects
           (type=list)

Distribute(*items, **options)

Function to distribute a group of objects.
Parameters:
items - list of items to distribute
           (type=list)
options - dictionary of attributes
           (type=dict
  • p1: first point of the line along which to distribute
  • p2: second point of the line along which to distribute
  • a1: The first anchor point to use for spacing to eg "e", "c"
  • a2: The second anchor point for spacing
  • as: anchor point for first item (overides a2 if present)
  • ae: anchor point for last item (overides a1 if present)
)
Returns:
a reference to a group containing the objects
           (type=Group)

TeXstuff(objects)

Get the actual postscript code and insert it into the tex objects. Also grab prolog

used by render()
Returns:
TeX objects prolog from dvips
           (type=string)

Variable Details

__revision__

Type:
str
Value:
'$Revision: 1.35 $'                                                    

PSMacros

Type:
str
Value:
'''%%BeginResource: procset pyscript
/PyScriptDict 10 dict def PyScriptDict begin
%show text with kerning if supplied
/kernshow { 0 2 2 counttomark 2 sub { -2 roll } for
counttomark 2 idiv { exch show 0 rmoveto} repeat pop
} bind def
/BeginEPSF { 
/b4_Inc_state save def 
...                                                                    

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