]> git.street.me.uk Git - andy/viking.git/blobdiff - src/vikdemlayer.c
Fix maintaining a transparent background when an alpha value is applied to a pixbuf.
[andy/viking.git] / src / vikdemlayer.c
index 06870bfe788b9b8bc31bd90fc4f6b1339d40e11c..392fd1feb960064a9e1613c61eeac29412c66abe 100644 (file)
@@ -674,7 +674,8 @@ static void vik_dem_layer_draw_dem ( VikDEMLayer *vdl, VikViewport *vp, VikDEM *
          box_height -= box_y;
           // catch box at borders
          if(box_width < 0 || box_height < 0)
-                 continue; // skip this. this is out of our viewport anyway. FIXME: why?
+           // skip this as is out of the viewport (e.g. zoomed in so this point is way off screen)
+           continue;
 
          gboolean below_minimum = FALSE;
           if(vdl->type == DEM_TYPE_HEIGHT) {
@@ -688,9 +689,6 @@ static void vik_dem_layer_draw_dem ( VikDEMLayer *vdl, VikViewport *vp, VikDEM *
           }
 
           {
-           if(box_width < 0 || box_height < 0) // FIXME: why does this happen?
-              continue;
-
             if(vdl->type == DEM_TYPE_GRADIENT) {
               if( elev == VIK_DEM_INVALID_ELEVATION ) {
                 /* don't draw it */
@@ -959,7 +957,7 @@ static void srtm_dem_download_thread ( DEMDownloadParams *p, gpointer threaddata
                (intlon >= 0) ? 'E' : 'W',
                ABS(intlon) );
 
-  static DownloadMapOptions options = { FALSE, FALSE, NULL, 0, a_check_map_file, NULL, NULL };
+  static DownloadFileOptions options = { FALSE, FALSE, NULL, 0, a_check_map_file, NULL, NULL };
   DownloadResult_t result = a_http_download_get_url ( SRTM_HTTP_SITE, src_fn, p->dest, &options, NULL );
   switch ( result ) {
     case DOWNLOAD_CONTENT_ERROR: