Diff of /trunk/src/osm-gps-map.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 82 by harbaum, Thu Aug 27 08:29:48 2009 UTC revision 83 by harbaum, Thu Aug 27 20:24:31 2009 UTC
# Line 2183  osm_gps_map_expose (GtkWidget *widget, G Line 2183  osm_gps_map_expose (GtkWidget *widget, G
2183      GdkDrawable *drawable = widget->window;      GdkDrawable *drawable = widget->window;
2184  #endif  #endif
2185    
2186      gdk_draw_drawable (drawable,      if (!priv->dragging)
                        widget->style->fg_gc[GTK_WIDGET_STATE (widget)],  
                        priv->pixmap,  
                        0,0,  
                        priv->drag_mouse_dx - EXTRA_BORDER,  
                        priv->drag_mouse_dy - EXTRA_BORDER,  
                        -1,-1);  
   
     //Paint white outside of the map if dragging. Its less  
     //ugly than painting the corrupted map  
     if(priv->drag_mouse_dx>EXTRA_BORDER) {  
         gdk_draw_rectangle (drawable,  
                             widget->style->white_gc,  
                             TRUE,  
                             0, 0,  
                             priv->drag_mouse_dx - EXTRA_BORDER,  
                             widget->allocation.height);  
     }  
     else if (-priv->drag_mouse_dx > EXTRA_BORDER)  
2187      {      {
2188          gdk_draw_rectangle (drawable,          gdk_draw_drawable (drawable,
2189                              widget->style->white_gc,                             widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
2190                              TRUE,                             priv->pixmap,
2191                              priv->drag_mouse_dx + widget->allocation.width + EXTRA_BORDER, 0,                             event->area.x + EXTRA_BORDER, event->area.y + EXTRA_BORDER,
2192                              -priv->drag_mouse_dx - EXTRA_BORDER,                             event->area.x, event->area.y,
2193                              widget->allocation.height);                             event->area.width, event->area.height);
     }  
   
     if (priv->drag_mouse_dy>EXTRA_BORDER) {  
         gdk_draw_rectangle (drawable,  
                             widget->style->white_gc,  
                             TRUE,  
                             0, 0,  
                             widget->allocation.width,  
                             priv->drag_mouse_dy - EXTRA_BORDER);  
2194      }      }
2195      else if (-priv->drag_mouse_dy > EXTRA_BORDER)      else
2196      {      {
2197          gdk_draw_rectangle (drawable,          gdk_draw_drawable (drawable,
2198                              widget->style->white_gc,                             widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
2199                              TRUE,                             priv->pixmap,
2200                              0, priv->drag_mouse_dy + widget->allocation.height + EXTRA_BORDER,                             0,0,
2201                              widget->allocation.width,                             priv->drag_mouse_dx - EXTRA_BORDER,
2202                              -priv->drag_mouse_dy - EXTRA_BORDER);                             priv->drag_mouse_dy - EXTRA_BORDER,
2203                               -1,-1);
2204    
2205            //Paint white outside of the map if dragging. Its less
2206            //ugly than painting the corrupted map
2207            if(priv->drag_mouse_dx>EXTRA_BORDER) {
2208                gdk_draw_rectangle (drawable,
2209                                    widget->style->white_gc,
2210                                    TRUE,
2211                                    0, 0,
2212                                    priv->drag_mouse_dx - EXTRA_BORDER,
2213                                    widget->allocation.height);
2214            }
2215            else if (-priv->drag_mouse_dx > EXTRA_BORDER)
2216            {
2217                gdk_draw_rectangle (drawable,
2218                                    widget->style->white_gc,
2219                                    TRUE,
2220                                    priv->drag_mouse_dx + widget->allocation.width + EXTRA_BORDER, 0,
2221                                    -priv->drag_mouse_dx - EXTRA_BORDER,
2222                                    widget->allocation.height);
2223            }
2224    
2225            if (priv->drag_mouse_dy>EXTRA_BORDER) {
2226                gdk_draw_rectangle (drawable,
2227                                    widget->style->white_gc,
2228                                    TRUE,
2229                                    0, 0,
2230                                    widget->allocation.width,
2231                                    priv->drag_mouse_dy - EXTRA_BORDER);
2232            }
2233            else if (-priv->drag_mouse_dy > EXTRA_BORDER)
2234            {
2235                gdk_draw_rectangle (drawable,
2236                                    widget->style->white_gc,
2237                                    TRUE,
2238                                    0, priv->drag_mouse_dy + widget->allocation.height + EXTRA_BORDER,
2239                                    widget->allocation.width,
2240                                    -priv->drag_mouse_dy - EXTRA_BORDER);
2241            }
2242      }      }
2243    
2244  #ifdef ENABLE_OSD  #ifdef ENABLE_OSD

Legend:
Removed from v.82  
changed lines
  Added in v.83