Ipelib
The Ipe library documentation

The Ipe library ("Ipelib") provides the geometric primitives and implements all the geometric objects that appear in Ipe. Many tasks related to modifying an Ipe document are actually performed by Ipelib. For instance, the ipetoipe program consists of only a few calls to Ipelib.

Ipelib can easily be used by C++ programs to read, write, and modify Ipe documents. Compiling Ipelib is easy, it requires only the standard C++ library (including the STL), and the zlib compression library. Nearly all symbols in Ipelib are in the ipe namespace, those that aren't start with the letters "Ipe".

Before using Ipelib in your own program, make sure to initialize the library by calling ipe::Platform::initLib().

Many of the Ipelib classes are also made available as Lua objects. Programming in Lua describes the Lua bindings to Ipelib, to ipeui, and to the Ipe program itself. The Ipe program itself is mostly written in Lua and uses these Lua bindings.

On Unix, all filenames passed to Ipelib are assumed to be in the local system's encoding. On Windows, all filenames passed to Ipelib are assumed to be UTF-8. All Lua strings are assumed to be UTF-8 (filenames are converted by the ipelua bindings).

Ipelets explains how to write ipelets, that is, extensions to Ipe. Ipelets are either written in Lua or in C++ (using a small Lua wrapper to describe the ipelet). C++ ipelets have to be linked with Ipelib to access and modify Ipe objects.

The classes documented here are implemented in five different libraries:

  • libipe is the core Ipelib library. It implements geometric primitives, Ipe objects, and the Ipe document. However, it doesn't know anything about drawing to the screen or about the Lua bindings.
  • libipecairo implements the Ipe cairo module. It provides drawing of Ipe objects using the Cairo library.
  • libipelua implements the Lua bindings for Ipelib. If installed properly, it can be loaded dynamically from Lua using require. It is also used by ipescript.
  • libipecanvas implements the Ipe canvas module. It provides a widget for displaying and editing Ipe objects.
  • libipeui implements Lua bindings for user interfaces. This library does not depend on any other Ipe component, and can be used for other Lua projects.

Here is an annotated list of the modules:

Finally, here is list of the pages describing Lua bindings: