[cairo-commit] roadster/src map.c,1.31,1.32

Ian McIntosh commit at pdx.freedesktop.org
Wed Mar 23 14:43:07 PST 2005


Committed by: ian

Update of /cvs/cairo/roadster/src
In directory gabe:/tmp/cvs-serv16854/src

Modified Files:
	map.c 
Log Message:
	* src/map.c: Fixed off-by-one error in selecting line widths for hit testing.
	* data/layers.xml: Changed style to never use single-color roads (ugly).	


Index: map.c
===================================================================
RCS file: /cvs/cairo/roadster/src/map.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- map.c	23 Mar 2005 09:21:49 -0000	1.31
+++ map.c	23 Mar 2005 22:43:05 -0000	1.32
@@ -655,8 +655,8 @@
 		gint nLayer = layerdraworder[i].nLayer;
 
 		// use width from whichever layer it's wider in
-		gdouble fLineWidth = max(g_aLayers[nLayer]->m_Style.m_aSubLayers[0].m_afLineWidths[pMap->m_uZoomLevel],
-					 g_aLayers[nLayer]->m_Style.m_aSubLayers[1].m_afLineWidths[pMap->m_uZoomLevel]);
+		gdouble fLineWidth = max(g_aLayers[nLayer]->m_Style.m_aSubLayers[0].m_afLineWidths[pMap->m_uZoomLevel-1],
+					 g_aLayers[nLayer]->m_Style.m_aSubLayers[1].m_afLineWidths[pMap->m_uZoomLevel-1]);
 
 		// make thin roads a little easier to hit
 		fLineWidth = max(fLineWidth, MIN_ROAD_HIT_TARGET_WIDTH);




More information about the cairo-commit mailing list