Version 1 of tclcairo

Updated 2012-03-07 14:24:37 by DDG

tclcairo

Swig based binding for tcl for the cairo library. Can be used to produce, png, pdf, ps and svg files using the same API. Provided as a starkit for Tclkit 8.4, 8.5 and 8.6 with compiled binaries for Win32-x86 and Linux-x86

* Author: DDG * Where: ** https://bitbucket.org/mittelmark/tcl-code/downloads/tclcairo1.10.2.kit (Win32-x86, Linux-x86); ** https://bitbucket.org/mittelmark/tcl-code/downloads/tclwin32cairo1.10.2.kit (Win32-x86, Linux-x86) with Ffidl based loading of cairo, png and zlib-dlls on Windows

Example session:

 [email protected](7:1441):mytcl$ tclkit-8.4.19
 % source tclcairo1.10.2.kit
 % package require cairo
 0.1
 % glob tclcairo1.10.2.kit/lib/*
 tclcairo1.10.2.kit/lib/tclcairo1.10.2
 glob tclcairo1.10.2.kit/lib/*/*
 tclcairo1.10.2.kit/lib/tclcairo1.10.2/cairo-test.tcl tclcairo1.10.2.kit/lib/tclcairo1.10.2/cairo.i 
 tclcairo1.10.2.kit/lib/tclcairo1.10.2/libcairo.dll tclcairo1.10.2.kit/lib/tclcairo1.10.2/libcairo.so  
 tclcairo1.10.2.kit/lib/tclcairo1.10.2/pkgIndex.tcl 
 % lrange [lsort [info commands cairo::*]] 0 10
 ::cairo::_cairo_path_data_t ::cairo::_cairo_path_data_t_header ::cairo::_cairo_path_data_t_header_get 
 ::cairo::_cairo_path_data_t_header_length_get ::cairo::_cairo_path_data_t_header_length_set 
 ::cairo::_cairo_path_data_t_header_type_get ::cairo::_cairo_path_data_t_header_type_set 
 ::cairo::_cairo_path_data_t_point ::cairo::_cairo_path_data_t_point_get ::cairo::_cairo_path_data_t_point_x_get 
 ::cairo::_cairo_path_data_t_point_x_set

 % source tclcairo1.10.2.kit/lib/tclcairo1.10.2/cairo-test.tcl
 % exit
 [email protected](7:1442):mytcl$ ls -lt | head
 insgesamt 55828
 -rw-r--r-- 1 usern users      254  7. Mär 15:07 cairo-test2.png
 -rw-r--r-- 1 usern users      929  7. Mär 15:07 test.pdf
 -rw-r--r-- 1 usern users     2503  7. Mär 15:07 test.ps
 -rw-r--r-- 1 usern users      484  7. Mär 15:07 test.svg

If the library loading on windows fails try the larger windows starkit which contains as well cairo, zip and png shared libs.

You have to use the C-Api documentation provided here: http://cairographics.org/manual/ A tcl wrapper using an OO-framework like Snit or Itcl would be greet in making it more tclish.