From: Martin S. <mar...@us...> - 2008-04-19 20:06:14
|
Update of /cvsroot/navit/navit/src/graphics/gtk_drawing_area In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8619/graphics/gtk_drawing_area Modified Files: graphics_gtk_drawing_area.c Log Message: Add:osd_core:New osd street_name to display... Guess what? Index: graphics_gtk_drawing_area.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** graphics_gtk_drawing_area.c 4 Apr 2008 10:48:31 -0000 1.42 --- graphics_gtk_drawing_area.c 19 Apr 2008 20:06:17 -0000 1.43 *************** *** 558,562 **** GtkWidget *widget=parent->widget; guchar *pixels1, *pixels2, *p1, *p2; ! int x,y; int rowstride1,rowstride2; int n_channels1,n_channels2; --- 558,562 ---- GtkWidget *widget=parent->widget; guchar *pixels1, *pixels2, *p1, *p2; ! int x,y,w,h; int rowstride1,rowstride2; int n_channels1,n_channels2; *************** *** 565,569 **** return; ! pixbuf=gdk_pixbuf_get_from_drawable(NULL, overlay->drawable, NULL, 0, 0, 0, 0, overlay->width, overlay->height); pixbuf2=gdk_pixbuf_new(gdk_pixbuf_get_colorspace(pixbuf), TRUE, gdk_pixbuf_get_bits_per_sample(pixbuf), gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf)); --- 565,575 ---- return; ! w=overlay->width; ! if (w < 0) ! w+=parent->width; ! h=overlay->height; ! if (h < 0) ! h+=parent->height; ! pixbuf=gdk_pixbuf_get_from_drawable(NULL, overlay->drawable, NULL, 0, 0, 0, 0, w, h); pixbuf2=gdk_pixbuf_new(gdk_pixbuf_get_colorspace(pixbuf), TRUE, gdk_pixbuf_get_bits_per_sample(pixbuf), gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf)); *************** *** 575,580 **** n_channels1 = gdk_pixbuf_get_n_channels (pixbuf); n_channels2 = gdk_pixbuf_get_n_channels (pixbuf2); ! for (y = 0 ; y < overlay->height ; y++) { ! for (x = 0 ; x < overlay->width ; x++) { p1 = pixels1 + y * rowstride1 + x * n_channels1; p2 = pixels2 + y * rowstride2 + x * n_channels2; --- 581,586 ---- n_channels1 = gdk_pixbuf_get_n_channels (pixbuf); n_channels2 = gdk_pixbuf_get_n_channels (pixbuf2); ! for (y = 0 ; y < h ; y++) { ! for (x = 0 ; x < w ; x++) { p1 = pixels1 + y * rowstride1 + x * n_channels1; p2 = pixels2 + y * rowstride2 + x * n_channels2; *************** *** 593,605 **** if (window) { if (overlay->background_ready) ! gdk_draw_drawable(parent->drawable, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], overlay->background, 0, 0, x, y, overlay->width, overlay->height); } else { ! gdk_draw_drawable(overlay->background, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], parent->drawable, x, y, 0, 0, overlay->width, overlay->height); overlay->background_ready=1; } ! gdk_draw_pixbuf(parent->drawable, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], pixbuf2, 0, 0, x, y, overlay->width, overlay->height, GDK_RGB_DITHER_NONE, 0, 0); if (window) ! gdk_draw_drawable(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], parent->drawable, x, y, x, y, overlay->width, overlay->height); g_object_unref(pixbuf); g_object_unref(pixbuf2); --- 599,611 ---- if (window) { if (overlay->background_ready) ! gdk_draw_drawable(parent->drawable, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], overlay->background, 0, 0, x, y, w, h); } else { ! gdk_draw_drawable(overlay->background, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], parent->drawable, x, y, 0, 0, w, h); overlay->background_ready=1; } ! gdk_draw_pixbuf(parent->drawable, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], pixbuf2, 0, 0, x, y, w, h, GDK_RGB_DITHER_NONE, 0, 0); if (window) ! gdk_draw_drawable(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], parent->drawable, x, y, x, y, w, h); g_object_unref(pixbuf); g_object_unref(pixbuf2); |