From: Kaj-Michael Lang Date: Fri, 9 May 2008 13:44:15 +0000 (+0300) Subject: Map widget: Formating only X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccf3486707208c4a293b32362c38c6a964748a27;p=mapper Map widget: Formating only --- diff --git a/src/gtkmap.c b/src/gtkmap.c index b745b5c..e4d9c10 100644 --- a/src/gtkmap.c +++ b/src/gtkmap.c @@ -192,15 +192,19 @@ struct _GtkMapPriv #define tile2grid(tile) ((tile) << 3) #define grid2tile(grid) ((grid) >> 3) + #define tile2pixel(tile) ((tile) << 8) #define pixel2tile(pixel) ((pixel) >> 8) + #define tile2unit(tile) ((tile) << (8 + priv->zoom)) #define unit2tile(unit) ((unit) >> (8 + priv->zoom)) + #define tile2zunit(tile, zoom) ((tile) << (8 + zoom)) #define unit2ztile(unit, zoom) ((unit) >> (8 + zoom)) #define grid2pixel(grid) ((grid) << 5) #define pixel2grid(pixel) ((pixel) >> 5) + #define grid2unit(grid) ((grid) << (5 + priv->zoom)) #define unit2grid(unit) ((unit) >> (5 + priv->zoom))