mapnik-org/mapnik — Issue #589: C API (not C++)
Author: artemp
Created: 2011-10-11 08:03:32+00:00
State: open
Labels: Core_Library

Is it possible to define Mapnik C API?
It is a simple wrapper for Mapnik C++ API.
The main goals are:
1. Single .h header files without any dependency.
2. Fast compilation. No need to compile many .hpp files.
3. Main function (no all functions needed).
Example of a part rundemo.c
{{{
#include "mapnik_c.h"

int main ( int argc , char** argv)
{
MK_Map *map;
MK_Image32 *buf;
...
MK_register_datasource(...);
MK_register_font("/fonts/DejaVuSans.ttf");
map=MK_createMap(800,600);
...
buf=MK_create_Image32(800,600);
MK_agg_renderer_apply(map,buf);
...
}}}