Jeszra Environment

Generated Files
TkZinc 3.3.4
Scalable Vector Graphics

Jeszra generates a wide range of documents. In addition, templates are usable from different programming languages; Jeszra generates supportive classes for templates. Jeszra also generates Documentation and Scalable Vector Graphics. The following tables describe all the file types supported by Jeszra.

Jeszra requires Tcl/Tk 8.4 or higher, the Runtime Library and Gestalt Items. The Runtime Library and Gestalt Items are bundled with Jeszra.

Using TkPath is highly recommended. The TkPath used version must be higher than 0.2.5. Jeszra supports both TkPath 0.2 and 0.3. TkPath 0.2 is more mature –stable– than 0.3 (at the time of writing 0.3.1) and thus recommended over 0.3.1. Switch to TkPath 0.3, when it’s mature enough for deployment.

TkPath and Tcl/Tk

  • Under X Window System: Tcl/Tk 8.4 with TkPath 0.2.8 is recommended.

  • Under AQUA®: Tcl/Tk 8.5 with TkPath 0.2.8 is recommended. TkPath 0.3.1 has some visual difficulties on AQUA®.

Jeszra will use functionalities from Tcl/Tk 8.6 in the future.

Jeszra uses TkZinc 3.3.4 for diagrams. TkZinc 3.3.4 should be installed to work with diagrams.

As with TkPath, TkZinc 3.3.4 is extensively supported by Jeszra including transformations, grouping and Scalable Vector Graphics generation.

Please also install »tclsplines«, when using Jeszra for vector graphics. The package »tclsplines« provides access to the interpolation code inside of the Tk canvas window. This function is used by Jeszra to create smoothed lines and polygons in Scalable Vector Graphics. Jeszra also uses »tclspline« too smooth TkZinc 3.3.4 curve and TkPath path objects.

Tcl/Tk up to version 8.5 supports only a few bitmap formats. PNG support was only added recently to Tcl/Tk version 8.6.

Jeszra may use third-party packages such as: »base64«, »tkpng« and »Img«, if available.

Jeszra utilizes tDOM to create a Scalable Vector Graphics DOM-tree in memory. This DOM-tree is currently only being used for Scalable Vector Graphics import and export. In future versions a DOM-tree will become a requirement for DocBook 5.x generation as-well.

# The code generation must be configured:
array set ::rat ...

# Generate...

# The given window path name is the hierarchy
# view inside of Jeszra:
set w \
proc do args {::eval $args}
dumper::vanilla $w Hierarchy Hierarchy {}
vgcode::dump-widget $w $w 7 Hierarchy
svgdom::dump foo.svg $dumper::_doc

Example 1.2, “Using tDOM” displays how to access the Scalable Vector Graphics code generation from a Tcl/Tk application. The parser is configured through the global array »rat«. All settings, related to code generation are stored under »settings,Code,*«. The module startup.tcl can be used to create a standard configuration, as shown in Example 1.3, “Standard Configuration”.

The »canvas« window in Example 1.2, “Using tDOM” is the Jeszra hierarchy view. This Tcl script can be used from the console. The Jeszra- home directory must be included in auto_path , Jeszra’s pkgIndex.tcl file contains the references to the needed modules.

Scalable Vector Graphics generation requires tDOM.

The module svgdom.tcl facilitates the DOM-Tree access.

The root element – DOM-tree– can be reached through the variable »::dumper::_doc«.

Jeszra uses the standard fonts on the different windowing systems.

Under AQUA® »Lucida Grande« and Monaco.

Under X Window System the »bitstream® vera« font family.

Under Microsoft® Windows® the system fonts.

A TrueType® font: »Gestalt.ttf«, »Gestalt.dfont« on AQUA®, is distributed with Jeszra. The »Gestalt« font contains all the icons displayed inside of Jeszra. »Gestalt.ttf« is a so-called symbol font.

Jeszra uses built-in bitmaps (either as PNG or GIF) as a fall back solution for its icons, whenever »Gestalt.ttf« isn’t installed. These bitmap icons are intentionally ugly, so please install it’s icon font!

Using the glyphs from a symbol fonts as icons creates zoomable, anti-aliased icons with unbeatable high performance. Even memory consumption is kept minimal. Symbol fonts are embeddable as Web-Fonts in a web-site, too! Reducing loading time and memory consumption when compared to bitmaps. The Jeszra and Gestalt Items web-sites at SourceForge make use of web-fonts either inside the HTML pages and the embedded Scalable Vector Graphicss.

A Scalable Vector Graphics variant of »Gestalt.ttf« is included within the distribution.

Some X Window System desktop environments allow for user installed fonts. This mechanism might not always work properly!

Jeszra generates Scalable Vector Graphics from a Tk Graphical User Interface. The canvas, TkPath and TkZinc 3.3.4 as well as many other windows are converted to Scalable Vector Graphics.

Screen-shots are taken with Img, when Jeszra does not know how to convert the window. This applies for controls originating from Tile; introspection is insufficient for these controls.

Images and screen-shots are base64 encoded and are embedded into the generated Scalable Vector Graphics. The Img package is the recommended tool for base64 encoding. Images are stored inside the first <defs/> section of the generated Scalable Vector Graphics. The embedded images are later referenced through the <use> element.

»pimage« images may be directly placed into the generated Scalable Vector Graphics code. This is necessary whenever the dimensions of an image was modified. Jeszra monitors pimage width and height alterations and acts accordingly.

The Tk text window is rudimentarily converted to Scalable Vector Graphics. Only the text itself is preserved, formatting is partly lost. The text introspection capabilities are not suitable to preserve the formatting in Scalable Vector Graphics version 1.1.

Hidden windows are ignored by the Scalable Vector Graphics code generation. Scalable Vector Graphics is generated for all the content of a window, that is the entire contents of a visible canvas window is converted into Scalable Vector Graphics. Be aware, that hidden windows, embedded in a visible canvas are not included in the generated Scalable Vector Graphics, though.

Each window is represented as a new viewport <Scalable Vector Graphics>. The coordinates of this viewport are the same as the coordinates of the window. Scrolling areas are thus preserved inside the generated Scalable Vector Graphics.

The generated Scalable Vector Graphics is inert. Only the cursor property is carried over to Scalable Vector Graphics. State related values such as »-activefill« , »-disabledoutline« etc. are resolved in advance and converted accordingly.

Fully animated and interactive Scalable Vector Graphics is planned for the future, in addition to the inert version.

The generated Scalable Vector Graphics can be used inside of documents or for resolution independent –using the printer resolution– printing. Printing can be channeled through a FO-Processor such as FOP. Scalable Vector Graphics must be embedded in a simplistic fo-wrapper for printing through FOP.

Jeszra does not have Scalable Vector Graphics specific requirements other than tDOM for Scalable Vector Graphics generation. See also the section called “tDOM”. Scalable Vector Graphics import requires TkPath in addition to tDOM.

How-to use Jeszra’s Scalable Vector Graphics creation capabilities, inside of a Tcl/Tk application, is displayed in Example 1.2, “Using tDOM”. It is recommended to combine Scalable Vector Graphics and gstripes . Gstripes should be used as the print-preview of a more traditional Graphical User Interface.

DocBook 4.5 is supported by Jeszra. There is already some work done concerning migration to DocBook 5. DocBook 5 makes it possible to not only create simple documents, but also to manage them as a project. Future Jeszra version will increase the DocBook support via DOM manipulations and perhaps package and revision management.

The complete Jeszra documentation is written in DocBook. All the recommended tools were extensively used to create this documentation.

Most DocBook tools are written in Java® and thus a Java® Runtime environment is required.