This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
Chicken bindings for Cairo, a vector graphics library.
Currently there is no documentation, see the source-files for more information.
(import scheme (chicken base) cairo miscmacros (chicken random)) (define *rotation* 0) (define *delta* 2.7) (define *width* 18) (define *height* 26) (define *box-size* 15) (define s (cairo-pdf-surface-create "schotter.pdf" 842 1190)) ; A3 (define c (cairo-create s)) ;; use millimeters as units from here on (cairo-scale c (/ 72 25.4) (/ 72 25.4)) (cairo-set-source-rgba c 1 0 0 1) (dotimes (y *height*) (dotimes (x *width*) (cairo-save c) (cairo-set-line-width c .3) (cairo-translate c (+ 12 (* x *box-size*)) (+ 16 (* y *box-size*))) (cairo-rotate c (* (if (> 1 (pseudo-random-integer 2)) -1 1) (/ cairo-pi 180) (* *rotation* (pseudo-random-real)))) (cairo-rectangle c 0 0 *box-size* *box-size*) (cairo-set-source-rgba c 0 0 0 1) (cairo-stroke c) (cairo-restore c)) (set! *rotation* (+ *rotation* *delta*))) (cairo-surface-show-page s) (cairo-destroy c) (cairo-surface-finish s) (cairo-surface-destroy s)
Michael Bridgen and Tony Garnock-Jones
- Support for blend mode operators thanks to Matt Gushee
- Support for rectangle-from-surface and mask-surface procedure
- Support for pdf/svg/ps surfaces, thanks to Markus Klotzbücher, get-width, get-height for surfaces added, FFI bugfixes.
- Bugfix for #762, fixes record-printers, thanks to Markus Klotzbücher, Peter and Felix
- Fix wrong pointer type in FFI
- also mark linker options returned by pkg-config, so -pthread gets recognised as linker option
- parses options returned by pkg-config (thanks to bpowers)
- fixed use of removed foreign type pointer
- cairo.setup bug fix regarding to eggdoc obsolete code
- Fixed incorrect SDL-header include in test-cairo.scm (thanks to Markus Klotzbuecher)
- 0.1.4 (alpha)
- PNG and additional surface functions by Michael McDermott
- 0.1.3 (alpha)
- Initial release
Copyright (C) 2004, 2005 Michael Bridgen and Tony Garnock-Jones This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA