draw_rect.height);
cairo_fill (cr);
-/*
- gdk_draw_pixbuf(window,
- widget->style->black_gc,
- pixbuf,
- draw_rect.x - pix_rect.x,
- draw_rect.y - pix_rect.y,
- draw_rect.x,
- draw_rect.y,
- draw_rect.width,
- draw_rect.height,
- GDK_RGB_DITHER_NORMAL,
- 0, 0);
-*/
}
}
g_object_set(G_OBJECT(imd->pr), "zoom_quality", options->image.zoom_quality,
"zoom_2pass", options->image.zoom_2pass,
"zoom_expand", options->image.zoom_to_fit_allow_expand,
-#if !GTK_CHECK_VERSION(3,0,0)
- "dither_quality", options->image.dither_quality,
-#endif
"scroll_reset", options->image.scroll_reset_method,
"cache_display", options->image.tile_cache_max,
"window_fit", (imd->top_window_sync && options->image.fit_window_to_image),
options->fullscreen.screen = -1;
memset(&options->image.border_color, 0, sizeof(options->image.border_color));
-// options->image.dither_quality = GDK_RGB_DITHER_NORMAL;
options->image.enable_read_ahead = TRUE;
options->image.exif_rotate_enable = TRUE;
options->image.fit_window_to_image = FALSE;
gint tile_cache_max; /* in megabytes */
gint image_cache_max; /* in megabytes */
- guint dither_quality;
gboolean enable_read_ahead;
ZoomMode zoom_mode;
PROP_ZOOM_QUALITY,
PROP_ZOOM_2PASS,
PROP_ZOOM_EXPAND,
- PROP_DITHER_QUALITY,
PROP_SCROLL_RESET,
PROP_DELAY_FLIP,
PROP_LOADING,
NULL,
FALSE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
-#if !GTK_CHECK_VERSION(3,0,0)
- g_object_class_install_property(gobject_class,
- PROP_DITHER_QUALITY,
- g_param_spec_uint("dither_quality",
- "Dither quality",
- NULL,
- GDK_RGB_DITHER_NONE,
- GDK_RGB_DITHER_MAX,
- GDK_RGB_DITHER_NORMAL,
- G_PARAM_READABLE | G_PARAM_WRITABLE));
-#endif
g_object_class_install_property(gobject_class,
PROP_SCROLL_RESET,
g_param_spec_uint("scroll_reset",
pr->scale = 1.0;
pr->aspect_ratio = 1.0;
-#if !GTK_CHECK_VERSION(3,0,0)
- pr->dither_quality = GDK_RGB_DITHER_NORMAL;
-#endif
-
pr->scroll_reset = PR_SCROLL_RESET_TOPLEFT;
pr->scroller_id = 0;
case PROP_ZOOM_EXPAND:
pr->zoom_expand = g_value_get_boolean(value);
break;
-#if !GTK_CHECK_VERSION(3,0,0)
- case PROP_DITHER_QUALITY:
- pr->dither_quality = g_value_get_uint(value);
- break;
-#endif
case PROP_SCROLL_RESET:
pr->scroll_reset = g_value_get_uint(value);
break;
case PROP_ZOOM_EXPAND:
g_value_set_boolean(value, pr->zoom_expand);
break;
-#if !GTK_CHECK_VERSION(3,0,0)
- case PROP_DITHER_QUALITY:
- g_value_set_uint(value, pr->dither_quality);
- break;
-#endif
case PROP_SCROLL_RESET:
g_value_set_uint(value, pr->scroll_reset);
break;
gboolean zoom_2pass;
gboolean zoom_expand;
-#if !GTK_CHECK_VERSION(3,0,0)
- GdkRgbDither dither_quality;
-#endif
-
PixbufRendererScrollResetType scroll_reset;
gboolean has_frame;
gtk_widget_show(combo);
}
-#if 0
-static void add_dither_menu(gint option, gint *option_c, gchar *text, GtkWidget *box)
-{
- GtkWidget *hbox;
- GtkWidget *omenu;
- GtkWidget *menu;
-
- *option_c = option;
-
- hbox = pref_box_new(box, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
- pref_label_new(hbox, text);
-
- omenu = gtk_option_menu_new();
- menu = gtk_menu_new();
-
- add_menu_item(menu, _("None"), option_c, (gint)GDK_RGB_DITHER_NONE);
- add_menu_item(menu, _("Normal"), option_c, (gint)GDK_RGB_DITHER_NORMAL);
- add_menu_item(menu, _("Best"), option_c, (gint)GDK_RGB_DITHER_MAX);
-
- gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu);
- gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), *option_c);
-
- gtk_box_pack_start(GTK_BOX(hbox), omenu, FALSE, FALSE, 0);
- gtk_widget_show(omenu);
-}
-#endif
-
static void thumb_size_menu_cb(GtkWidget *combo, gpointer data)
{
gint n;
group = pref_group_new(vbox, FALSE, _("Zoom"), GTK_ORIENTATION_VERTICAL);
-#if 0
- add_dither_menu(dither_quality, &c_options->image.dither_quality, _("Dithering method:"), group);
-#endif
table = pref_table_new(group, 2, 1, FALSE, FALSE);
add_quality_menu(table, 0, 0, _("Quality:"), options->image.zoom_quality, &c_options->image.zoom_quality);
WRITE_NL(); WRITE_UINT(*options, image.scroll_reset_method);
WRITE_NL(); WRITE_INT(*options, image.tile_cache_max);
WRITE_NL(); WRITE_INT(*options, image.image_cache_max);
- WRITE_NL(); WRITE_UINT(*options, image.dither_quality);
WRITE_NL(); WRITE_BOOL(*options, image.enable_read_ahead);
WRITE_NL(); WRITE_BOOL(*options, image.exif_rotate_enable);
WRITE_NL(); WRITE_BOOL(*options, image.use_custom_border_color);
if (READ_INT(*options, image.tile_cache_max)) continue;
if (READ_INT(*options, image.image_cache_max)) continue;
if (READ_UINT_CLAMP(*options, image.zoom_quality, GDK_INTERP_NEAREST, GDK_INTERP_HYPER)) continue;
-#if !GTK_CHECK_VERSION(3,0,0)
- if (READ_UINT_CLAMP(*options, image.dither_quality, GDK_RGB_DITHER_NONE, GDK_RGB_DITHER_MAX)) continue;
-#endif
if (READ_INT(*options, image.zoom_increment)) continue;
if (READ_BOOL(*options, image.enable_read_ahead)) continue;
if (READ_BOOL(*options, image.exif_rotate_enable)) continue;
cairo_rectangle (cr, rx - px, ry - py, rw, rh);
cairo_fill (cr);
cairo_destroy (cr);
-
-#if 0
-
-
-#if GTK_CHECK_VERSION(2,20,0)
- gdk_draw_drawable(rt->overlay_buffer, box->style->fg_gc[gtk_widget_get_state(box)],
-#else
- gdk_draw_drawable(rt->overlay_buffer, box->style->fg_gc[GTK_WIDGET_STATE(box)],
-#endif
- it->pixmap,
- rx - (pr->x_offset + (it->x - rt->x_scroll)),
- ry - (pr->y_offset + (it->y - rt->y_scroll)),
- 0, 0, rw, rh);
- gdk_draw_pixbuf(rt->overlay_buffer,
-#if GTK_CHECK_VERSION(2,20,0)
- box->style->fg_gc[gtk_widget_get_state(box)],
-#else
- box->style->fg_gc[GTK_WIDGET_STATE(box)],
-#endif
- od->pixbuf,
- rx - px, ry - py,
- 0, 0, rw, rh,
- pr->dither_quality, rx, ry);
-#if GTK_CHECK_VERSION(2,20,0)
- gdk_draw_drawable(od->window, box->style->fg_gc[gtk_widget_get_state(box)],
-#else
- gdk_draw_drawable(od->window, box->style->fg_gc[GTK_WIDGET_STATE(box)],
-#endif
- rt->overlay_buffer,
- 0, 0,
- rx - px, ry - py, rw, rh);
-#endif
}
else
{
cairo_rectangle (cr, sx - px, sy - py, sw, sh);
cairo_fill(cr);
cairo_destroy(cr);
-
-#if 0
- gdk_draw_rectangle(rt->overlay_buffer,
-#if GTK_CHECK_VERSION(2,20,0)
- box->style->bg_gc[gtk_widget_get_state(box)], TRUE,
-#else
- box->style->bg_gc[GTK_WIDGET_STATE(box)], TRUE,
-#endif
- 0, 0, sw, sh);
- gdk_draw_pixbuf(rt->overlay_buffer,
-#if GTK_CHECK_VERSION(2,20,0)
- box->style->fg_gc[gtk_widget_get_state(box)],
-#else
- box->style->fg_gc[GTK_WIDGET_STATE(box)],
-#endif
- od->pixbuf,
- sx - px, sy - py,
- 0, 0, sw, sh,
- pr->dither_quality, sx, sy);
-#if GTK_CHECK_VERSION(2,20,0)
- gdk_draw_drawable(od->window, box->style->fg_gc[gtk_widget_get_state(box)],
-#else
- gdk_draw_drawable(od->window, box->style->fg_gc[GTK_WIDGET_STATE(box)],
-#endif
- rt->overlay_buffer,
- 0, 0,
- sx - px, sy - py, sw, sh);
-#endif
}
}
}
if (st->blank)
{
cairo_set_source_rgb(cr, 0, 0, 0);
-#if 0
- gdk_draw_rectangle(it->pixmap, box->style->black_gc, TRUE,
- rx - st->x, ry - st->y, rw, rh);
-#endif
}
else /* (pr->zoom == 1.0 || pr->scale == 1.0) */
{
gdk_cairo_set_source_pixbuf(cr, st->pixbuf, -it->x + st->x, -it->y + st->y);
-#if 0
- gdk_draw_pixbuf(it->pixmap,
-#if GTK_CHECK_VERSION(2,20,0)
- box->style->fg_gc[gtk_widget_get_state(box)],
-#else
- box->style->fg_gc[GTK_WIDGET_STATE(box)],
-#endif
- st->pixbuf,
- rx - st->x, ry - st->y,
- rx - it->x, ry - it->y,
- rw, rh,
- pr->dither_quality, rx, ry);
-#endif
}
cairo_fill (cr);
cairo_destroy (cr);
cairo_set_source_rgb(cr, 0, 0, 0);
cairo_fill (cr);
cairo_destroy (cr);
-#if 0
- gdk_draw_rectangle(it->pixmap, box->style->black_gc, TRUE,
- rx - st->x, ry - st->y, rw, rh);
-#endif
}
else
{
gdk_cairo_set_source_pixbuf(cr, pr->pixbuf, -it->x - GET_RIGHT_PIXBUF_OFFSET(rt), -it->y);
cairo_fill (cr);
cairo_destroy (cr);
-
-#if 0
- gdk_draw_pixbuf(it->pixmap,
-#if GTK_CHECK_VERSION(2,20,0)
- box->style->fg_gc[gtk_widget_get_state(box)],
-#else
- box->style->fg_gc[GTK_WIDGET_STATE(box)],
-#endif
- pr->pixbuf,
- it->x + x + GET_RIGHT_PIXBUF_OFFSET(rt), it->y + y,
- x, y,
- w, h,
- pr->dither_quality, it->x + x, it->y + y);
-#endif
}
else
{
gdk_cairo_set_source_pixbuf(cr, it->pixbuf, 0, 0);
cairo_fill (cr);
cairo_destroy (cr);
-#if 0
- gdk_draw_pixbuf(it->pixmap,
-#if GTK_CHECK_VERSION(2,20,0)
- box->style->fg_gc[gtk_widget_get_state(box)],
-#else
- box->style->fg_gc[GTK_WIDGET_STATE(box)],
-#endif
- it->pixbuf,
- x, y,
- x, y,
- w, h,
- pr->dither_quality, it->x + x, it->y + y);
-#endif
}
-
-#if 0
- /* enable this line for debugging the edges of tiles */
- gdk_draw_rectangle(it->pixmap, box->style->white_gc,
- FALSE, 0, 0, it->w, it->h);
- gdk_draw_rectangle(it->pixmap, box->style->white_gc,
- FALSE, x, y, w, h);
-#endif
}