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

get's added


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.


svn co memphis-client-library-split

Proposed API


#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, guint zoom_level)

guint memphis_renderer_get_resolution (MemphisRenderer *renderer)
guint memphis_renderer_get_zoom_level (MemphisRenderer *renderer)
MemphisMap* memphis_renderer_get_map (MemphisRenderer *renderer)
MemphisRuleSet* memphis_renderer_get_rule_set (MemphisRenderer *renderer)

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:



  • Relicense all code as LGPL.


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