Version 2 of tclcairo

Updated 2012-03-07 14:25:05 by DDG


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

Example session:

 [email protected](7:1441):mytcl$ tclkit-8.4.19
 % source tclcairo1.10.2.kit
 % package require cairo
 % glob tclcairo1.10.2.kit/lib/*
 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/  
 % 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 

 % 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
 -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: A tcl wrapper using an OO-framework like Snit or Itcl would be greet in making it more tclish.