*-------------------------------------------------------------------
*/
+static void pixbuf_renderer_class_init_wrapper(void *g_class, void *class_data)
+{
+ pixbuf_renderer_class_init(g_class);
+}
+
+static void pixbuf_renderer_init_wrapper(PixbufRenderer *pr, void *class_data)
+{
+ pixbuf_renderer_init(pr);
+}
+
GType pixbuf_renderer_get_type(void)
{
static GType pixbuf_renderer_type = 0;
sizeof(PixbufRendererClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
- (GClassInitFunc)pixbuf_renderer_class_init,
+ (GClassInitFunc)pixbuf_renderer_class_init_wrapper,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(PixbufRenderer), /* instance_size */
0, /* n_preallocs */
- (GInstanceInitFunc)pixbuf_renderer_init, /* instance_init */
+ (GInstanceInitFunc)pixbuf_renderer_init_wrapper, /* instance_init */
NULL, /* value_table */
};
"Zoom quality",
NULL,
GDK_INTERP_NEAREST,
- GDK_INTERP_HYPER,
+ GDK_INTERP_BILINEAR,
GDK_INTERP_BILINEAR,
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property(gobject_class,
PROP_CACHE_SIZE_DISPLAY,
g_param_spec_uint("cache_display",
- "Display cache size MB",
+ "Display cache size MiB",
NULL,
0,
128,
}
}
- if (increment < 0.0)
+ if (options->image.zoom_style == ZOOM_GEOMETRIC)
{
- if (zoom >= 1.0)
+ if (increment < 0.0)
{
- if (zoom / -(increment - 1.0) < 1.0)
+ if (zoom >= 1.0)
{
- zoom = 1.0 / (zoom / (increment - 1.0));
+ if (zoom / -(increment - 1.0) < 1.0)
+ {
+ zoom = 1.0 / (zoom / (increment - 1.0));
+ }
+ else
+ {
+ zoom = zoom / -(increment - 1.0) ;
+ }
}
else
{
- zoom = zoom / -(increment - 1.0) ;
+ zoom = zoom * -(increment - 1.0);
}
}
else
{
- zoom = zoom * -(increment - 1.0);
+ if (zoom <= -1.0 )
+ {
+ if (zoom / (increment + 1.0) > -1.0)
+ {
+ zoom = -(1.0 / (zoom / (increment + 1.0)));
+ }
+ else
+ {
+ zoom = zoom / (increment + 1.0) ;
+ }
+ }
+ else
+ {
+ zoom = zoom * (increment + 1.0);
+ }
}
}
else
{
- if (zoom <= -1.0 )
+ if (increment < 0.0)
{
- if (zoom / (increment + 1.0) > -1.0)
+ if (zoom >= 1.0 && zoom + increment < 1.0)
{
- zoom = -(1.0 / (zoom / (increment + 1.0)));
+ zoom = zoom + increment - 2.0;
}
else
{
- zoom = zoom / (increment + 1.0) ;
+ zoom = zoom + increment;
}
}
else
{
- zoom = zoom * (increment + 1.0);
+ if (zoom <= -1.0 && zoom + increment > -1.0)
+ {
+ zoom = zoom + increment + 2.0;
+ }
+ else
+ {
+ zoom = zoom + increment;
+ }
}
}
}
if (force) clamp_flags |= PR_ZOOM_INVALIDATE;
- (void) pr_parent_window_resize(pr, pr->width, pr->height);
if (!pr_zoom_clamp(pr, zoom, clamp_flags)) return;
(void) pr_size_clamp(pr);
+ (void) pr_parent_window_resize(pr, pr->width, pr->height);
if (force && new)
{
void pixbuf_renderer_set_size_early(PixbufRenderer *pr, guint width, guint height)
{
#if 0
- /* FIXME: this function does not consider the image orientation,
+ /** @FIXME this function does not consider the image orientation,
so it probably only breaks something */
gdouble zoom;
gint w, h;