[mapserver-commits] r12428 - trunk/mapserver/mapcache/src
svn at osgeo.org
svn at osgeo.org
Fri Aug 26 07:24:57 EDT 2011
Author: tbonfort
Date: 2011-08-26 04:24:56 -0700 (Fri, 26 Aug 2011)
New Revision: 12428
Modified:
trunk/mapserver/mapcache/src/tileset.c
Log:
check for sqlite >= 3.5.0 (with v2 api)
thomas.bonfort | 2011-08-15 14:54:50 +0200 (Mon, 15 Aug 2011)
Modified: trunk/mapserver/mapcache/src/tileset.c
===================================================================
--- trunk/mapserver/mapcache/src/tileset.c 2011-08-26 11:24:50 UTC (rev 12427)
+++ trunk/mapserver/mapcache/src/tileset.c 2011-08-26 11:24:56 UTC (rev 12428)
@@ -154,13 +154,18 @@
cairo_translate (cr, dstminx,dstminy);
cairo_scale (cr, hf, vf);
cairo_set_source_surface (cr, srcsurface, 0, 0);
- switch(ctx->config->resample_mode) {
- case GEOCACHE_RESAMPLE_BILINEAR:
- cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_BILINEAR);
- break;
- default:
- cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST);
- break;
+ if(fabs(hf-1)<0.0001 && fabs(vf-1)<0.0001) {
+ //use nearest resampling if we are at the resolution of the tiles
+ cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST);
+ } else {
+ switch(ctx->config->resample_mode) {
+ case GEOCACHE_RESAMPLE_BILINEAR:
+ cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_BILINEAR);
+ break;
+ default:
+ cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST);
+ break;
+ }
}
cairo_paint (cr);
cairo_surface_destroy(srcsurface);
More information about the mapserver-commits
mailing list