Edges Library

Two-colour edge tracing — This library allows conversion of a low-colour bitmap into a vector graphic with at most one path per colour.


Description

This is a pair of small libraries (one in C; one in Java) for tracing compound polygons formed from smaller elements, such as square cells in a two-colour rectangular grid. The result is an efficient vector path which, when filled using an even-odd fill rule, outlines the compound polygons. The C version is used by my online Nonogram solver to produce SVGs that are both compact and quick to render.

It can also do multicolour images. (The fewer the colours, the better it should work.) It will try to simplify the paths of each colour by adding extra cells into the plotted area, so long as such cells are hidden by other colours drawn later. The Java version doesn't do any path simplification yet.

  • <edges.h>

Files

File Size Last modified Description Requirements and recommendations
Source (SVN) GNU Make ISO C90 Binodeps
Source (SVN) GNU Make Java 1.8 Jardeps
Source documentation