* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "main.h"
#include "pixbuf-renderer.h"
+#include <cmath>
+#include <cstdlib>
+#include <cstring>
+
+#include <config.h>
+
+#include "debug.h"
+#include "main-defines.h"
+#include "options.h"
#include "renderer-tiles.h"
/* comment this out if not using this from within Geeqie
#define GQ_BUILD 1
#ifdef GQ_BUILD
-#include "main.h"
-#include "pixbuf-util.h"
#include "exif.h"
+#include "pixbuf-util.h"
#else
-typedef enum {
+enum ExifOrientationType {
EXIF_ORIENTATION_UNKNOWN = 0,
EXIF_ORIENTATION_TOP_LEFT = 1,
EXIF_ORIENTATION_TOP_RIGHT = 2,
EXIF_ORIENTATION_RIGHT_TOP = 6,
EXIF_ORIENTATION_RIGHT_BOTTOM = 7,
EXIF_ORIENTATION_LEFT_BOTTOM = 8
-} ExifOrientationType;
+};
#endif
/* default min and max zoom */
-#define PR_ZOOM_MIN -32.0
+#define PR_ZOOM_MIN (-32.0)
#define PR_ZOOM_MAX 32.0
/* distance to drag mouse to disable image flip */
-#define PR_DRAG_SCROLL_THRESHHOLD 4
+enum {
+ PR_DRAG_SCROLL_THRESHHOLD = 4
+};
/* increase pan rate when holding down shift */
-#define PR_PAN_SHIFT_MULTIPLIER 6
+enum {
+ PR_PAN_SHIFT_MULTIPLIER = 6
+};
/* scroller config */
-#define PR_SCROLLER_UPDATES_PER_SEC 30
-#define PR_SCROLLER_DEAD_ZONE 6
+enum {
+ PR_SCROLLER_UPDATES_PER_SEC = 30,
+ PR_SCROLLER_DEAD_ZONE = 6
+};
/* when scaling image to below this size, use nearest pixel for scaling
* (below about 4, the other scale types become slow generating their conversion tables)
*/
-#define PR_MIN_SCALE_SIZE 8
+//~ enum {
+//~ PR_MIN_SCALE_SIZE = 8
+//~ };
enum {
SIGNAL_ZOOM = 0,
PROP_ENLARGEMENT_LIMIT_VALUE
};
-typedef enum {
+enum PrZoomFlags {
PR_ZOOM_NONE = 0,
PR_ZOOM_FORCE = 1 << 0,
PR_ZOOM_NEW = 1 << 1,
PR_ZOOM_CENTER = 1 << 2,
PR_ZOOM_INVALIDATE = 1 << 3,
PR_ZOOM_LAZY = 1 << 4 /* wait with redraw for pixbuf_renderer_area_changed */
-} PrZoomFlags;
+};
static guint signals[SIGNAL_COUNT] = { 0 };
static GtkEventBoxClass *parent_class = nullptr;
*-------------------------------------------------------------------
*/
-static void pixbuf_renderer_class_init_wrapper(void *g_class, void *UNUSED(class_data))
+static void pixbuf_renderer_class_init_wrapper(void *g_class, void *)
{
pixbuf_renderer_class_init(static_cast<PixbufRendererClass *>(g_class));
}
-static void pixbuf_renderer_init_wrapper(PixbufRenderer *pr, void *UNUSED(class_data))
+static void pixbuf_renderer_init_wrapper(PixbufRenderer *pr, void *)
{
pixbuf_renderer_init(pr);
}
-GType pixbuf_renderer_get_type(void)
+GType pixbuf_renderer_get_type()
{
static GType pixbuf_renderer_type = 0;
};
pixbuf_renderer_type = g_type_register_static(GTK_TYPE_EVENT_BOX, "PixbufRenderer",
- &pixbuf_renderer_info, GTypeFlags(0));
+ &pixbuf_renderer_info, static_cast<GTypeFlags>(0));
}
return pixbuf_renderer_type;
static RendererFuncs *pr_backend_renderer_new(PixbufRenderer *pr)
{
- //~ if (options->image.use_clutter_renderer && !options->disable_gpu)
- //~ {
-//~ #ifdef HAVE_CLUTTER
- //~ return renderer_clutter_new(pr);
-//~ #else
- //~ log_printf("Warning: Geeqie is built without clutter renderer support");
-//~ #endif
- //~ }
return renderer_tiles_new(pr);
}
pr_source_tile_free_all(pr);
}
-PixbufRenderer *pixbuf_renderer_new(void)
+PixbufRenderer *pixbuf_renderer_new()
{
return static_cast<PixbufRenderer *>(g_object_new(TYPE_PIXBUF_RENDERER, nullptr));
}
pr->complete = g_value_get_boolean(value);
break;
case PROP_CACHE_SIZE_DISPLAY:
-// pr->tile_cache_max = g_value_get_uint(value);
break;
case PROP_CACHE_SIZE_TILES:
pr->source_tiles_cache_size = g_value_get_uint(value);
g_value_set_boolean(value, pr->complete);
break;
case PROP_CACHE_SIZE_DISPLAY:
-// g_value_set_uint(value, pr->tile_cache_max);
break;
case PROP_CACHE_SIZE_TILES:
g_value_set_uint(value, pr->source_tiles_cache_size);
static void widget_set_cursor(GtkWidget *widget, gint icon)
{
GdkCursor *cursor;
+ GdkDisplay *display;
if (!gtk_widget_get_window(widget)) return;
+ display = gdk_display_get_default();
+
if (icon == -1)
{
cursor = nullptr;
}
else
{
- cursor = gdk_cursor_new(static_cast<GdkCursorType>(icon));
+ cursor = gdk_cursor_new_for_display(display, static_cast<GdkCursorType>(icon));
}
gdk_window_set_cursor(gtk_widget_get_window(widget), cursor);
{
GtkWidget *widget;
GtkWidget *parent;
- gint ww, wh;
+ gint ww;
+ gint wh;
GtkAllocation widget_allocation;
GtkAllocation parent_allocation;
pr->parent_window = GTK_WIDGET(window);
}
-//GtkWindow *pixbuf_renderer_get_parent(PixbufRenderer *pr)
-//{
- //g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), NULL);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+GtkWindow *pixbuf_renderer_get_parent_unused(PixbufRenderer *pr)
+{
+ g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), NULL);
- //return GTK_WINDOW(pr->parent_window);
-//}
+ return GTK_WINDOW(pr->parent_window);
+}
+#pragma GCC diagnostic pop
/*
static gboolean pr_scroller_update_cb(gpointer data)
{
auto pr = static_cast<PixbufRenderer *>(data);
- gint x, y;
- gint xinc, yinc;
+ gint x;
+ gint y;
+ gint xinc;
+ gint yinc;
/* this was a simple scroll by difference between scroller and mouse position,
* but all this math results in a smoother result and accounts for a dead zone.
if (pr->scroller_overlay == -1)
{
GdkPixbuf *pixbuf;
- gint w, h;
+ gint w;
+ gint h;
#ifdef GQ_BUILD
- gchar *resource_path;
-
- resource_path = g_build_filename(GQ_RESOURCE_PATH_ICONS, PIXBUF_INLINE_SCROLLER ".png", NULL);
-
- pixbuf = gdk_pixbuf_new_from_resource(resource_path, nullptr);
- g_free(resource_path);
+ pixbuf = gdk_pixbuf_new_from_resource(GQ_RESOURCE_PATH_ICONS "/" PIXBUF_INLINE_SCROLLER ".png", nullptr);
#else
pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, 32, 32);
gdk_pixbuf_fill(pixbuf, 0x000000ff);
*-------------------------------------------------------------------
*/
-void pixbuf_renderer_set_color(PixbufRenderer *pr, GdkColor *color)
+void pixbuf_renderer_set_color(PixbufRenderer *pr, GdkRGBA *color)
{
g_return_if_fail(IS_PIXBUF_RENDERER(pr));
static void pr_source_tile_free_all(PixbufRenderer *pr)
{
- GList *work;
-
- work = pr->source_tiles;
- while (work)
- {
- SourceTile *st;
-
- st = static_cast<SourceTile *>(work->data);
- work = work->next;
-
- pr_source_tile_free(st);
- }
-
- g_list_free(pr->source_tiles);
+ g_list_free_full(pr->source_tiles, reinterpret_cast<GDestroyNotify>(pr_source_tile_free));
pr->source_tiles = nullptr;
}
static gboolean pr_source_tile_visible(PixbufRenderer *pr, SourceTile *st)
{
- gint x1, y1, x2, y2;
+ gint x1;
+ gint y1;
+ gint x2;
+ gint y2;
if (!st) return FALSE;
-// x1 = ROUND_DOWN(pr->x_scroll, pr->tile_width);
-// y1 = ROUND_DOWN(pr->y_scroll, pr->tile_height);
-// x2 = ROUND_UP(pr->x_scroll + pr->vis_width, pr->tile_width);
-// y2 = ROUND_UP(pr->y_scroll + pr->vis_height, pr->tile_height);
x1 = pr->x_scroll;
y1 = pr->y_scroll;
x2 = pr->x_scroll + pr->vis_width;
y2 = pr->y_scroll + pr->vis_height;
- return !(static_cast<gdouble>(st->x) * pr->scale > static_cast<gdouble>(x2) ||
- static_cast<gdouble>(st->x + pr->source_tile_width) * pr->scale < static_cast<gdouble>(x1) ||
- static_cast<gdouble>(st->y) * pr->scale > static_cast<gdouble>(y2) ||
- static_cast<gdouble>(st->y + pr->source_tile_height) * pr->scale < static_cast<gdouble>(y1));
+ return static_cast<gdouble>(st->x) * pr->scale <= static_cast<gdouble>(x2) &&
+ static_cast<gdouble>(st->x + pr->source_tile_width) * pr->scale >= static_cast<gdouble>(x1) &&
+ static_cast<gdouble>(st->y) * pr->scale <= static_cast<gdouble>(y2) &&
+ static_cast<gdouble>(st->y + pr->source_tile_height) * pr->scale >= static_cast<gdouble>(y1);
}
static SourceTile *pr_source_tile_new(PixbufRenderer *pr, gint x, gint y)
GList *pr_source_tile_compute_region(PixbufRenderer *pr, gint x, gint y, gint w, gint h, gboolean request)
{
- gint x1, y1;
+ gint x1;
+ gint y1;
GList *list = nullptr;
- gint sx, sy;
+ gint sx;
+ gint sy;
if (x < 0) x = 0;
if (y < 0) y = 0;
while (work)
{
SourceTile *st;
- gint rx, ry, rw, rh;
+ gint rx;
+ gint ry;
+ gint rw;
+ gint rh;
st = static_cast<SourceTile *>(work->data);
work = work->next;
/* The other values are out of range */
break;
}
-// log_printf("tile coord y:%f, ih:%d, th:%f ry:%f\n", tile_y, image_h, tile_h, *res_x);
}
void pr_tile_region_map_orientation(gint orientation,
/* The other values are out of range */
break;
}
-// log_printf("inside y:%d, th:%d, ah:%d ry:%d\n", area_y, tile_h, area_h, *res_x);
}
void pr_coords_map_orientation_reverse(gint orientation,
static void pixbuf_renderer_sync_scroll_center(PixbufRenderer *pr)
{
- gint src_x, src_y;
+ gint src_x;
+ gint src_y;
if (!pr->width || !pr->height) return;
/*
static gboolean pr_size_clamp(PixbufRenderer *pr)
{
- gint old_vw, old_vh;
+ gint old_vw;
+ gint old_vh;
old_vw = pr->vis_width;
old_vh = pr->vis_height;
static gboolean pr_zoom_clamp(PixbufRenderer *pr, gdouble zoom,
PrZoomFlags flags)
{
- gint w, h;
+ gint w;
+ gint h;
gdouble scale;
gboolean force = !!(flags & PR_ZOOM_FORCE);
gboolean new_z = !!(flags & PR_ZOOM_NEW);
PrZoomFlags flags, gint px, gint py)
{
gdouble old_scale;
- gint old_cx, old_cy;
+ gint old_cx;
+ gint old_cy;
gboolean center_point = !!(flags & PR_ZOOM_CENTER);
gboolean force = !!(flags & PR_ZOOM_FORCE);
gboolean new_z = !!(flags & PR_ZOOM_NEW);
{
case PR_SCROLL_RESET_NOCHANGE:
/* maintain old scroll position */
- pr->x_scroll = (static_cast<gdouble>(pr->image_width) * old_center_x * pr->scale) - pr->vis_width / 2;
- pr->y_scroll = (static_cast<gdouble>(pr->image_height) * old_center_y * pr->scale * pr->aspect_ratio) - pr->vis_height / 2;
+ pr->x_scroll = (static_cast<gdouble>(pr->image_width) * old_center_x * pr->scale) - pr->vis_width / 2.0;
+ pr->y_scroll = (static_cast<gdouble>(pr->image_height) * old_center_y * pr->scale * pr->aspect_ratio) - pr->vis_height / 2.0;
break;
case PR_SCROLL_RESET_CENTER:
/* center new image */
- pr->x_scroll = (static_cast<gdouble>(pr->image_width) / 2.0 * pr->scale) - pr->vis_width / 2;
- pr->y_scroll = (static_cast<gdouble>(pr->image_height) / 2.0 * pr->scale * pr->aspect_ratio) - pr->vis_height / 2;
+ pr->x_scroll = (static_cast<gdouble>(pr->image_width) / 2.0 * pr->scale) - pr->vis_width / 2.0;
+ pr->y_scroll = (static_cast<gdouble>(pr->image_height) / 2.0 * pr->scale * pr->aspect_ratio) - pr->vis_height / 2.0;
break;
case PR_SCROLL_RESET_TOPLEFT:
default:
}
else
{
- pr->x_scroll = old_cx / old_scale * pr->scale - (pr->vis_width / 2);
- pr->y_scroll = old_cy / old_scale * pr->scale * pr->aspect_ratio - (pr->vis_height / 2);
+ pr->x_scroll = old_cx / old_scale * pr->scale - (pr->vis_width / 2.0);
+ pr->y_scroll = old_cy / old_scale * pr->scale * pr->aspect_ratio - (pr->vis_height / 2.0);
}
}
if (pixbuf_renderer_overlay_get(pr, pr->scroller_overlay, &pixbuf, nullptr, nullptr))
{
- gint w, h;
+ gint w;
+ gint h;
w = gdk_pixbuf_get_width(pixbuf);
h = gdk_pixbuf_get_height(pixbuf);
pr_update_signal(pr);
}
-static void pr_size_cb(GtkWidget *UNUSED(widget), GtkAllocation *allocation, gpointer data)
+static void pr_size_cb(GtkWidget *, GtkAllocation *allocation, gpointer data)
{
auto pr = static_cast<PixbufRenderer *>(data);
void pixbuf_renderer_scroll(PixbufRenderer *pr, gint x, gint y)
{
- gint old_x, old_y;
- gint x_off, y_off;
+ gint old_x;
+ gint old_y;
+ gint x_off;
+ gint y_off;
g_return_if_fail(IS_PIXBUF_RENDERER(pr));
void pixbuf_renderer_scroll_to_point(PixbufRenderer *pr, gint x, gint y,
gdouble x_align, gdouble y_align)
{
- gint px, py;
- gint ax, ay;
+ gint px;
+ gint py;
+ gint ax;
+ gint ay;
x_align = CLAMP(x_align, 0.0, 1.0);
y_align = CLAMP(y_align, 0.0, 1.0);
void pixbuf_renderer_set_scroll_center(PixbufRenderer *pr, gdouble x, gdouble y)
{
- gdouble dst_x, dst_y;
+ gdouble dst_x;
+ gdouble dst_y;
- dst_x = x * pr->width - pr->vis_width / 2 - pr->x_scroll + CLAMP(pr->subpixel_x_scroll, -1.0, 1.0);
- dst_y = y * pr->height - pr->vis_height / 2 - pr->y_scroll + CLAMP(pr->subpixel_y_scroll, -1.0, 1.0);
+ dst_x = x * pr->width - pr->vis_width / 2.0 - pr->x_scroll + CLAMP(pr->subpixel_x_scroll, -1.0, 1.0);
+ dst_y = y * pr->height - pr->vis_height / 2.0 - pr->y_scroll + CLAMP(pr->subpixel_y_scroll, -1.0, 1.0);
pr->subpixel_x_scroll = dst_x - static_cast<gint>(dst_x);
pr->subpixel_y_scroll = dst_y - static_cast<gint>(dst_y);
*-------------------------------------------------------------------
*/
-static gboolean pr_mouse_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer UNUSED(data))
+static gboolean pr_mouse_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpointer)
{
PixbufRenderer *pr;
gint accel;
/* This is a hack, but work far the best, at least for single pointer systems.
* See https://bugzilla.gnome.org/show_bug.cgi?id=587714 for more. */
- gint x, y;
+ gint x;
+ gint y;
seat = gdk_display_get_default_seat(gdk_window_get_display(event->window));
device = gdk_seat_get_pointer(seat);
return FALSE;
}
-static gboolean pr_leave_notify_cb(GtkWidget *widget, GdkEventCrossing *UNUSED(cevent), gpointer UNUSED(data))
+static gboolean pr_leave_notify_cb(GtkWidget *widget, GdkEventCrossing *, gpointer)
{
PixbufRenderer *pr;
return FALSE;
}
-static gboolean pr_mouse_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer UNUSED(data))
+static gboolean pr_mouse_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer)
{
PixbufRenderer *pr;
GtkWidget *parent;
return FALSE;
}
-static gboolean pr_mouse_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer UNUSED(data))
+static gboolean pr_mouse_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer)
{
PixbufRenderer *pr;
return FALSE;
}
-static gboolean pr_mouse_leave_cb(GtkWidget *widget, GdkEventCrossing *UNUSED(event), gpointer UNUSED(data))
+static gboolean pr_mouse_leave_cb(GtkWidget *widget, GdkEventCrossing *, gpointer)
{
PixbufRenderer *pr;
return FALSE;
}
-static void pr_mouse_drag_cb(GtkWidget *widget, GdkDragContext *UNUSED(context), gpointer UNUSED(data))
+static void pr_mouse_drag_cb(GtkWidget *widget, GdkDragContext *, gpointer)
{
PixbufRenderer *pr;
*-------------------------------------------------------------------
*/
-#define COLOR_BYTES 3 /* rgb */
-#define RC 0 /* Red-Cyan */
-#define GM 1 /* Green-Magenta */
-#define YB 2 /* Yellow-Blue */
+enum {
+ COLOR_BYTES = 3, /* rgb */
+ RC = 0, /* Red-Cyan */
+ GM = 1, /* Green-Magenta */
+ YB = 2 /* Yellow-Blue */
+};
static void pr_create_anaglyph_color(GdkPixbuf *pixbuf, GdkPixbuf *right, gint x, gint y, gint w, gint h, guint mode)
{
- gint srs, drs;
- guchar *s_pix, *d_pix;
- guchar *sp, *dp;
- guchar *spi, *dpi;
- gint i, j;
+ gint srs;
+ gint drs;
+ guchar *s_pix;
+ guchar *d_pix;
+ guchar *sp;
+ guchar *dp;
+ guchar *spi;
+ guchar *dpi;
+ gint i;
+ gint j;
srs = gdk_pixbuf_get_rowstride(right);
s_pix = gdk_pixbuf_get_pixels(right);
static void pr_create_anaglyph_gray(GdkPixbuf *pixbuf, GdkPixbuf *right, gint x, gint y, gint w, gint h, guint mode)
{
- gint srs, drs;
- guchar *s_pix, *d_pix;
- guchar *sp, *dp;
- guchar *spi, *dpi;
- gint i, j;
+ gint srs;
+ gint drs;
+ guchar *s_pix;
+ guchar *d_pix;
+ guchar *sp;
+ guchar *dp;
+ guchar *spi;
+ guchar *dpi;
+ gint i;
+ gint j;
const double gc[3] = {0.299, 0.587, 0.114};
srs = gdk_pixbuf_get_rowstride(right);
static void pr_create_anaglyph_dubois(GdkPixbuf *pixbuf, GdkPixbuf *right, gint x, gint y, gint w, gint h, guint mode)
{
- gint srs, drs;
- guchar *s_pix, *d_pix;
- guchar *sp, *dp;
- guchar *spi, *dpi;
- gint i, j, k;
+ gint srs;
+ gint drs;
+ guchar *s_pix;
+ guchar *d_pix;
+ guchar *sp;
+ guchar *dp;
+ guchar *spi;
+ guchar *dpi;
+ gint i;
+ gint j;
+ gint k;
double pr_dubois_matrix[3][6];
static const double pr_dubois_matrix_RC[3][6] = {
{ 0.456, 0.500, 0.176, -0.043, -0.088, -0.002},
pr_zoom_sync(pr, pr->zoom, PR_ZOOM_FORCE, 0, 0);
}
-//gint pixbuf_renderer_get_orientation(PixbufRenderer *pr)
-//{
- //if (!pr) return 1;
- //return pr->orientation;
-//}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gint pixbuf_renderer_get_orientation_unused(PixbufRenderer *pr)
+{
+ if (!pr) return 1;
+ return pr->orientation;
+}
+#pragma GCC diagnostic pop
void pixbuf_renderer_set_stereo_data(PixbufRenderer *pr, StereoPixbufData stereo_data)
{
gint *r_mouse, gint *g_mouse, gint *b_mouse)
{
GdkPixbuf *pb = pr->pixbuf;
- gint p_alpha, prs;
- guchar *p_pix, *pp;
- gint map_x, map_y, map_w, map_h;
- size_t xoff, yoff;
+ gint p_alpha;
+ gint prs;
+ guchar *p_pix;
+ guchar *pp;
+ gint map_x;
+ gint map_y;
+ gint map_w;
+ gint map_h;
+ size_t xoff;
+ size_t yoff;
g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
g_return_val_if_fail(r_mouse != nullptr && g_mouse != nullptr && b_mouse != nullptr, FALSE);
gboolean pixbuf_renderer_get_mouse_position(PixbufRenderer *pr, gint *x_pixel_return, gint *y_pixel_return)
{
- gint x_pixel, y_pixel, x_pixel_clamped, y_pixel_clamped;
+ gint x_pixel;
+ gint y_pixel;
+ gint x_pixel_clamped;
+ gint y_pixel_clamped;
g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
g_return_val_if_fail(x_pixel_return != nullptr && y_pixel_return != nullptr, FALSE);
return TRUE;
}
-//gboolean pixbuf_renderer_get_virtual_rect(PixbufRenderer *pr, GdkRectangle *rect)
-//{
- //g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
- //g_return_val_if_fail(rect != NULL, FALSE);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+gboolean pixbuf_renderer_get_virtual_rect_unused(PixbufRenderer *pr, GdkRectangle *rect)
+{
+ g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
+ g_return_val_if_fail(rect != nullptr, FALSE);
- //if ((!pr->pixbuf && !pr->source_tiles_enabled))
- //{
- //rect->x = 0;
- //rect->y = 0;
- //rect->width = 0;
- //rect->height = 0;
- //return FALSE;
- //}
+ if ((!pr->pixbuf && !pr->source_tiles_enabled))
+ {
+ rect->x = 0;
+ rect->y = 0;
+ rect->width = 0;
+ rect->height = 0;
+ return FALSE;
+ }
- //rect->x = pr->x_scroll;
- //rect->y = pr->y_scroll;
- //rect->width = pr->vis_width;
- //rect->height = pr->vis_height;
- //return TRUE;
-//}
+ rect->x = pr->x_scroll;
+ rect->y = pr->y_scroll;
+ rect->width = pr->vis_width;
+ rect->height = pr->vis_height;
+ return TRUE;
+}
+#pragma GCC diagnostic pop
-void pixbuf_renderer_set_size_early(PixbufRenderer *UNUSED(pr), guint UNUSED(width), guint UNUSED(height))
+void pixbuf_renderer_set_size_early(PixbufRenderer *, guint, guint)
{
#if 0
/** @FIXME this function does not consider the image orientation,
pr->image_height = height;
pr_zoom_clamp(pr, zoom, PR_ZOOM_FORCE, NULL);
-
- //w = width;
- //h = height;
-
- //pr->width = width;
- //pr->height = height;
#endif
}