| 1 |
This directory contains libxmi, a machine-independent vector graphics |
| 2 |
rasterization library, and the sample program ./drawing.c. The source code |
| 3 |
for libxmi is distributed under the GNU GPL (see the file ./COPYING). The |
| 4 |
Web page for the package is: http://www.gnu.org/software/libxmi/libxmi.html . |
| 5 |
|
| 6 |
The file ./INSTALL explains how to install libxmi, and the file ./CUSTOMIZE |
| 7 |
explains how to customize it. Please read this file first, though. |
| 8 |
|
| 9 |
libxmi is based on the vector graphics code in the sample X server that is |
| 10 |
a part of the X Window System distribution. This code has been converted |
| 11 |
to ANSI C, extensively rearranged and commented, and somewhat extended. |
| 12 |
(In particular, by adding support for multicolored dashing.) The original |
| 13 |
X11 vector graphics code was written in the mid-to-late 1980's by Brian |
| 14 |
Kelleher, Joel McCormack, Todd Newman, Keith Packard, Robert Scheifler and |
| 15 |
Ken Whaley, who worked for Digital Equipment Corp., MIT, and/or the X |
| 16 |
Consortium. See ./README-X for an X Consortium permission notice. GNU |
| 17 |
extensions by Robert S. Maier <[email protected]>. |
| 18 |
|
| 19 |
The public header file for libxmi is ./xmi.h. It declares the eight |
| 20 |
functions in libxmi's core API, e.g. miDrawPoints(), miDrawLines(), |
| 21 |
miFillPolygon(), miDrawRectangles(), miFillRectangles(), miDrawArcs(), and |
| 22 |
miFillArcs(). These functions have the same semantics as the corresponding |
| 23 |
X11 functions (XDrawPoints, XDrawLines, etc.). The libxmi API contains a |
| 24 |
reentrant function miDrawArcs_r() too, since miDrawArcs() is not reentrant. |
| 25 |
Each function in the core API adds painted points to an opaque miPaintedSet |
| 26 |
object, a pointer to which is passed as its first argument. |
| 27 |
|
| 28 |
The core API includes functions for creating, manipulating, and destroying |
| 29 |
miPaintSet objects. It also includes functions for creating, manipulating, |
| 30 |
and destroying miCanvas objects. The function miCopyPaintedSetToCanvas() |
| 31 |
moves the points in a miPaintedSet to the next stage of the graphics |
| 32 |
pipeline: it merges them onto a miCanvas. There is support in this second |
| 33 |
stage for sophisticated pixel-merging algorithms. |
| 34 |
|
| 35 |
In general, it should be easy to install libxmi as a standalone library, or |
| 36 |
incorporate libxmi bodily into another package's source tree. libxmi is |
| 37 |
written in `strict C', so it may be compiled with either an ANSI C compiler |
| 38 |
or a C++ compiler. See ./INSTALL. |