/*
- * Geeqie
- * (C) 2006 John Ellis
- * Copyright (C) 2008 - 2012 The Geeqie Team
+ * Copyright (C) 2006 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
*
* Author: John Ellis
*
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef PIXBUF_RENDERER_H
#define IS_PIXBUF_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TYPE_PIXBUF_RENDERER))
#define PIXBUF_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_PIXBUF_RENDERER, PixbufRendererClass))
-/* alpha channel checkerboard background (same as gimp) */
-#define PR_ALPHA_CHECK1 0x00999999
-#define PR_ALPHA_CHECK2 0x00666666
+/* alpha channel checkerboard (same as gimp) */
#define PR_ALPHA_CHECK_SIZE 16
/* 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)
gint x_offset; /* offset of image start (non-zero when viewport < window) */
gint y_offset;
-
+
gint x_mouse; /* coordinates of the mouse taken from GtkEvent */
gint y_mouse;
gdouble norm_center_x; /* coordinates of viewport center in the image, in range 0.0 - 1.0 */
gdouble norm_center_y; /* these coordinates are used for PR_SCROLL_RESET_NOCHANGE and should be preserved over periods with NULL pixbuf */
-
+
gdouble subpixel_x_scroll; /* subpixel scroll alignment, used to prevent acumulation of rounding errors */
gdouble subpixel_y_scroll;
gboolean autofit_limit;
gint autofit_limit_size;
+ gint enlargement_limit_size;
-
+ GdkColor color;
/*< private >*/
gboolean in_drag;
gint orientation;
gint stereo_mode;
-
+
StereoPixbufData stereo_data;
gboolean stereo_temp_disable;
gint stereo_fixed_width;
gint stereo_fixed_y_left;
gint stereo_fixed_x_right;
gint stereo_fixed_y_right;
-
+
RendererFuncs *renderer;
RendererFuncs *renderer2;
};
void (*update_pixel)(PixbufRenderer *pr);
void (*render_complete)(PixbufRenderer *pr);
- void (*drag)(PixbufRenderer *pr, GdkEventButton *event);
+ void (*drag)(PixbufRenderer *pr, GdkEventMotion *event);
};
/* move image data from source to pr, source is then set to NULL image */
void pixbuf_renderer_move(PixbufRenderer *pr, PixbufRenderer *source);
+void pixbuf_renderer_copy(PixbufRenderer *pr, PixbufRenderer *source);
/* update region of existing image */