Tag: libcairo

JPEG Support For Libcairo

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

A Handwriting Generator For Presentation Design

This article is about a tool which creates electronic documents with a real handwritten-like font (download link). Sometimes it is desirable to use a font which looks similar to a handwritten text. Those fonts typically are called script fonts and a quick Google search results in several million hits. Although many of them look as …

Continue reading

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 …

Continue reading