Welcome to Xierpa. This is the stable 1.2 version which was developed by Petr van Blokland + Claudia Mens (buro@petr.com) and is maintained by Michiel Kauw-A-Tjoe. It is subclassed by the Museum Meermanno and American Express applications.

GNode and GState

A GState (Graphic State) holds the current set of (typo)graphic parameters while drawing or rendering a page. A GState is created by overlaying a previous GState object with it's own parameters. This result is cascading values, comparable to CSS.

Import

from xpyth.xierpa.imaging.gstate import gnode

Example

Currently GState data sets are used in the LayoutBuilder and ImageBuilder An example is the set as used in the LayoutBuilder example pages.
layout = gnode(x=8, y=0, mode='root', nodes=[
	gnode(y=0, x=0, z=100, colspan=3, w=col(9), 
		mode='head', class_='myhead', hook=pagehead),

	gnode(y=1, x=1, z=100, w=col(6), 
		mode='content', class_='content', hook=content),
	gnode(y=1, x=2, z=100, w=col(1), 
		mode='side', class_='content', hook=content),
	gnode(y=1, x=0, z=100, w=col(2), 
		mode='navigation', class_='content', hook=navigation),

	gnode(y=2, x=1, z=100, w=col(3), colspan=2, 
		mode='nohook', class_='content'),
	gnode(y=2, x=0, z=100, w=col(1), 
		mode='nav', class_='content', hook=subnavigation),
])
self.divlayout(layout)