Libcairo supports several output file formats (PNG, PDF, SVG) and PNG as input format. But often it is necessary to read and write JPG files as well. Libjpeg-turbo does all the JPEG stuff. All you have to do is to combine this with the Cairographics library. I implemented two functions in this small C source …
Tag: libcairo
Dec 11
Calculating Control Points For Bsplines
This article explains how to calculate the control points for B-Splines. The basic idea is that we want to interpolate a smooth curve into a set of points. B-Splines are a sequence of Bezier curves which solve that problem. But each Bezier curve is defined by four points: the start and end point and two …
Nov 02
Cairo Graphics and X11/Xlib
This article explains how to open an X11 window using Xlib and shows how to create graphics output with Cairo graphics. Cairo Graphics — also simply called libcairo — is a very powerful 2D graphics library. Among many graphics primitives (such as lines, curves,…) the approach of libcairo is to separate the graphic functions from …
Feb 11
Smrender Supports Libcairo
About one month of intensive work and it is done! Smrender now uses libcairo as a graphics library for rendering instead of libgd. The major advantages of this change are qualitiy improvement of the output images, performance improvement, and the ability to create native vector-based PDF documents. It was a long outstanding task for me …