From ccf3486707208c4a293b32362c38c6a964748a27 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Fri, 9 May 2008 16:44:15 +0300 Subject: [PATCH] Map widget: Formating only --- src/gtkmap.c | 4 ++++ 1 file changed, 4 insertions(+) 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)) -- 2.39.5