Cairo for Smalltalk/X
stx:goodies/libcairo is a Smalltalk/X package providing integration of Cairo graphics library. It contains a drop-in replacement for native GC (DeviceGraphicsContext) to switch rendering of some or all windows to Cairo.
- Full access to Cairo API
- Full support for icons with alpha channel
- Full support for transparency (alpha) for all drawing operations (lines, rectangles)
- Full and correct support for arbitrary transformation
- Almost-pixel identical results on Windows and Linux (X11)
- Ready for Quartz (Mac OS X) and Wayland (X11 seems to be phasing out)
- Integrates with Smalltalk/X so complete application can be rendered using Cairo
For the impatient Following code will install CairoGraphicsContext as graphics device's default graphics context so new windows will be rendered using Cairo:
Screen current graphicsContextClass: CairoGraphicsContext.
To revert back to standard rendering, evaluate:
Screen current graphicsContextClass: Screen current class graphicsContextClass
For more defailts, see:
Supported versions of Smalltalk/X
stx:goodies/libcairo is available for Smalltalk/X "jv branch", both Windows and Linux, 32bit and 64bit.
Should you need Cairo on any other version of Smalltalk/X, please contact the author by email.
<jan.vrany [at] fit.cvut.cz>
This software is licensed under Creative Commons Attribution-NonCommercial 4.0 International License. You may find a full license text in
In short, you are free to:
- Share — copy and redistribute the material in any medium or format,
- Adapt — remix, transform, and build upon the material,
under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made,
- NonCommercial — You may not use the software for commercial purposes.
For permissions beyond the scope of this license see Licensing.