wiki:LibMemphis

Version 6 (modified by simon, 5 years ago) (diff)

--

LibMemphis

This page documents the progress of all changes in branches/client-library-split. The goal of this branch is the creation of a generic glib/cairo based OSM renderer library. The image tile renderer 'memphis' will be its first client. The second client will be libchamplain. And many more will follow.

Code:

svn co https://svn.openstreetmap.ch/svn/memphis/branches/client-library-split memphis-client-library-split

Proposed API

Header:

#include "memphis.h"

Class MemphisRenderer:

MemphisRenderer* memphis_renderer_new ()
MemphisRenderer* memphis_renderer_new (MemphisRuleSet *rules, MemphisMap *map)
void memphis_renderer_free (MemphisRenderer *r)
void memphis_renderer_set_rule_set (MemphisRenderer *r, MemphisRuleSet *rules)
void memphis_renderer_set_map (MemphisRenderer *r, MemphisMap *map)
void memphis_renderer_set_resolution (MemphisRenderer *r, guint resolution)
void memphis_renderer_set_zoom_level (MemphisRenderer *r, gunit zoom_level)

void memphis_renderer_draw (MemphisRenderer *r, cairo_t *cr)
void memphis_renderer_draw_tile (MemphisRenderer *r, cairo_t *cr, guint x, guint y)

Class MemphisMap:

MemphisMap* memphis_map_new_from_file (gchar* filename)
MemphisMap* memphis_map_new_from_data (gchar* data)
void memphis_map_free (MemphisMap* map)

Class MemphisRuleSet:

MemphisRuleSet* memphis_rule_set_new_from_file (gchar* filename)
MemphisRuleSet* memphis_rule_set_new_from_data (gchar* data)
void memphis_rule_set_free (MemphisRuleSet* rules)

Class MemphisRule:

TODO

Done

  • Relicense all code as LGPL.

Roadmap

  • Remove all global variables
  • Make it thread safe
  • Create a GObject based API
  • Create documentation and example client code