diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:43:08 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:43:08 +0200 |
commit | 2b3f22361da0c1d8e6ce70d71352821758186db7 (patch) | |
tree | 5d10633b47369b3aa52a05bf889ede0dbe5ee108 /src/util/image.c | |
parent | 211da5fc3048ca2b6ccee2166b0aaaade55cb84f (diff) | |
parent | dc6c76eb04dfe3d4262a1806808f0bc0bf523238 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/util/image.c')
-rw-r--r-- | src/util/image.c | 859 |
1 files changed, 609 insertions, 250 deletions
diff --git a/src/util/image.c b/src/util/image.c index d103a3f..324464c 100644 --- a/src/util/image.c +++ b/src/util/image.c @@ -27,6 +27,27 @@ typedef struct _Dimensions Dimensions; #define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) #define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL))) +#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ()) +#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade)) +#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) +#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE)) +#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE)) +#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) + +typedef struct _ConfigurationFacade ConfigurationFacade; +typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass; + +#define CONFIG_TYPE_FACADE (config_facade_get_type ()) +#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade)) +#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass)) +#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE)) +#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE)) +#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass)) + +typedef struct _ConfigFacade ConfigFacade; +typedef struct _ConfigFacadeClass ConfigFacadeClass; +#define _g_free0(var) (var = (g_free (var), NULL)) + #define TYPE_BOX (box_get_type ()) typedef struct _Box Box; #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); @@ -47,6 +68,8 @@ struct _Box { }; +extern cairo_surface_t* background_surface; +cairo_surface_t* background_surface = NULL; gboolean is_color_parsable (const gchar* spec); void parse_color (const gchar* spec, GdkRGBA* result); @@ -82,6 +105,14 @@ gdouble degrees_to_radians (gdouble theta); GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle); void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble angle, gboolean invert, GdkPoint* result); void derotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble angle, GdkPoint* result); +cairo_surface_t* get_background_surface (void); +GType configuration_facade_get_type (void) G_GNUC_CONST; +GType config_facade_get_type (void) G_GNUC_CONST; +ConfigFacade* config_facade_get_instance (void); +gchar* configuration_facade_get_transparent_background_type (ConfigurationFacade* self); +gchar* configuration_facade_get_transparent_background_color (ConfigurationFacade* self); +void invalidate_transparent_background (void); +void paint_pixmap_with_background (cairo_t* ctx, GdkPixbuf* pixbuf, gint x, gint y); GType box_get_type (void) G_GNUC_CONST; Box* box_dup (const Box* self); void box_free (Box* self); @@ -108,7 +139,7 @@ gboolean is_color_parsable (const gchar* spec) { result = _tmp1_; #line 119 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 112 "image.c" +#line 143 "image.c" } @@ -125,7 +156,7 @@ void parse_color (const gchar* spec, GdkRGBA* result) { *result = _tmp1_; #line 123 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 129 "image.c" +#line 160 "image.c" } @@ -143,19 +174,19 @@ void fetch_color (const gchar* spec, GdkRGBA* result) { _tmp1_ = gdk_rgba_parse (&rgba, _tmp0_); #line 128 "/home/jens/Source/shotwell/src/util/image.vala" if (!_tmp1_) { -#line 147 "image.c" +#line 178 "image.c" const gchar* _tmp2_; #line 129 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = spec; #line 129 "/home/jens/Source/shotwell/src/util/image.vala" g_error ("image.vala:129: Can't parse color %s", _tmp2_); -#line 153 "image.c" +#line 184 "image.c" } #line 131 "/home/jens/Source/shotwell/src/util/image.vala" *result = rgba; #line 131 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 159 "image.c" +#line 190 "image.c" } @@ -202,14 +233,14 @@ void set_source_color_from_string (cairo_t* ctx, const gchar* spec) { _tmp10_ = _tmp9_.alpha; #line 136 "/home/jens/Source/shotwell/src/util/image.vala" cairo_set_source_rgba (_tmp2_, _tmp4_, _tmp6_, _tmp8_, _tmp10_); -#line 206 "image.c" +#line 237 "image.c" } static gpointer _g_object_ref0 (gpointer self) { #line 147 "/home/jens/Source/shotwell/src/util/image.vala" return self ? g_object_ref (self) : NULL; -#line 213 "image.c" +#line 244 "image.c" } @@ -219,7 +250,7 @@ GdkPixbuf* get_placeholder_pixbuf (void) { GError * _inner_error_ = NULL; #line 144 "/home/jens/Source/shotwell/src/util/image.vala" pixbuf = NULL; -#line 223 "image.c" +#line 254 "image.c" { GtkIconTheme* icon_theme = NULL; GtkIconTheme* _tmp0_; @@ -241,7 +272,7 @@ GdkPixbuf* get_placeholder_pixbuf (void) { if (G_UNLIKELY (_inner_error_ != NULL)) { #line 148 "/home/jens/Source/shotwell/src/util/image.vala" _g_object_unref0 (icon_theme); -#line 245 "image.c" +#line 276 "image.c" goto __catch4_g_error; } #line 148 "/home/jens/Source/shotwell/src/util/image.vala" @@ -256,7 +287,7 @@ GdkPixbuf* get_placeholder_pixbuf (void) { _g_object_unref0 (_tmp2_); #line 146 "/home/jens/Source/shotwell/src/util/image.vala" _g_object_unref0 (icon_theme); -#line 260 "image.c" +#line 291 "image.c" } goto __finally4; __catch4_g_error: @@ -283,7 +314,7 @@ GdkPixbuf* get_placeholder_pixbuf (void) { g_warning ("image.vala:152: Could not load icon from theme: %s", _tmp7_); #line 146 "/home/jens/Source/shotwell/src/util/image.vala" _g_error_free0 (_error_); -#line 287 "image.c" +#line 318 "image.c" } __finally4: #line 146 "/home/jens/Source/shotwell/src/util/image.vala" @@ -296,13 +327,13 @@ GdkPixbuf* get_placeholder_pixbuf (void) { g_clear_error (&_inner_error_); #line 146 "/home/jens/Source/shotwell/src/util/image.vala" return NULL; -#line 300 "image.c" +#line 331 "image.c" } #line 155 "/home/jens/Source/shotwell/src/util/image.vala" result = pixbuf; #line 155 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 306 "image.c" +#line 337 "image.c" } @@ -354,7 +385,7 @@ GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gb _tmp9_ = _tmp8_.width; #line 161 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp7_ == _tmp9_) { -#line 358 "image.c" +#line 389 "image.c" Dimensions _tmp10_; gint _tmp11_; Dimensions _tmp12_; @@ -369,15 +400,15 @@ GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gb _tmp13_ = _tmp12_.height; #line 161 "/home/jens/Source/shotwell/src/util/image.vala" _tmp5_ = _tmp11_ == _tmp13_; -#line 373 "image.c" +#line 404 "image.c" } else { #line 161 "/home/jens/Source/shotwell/src/util/image.vala" _tmp5_ = FALSE; -#line 377 "image.c" +#line 408 "image.c" } #line 161 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp5_) { -#line 381 "image.c" +#line 412 "image.c" GdkPixbuf* _tmp14_; GdkPixbuf* _tmp15_; #line 162 "/home/jens/Source/shotwell/src/util/image.vala" @@ -388,7 +419,7 @@ GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gb result = _tmp15_; #line 162 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 392 "image.c" +#line 423 "image.c" } #line 165 "/home/jens/Source/shotwell/src/util/image.vala" dimensions_with_min (&scaled, MIN_SCALED_WIDTH, MIN_SCALED_HEIGHT, &_tmp16_); @@ -412,7 +443,7 @@ GdkPixbuf* scale_pixbuf (GdkPixbuf* pixbuf, gint scale, GdkInterpType interp, gb result = _tmp23_; #line 167 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 416 "image.c" +#line 447 "image.c" } @@ -454,7 +485,7 @@ GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType _tmp6_ = _tmp5_.width; #line 172 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp4_ == _tmp6_) { -#line 458 "image.c" +#line 489 "image.c" Dimensions _tmp7_; gint _tmp8_; Dimensions _tmp9_; @@ -469,15 +500,15 @@ GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType _tmp10_ = _tmp9_.height; #line 172 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = _tmp8_ == _tmp10_; -#line 473 "image.c" +#line 504 "image.c" } else { #line 172 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = FALSE; -#line 477 "image.c" +#line 508 "image.c" } #line 172 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp2_) { -#line 481 "image.c" +#line 512 "image.c" GdkPixbuf* _tmp11_; GdkPixbuf* _tmp12_; #line 173 "/home/jens/Source/shotwell/src/util/image.vala" @@ -488,7 +519,7 @@ GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType result = _tmp12_; #line 173 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 492 "image.c" +#line 523 "image.c" } #line 176 "/home/jens/Source/shotwell/src/util/image.vala" dimensions_with_min (resized, MIN_SCALED_WIDTH, MIN_SCALED_HEIGHT, &_tmp13_); @@ -512,7 +543,7 @@ GdkPixbuf* resize_pixbuf (GdkPixbuf* pixbuf, Dimensions* resized, GdkInterpType result = _tmp20_; #line 178 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 516 "image.c" +#line 547 "image.c" } @@ -542,7 +573,7 @@ void draw_rounded_corners_filled (cairo_t* ctx, Dimensions* dim, GdkPoint* origi _tmp4_ = ctx; #line 186 "/home/jens/Source/shotwell/src/util/image.vala" cairo_paint (_tmp4_); -#line 546 "image.c" +#line 577 "image.c" } @@ -648,7 +679,7 @@ void context_rounded_corners (cairo_t* cx, Dimensions* dim, GdkPoint* origin, gd _tmp21_ = cx; #line 209 "/home/jens/Source/shotwell/src/util/image.vala" cairo_clip (_tmp21_); -#line 652 "image.c" +#line 683 "image.c" } @@ -667,7 +698,7 @@ inline guchar shift_color_byte (gint b, gint shift) { result = (guchar) _tmp2_; #line 213 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 671 "image.c" +#line 702 "image.c" } @@ -706,17 +737,17 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp1_ = red; #line 217 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp1_ >= -255) { -#line 710 "image.c" +#line 741 "image.c" gint _tmp2_; #line 217 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = red; #line 217 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = _tmp2_ <= 255; -#line 716 "image.c" +#line 747 "image.c" } else { #line 217 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = FALSE; -#line 720 "image.c" +#line 751 "image.c" } #line 217 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp0_, "red >= -255 && red <= 255"); @@ -724,17 +755,17 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp4_ = green; #line 218 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp4_ >= -255) { -#line 728 "image.c" +#line 759 "image.c" gint _tmp5_; #line 218 "/home/jens/Source/shotwell/src/util/image.vala" _tmp5_ = green; #line 218 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = _tmp5_ <= 255; -#line 734 "image.c" +#line 765 "image.c" } else { #line 218 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = FALSE; -#line 738 "image.c" +#line 769 "image.c" } #line 218 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp3_, "green >= -255 && green <= 255"); @@ -742,17 +773,17 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp7_ = blue; #line 219 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp7_ >= -255) { -#line 746 "image.c" +#line 777 "image.c" gint _tmp8_; #line 219 "/home/jens/Source/shotwell/src/util/image.vala" _tmp8_ = blue; #line 219 "/home/jens/Source/shotwell/src/util/image.vala" _tmp6_ = _tmp8_ <= 255; -#line 752 "image.c" +#line 783 "image.c" } else { #line 219 "/home/jens/Source/shotwell/src/util/image.vala" _tmp6_ = FALSE; -#line 756 "image.c" +#line 787 "image.c" } #line 219 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp6_, "blue >= -255 && blue <= 255"); @@ -760,17 +791,17 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp10_ = alpha; #line 220 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp10_ >= -255) { -#line 764 "image.c" +#line 795 "image.c" gint _tmp11_; #line 220 "/home/jens/Source/shotwell/src/util/image.vala" _tmp11_ = alpha; #line 220 "/home/jens/Source/shotwell/src/util/image.vala" _tmp9_ = _tmp11_ <= 255; -#line 770 "image.c" +#line 801 "image.c" } else { #line 220 "/home/jens/Source/shotwell/src/util/image.vala" _tmp9_ = FALSE; -#line 774 "image.c" +#line 805 "image.c" } #line 220 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp9_, "alpha >= -255 && alpha <= 255"); @@ -820,19 +851,19 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp26_ = gdk_pixbuf_get_bits_per_sample (_tmp25_); #line 230 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp26_ == 8, "pixbuf.get_bits_per_sample() == 8"); -#line 824 "image.c" +#line 855 "image.c" { gint y = 0; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" y = 0; -#line 829 "image.c" +#line 860 "image.c" { gboolean _tmp27_ = FALSE; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" _tmp27_ = TRUE; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" while (TRUE) { -#line 836 "image.c" +#line 867 "image.c" gint _tmp29_; gint _tmp30_; gint y_offset = 0; @@ -840,13 +871,13 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph gint _tmp32_; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" if (!_tmp27_) { -#line 844 "image.c" +#line 875 "image.c" gint _tmp28_; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" _tmp28_ = y; #line 232 "/home/jens/Source/shotwell/src/util/image.vala" y = _tmp28_ + 1; -#line 850 "image.c" +#line 881 "image.c" } #line 232 "/home/jens/Source/shotwell/src/util/image.vala" _tmp27_ = FALSE; @@ -858,7 +889,7 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph if (!(_tmp29_ < _tmp30_)) { #line 232 "/home/jens/Source/shotwell/src/util/image.vala" break; -#line 862 "image.c" +#line 893 "image.c" } #line 233 "/home/jens/Source/shotwell/src/util/image.vala" _tmp31_ = y; @@ -866,19 +897,19 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp32_ = rowstride; #line 233 "/home/jens/Source/shotwell/src/util/image.vala" y_offset = _tmp31_ * _tmp32_; -#line 870 "image.c" +#line 901 "image.c" { gint x = 0; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" x = 0; -#line 875 "image.c" +#line 906 "image.c" { gboolean _tmp33_ = FALSE; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" _tmp33_ = TRUE; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" while (TRUE) { -#line 882 "image.c" +#line 913 "image.c" gint _tmp35_; gint _tmp36_; gint offset = 0; @@ -892,13 +923,13 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph gint _tmp68_; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" if (!_tmp33_) { -#line 896 "image.c" +#line 927 "image.c" gint _tmp34_; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" _tmp34_ = x; #line 235 "/home/jens/Source/shotwell/src/util/image.vala" x = _tmp34_ + 1; -#line 902 "image.c" +#line 933 "image.c" } #line 235 "/home/jens/Source/shotwell/src/util/image.vala" _tmp33_ = FALSE; @@ -910,7 +941,7 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph if (!(_tmp35_ < _tmp36_)) { #line 235 "/home/jens/Source/shotwell/src/util/image.vala" break; -#line 914 "image.c" +#line 945 "image.c" } #line 236 "/home/jens/Source/shotwell/src/util/image.vala" _tmp37_ = y_offset; @@ -924,7 +955,7 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp40_ = red; #line 238 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp40_ != 0) { -#line 928 "image.c" +#line 959 "image.c" guchar* _tmp41_; gint _tmp42_; guchar* _tmp43_; @@ -951,13 +982,13 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp41_[_tmp42_] = _tmp47_; #line 239 "/home/jens/Source/shotwell/src/util/image.vala" _tmp48_ = _tmp41_[_tmp42_]; -#line 955 "image.c" +#line 986 "image.c" } #line 241 "/home/jens/Source/shotwell/src/util/image.vala" _tmp49_ = green; #line 241 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp49_ != 0) { -#line 961 "image.c" +#line 992 "image.c" guchar* _tmp50_; gint _tmp51_; guchar* _tmp52_; @@ -984,13 +1015,13 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp50_[_tmp51_ + 1] = _tmp56_; #line 242 "/home/jens/Source/shotwell/src/util/image.vala" _tmp57_ = _tmp50_[_tmp51_ + 1]; -#line 988 "image.c" +#line 1019 "image.c" } #line 244 "/home/jens/Source/shotwell/src/util/image.vala" _tmp58_ = blue; #line 244 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp58_ != 0) { -#line 994 "image.c" +#line 1025 "image.c" guchar* _tmp59_; gint _tmp60_; guchar* _tmp61_; @@ -1017,27 +1048,27 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp59_[_tmp60_ + 2] = _tmp65_; #line 245 "/home/jens/Source/shotwell/src/util/image.vala" _tmp66_ = _tmp59_[_tmp60_ + 2]; -#line 1021 "image.c" +#line 1052 "image.c" } #line 247 "/home/jens/Source/shotwell/src/util/image.vala" _tmp68_ = alpha; #line 247 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp68_ != 0) { -#line 1027 "image.c" +#line 1058 "image.c" gint _tmp69_; #line 247 "/home/jens/Source/shotwell/src/util/image.vala" _tmp69_ = channels; #line 247 "/home/jens/Source/shotwell/src/util/image.vala" _tmp67_ = _tmp69_ >= 4; -#line 1033 "image.c" +#line 1064 "image.c" } else { #line 247 "/home/jens/Source/shotwell/src/util/image.vala" _tmp67_ = FALSE; -#line 1037 "image.c" +#line 1068 "image.c" } #line 247 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp67_) { -#line 1041 "image.c" +#line 1072 "image.c" guchar* _tmp70_; gint _tmp71_; guchar* _tmp72_; @@ -1064,7 +1095,7 @@ void shift_colors (GdkPixbuf* pixbuf, gint red, gint green, gint blue, gint alph _tmp70_[_tmp71_ + 3] = _tmp76_; #line 248 "/home/jens/Source/shotwell/src/util/image.vala" _tmp77_ = _tmp70_[_tmp71_ + 3]; -#line 1068 "image.c" +#line 1099 "image.c" } } } @@ -1093,7 +1124,7 @@ gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect) { _tmp5_ = _tmp4_.x; #line 254 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp3_ >= _tmp5_) { -#line 1097 "image.c" +#line 1128 "image.c" gint _tmp6_; GdkRectangle _tmp7_; gint _tmp8_; @@ -1111,15 +1142,15 @@ gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect) { _tmp10_ = _tmp9_.width; #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = _tmp6_ < (_tmp8_ + _tmp10_); -#line 1115 "image.c" +#line 1146 "image.c" } else { #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = FALSE; -#line 1119 "image.c" +#line 1150 "image.c" } #line 254 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp2_) { -#line 1123 "image.c" +#line 1154 "image.c" gint _tmp11_; GdkRectangle _tmp12_; gint _tmp13_; @@ -1131,15 +1162,15 @@ gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect) { _tmp13_ = _tmp12_.y; #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = _tmp11_ >= _tmp13_; -#line 1135 "image.c" +#line 1166 "image.c" } else { #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = FALSE; -#line 1139 "image.c" +#line 1170 "image.c" } #line 254 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp1_) { -#line 1143 "image.c" +#line 1174 "image.c" gint _tmp14_; GdkRectangle _tmp15_; gint _tmp16_; @@ -1157,17 +1188,17 @@ gboolean coord_in_rectangle (gint x, gint y, GdkRectangle* rect) { _tmp18_ = _tmp17_.height; #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = _tmp14_ <= (_tmp16_ + _tmp18_); -#line 1161 "image.c" +#line 1192 "image.c" } else { #line 254 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = FALSE; -#line 1165 "image.c" +#line 1196 "image.c" } #line 254 "/home/jens/Source/shotwell/src/util/image.vala" result = _tmp0_; #line 254 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 1171 "image.c" +#line 1202 "image.c" } @@ -1194,7 +1225,7 @@ gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b) { _tmp6_ = _tmp5_.x; #line 258 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp4_ == _tmp6_) { -#line 1198 "image.c" +#line 1229 "image.c" GdkRectangle _tmp7_; gint _tmp8_; GdkRectangle _tmp9_; @@ -1209,15 +1240,15 @@ gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b) { _tmp10_ = _tmp9_.y; #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = _tmp8_ == _tmp10_; -#line 1213 "image.c" +#line 1244 "image.c" } else { #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = FALSE; -#line 1217 "image.c" +#line 1248 "image.c" } #line 258 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp2_) { -#line 1221 "image.c" +#line 1252 "image.c" GdkRectangle _tmp11_; gint _tmp12_; GdkRectangle _tmp13_; @@ -1232,15 +1263,15 @@ gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b) { _tmp14_ = _tmp13_.width; #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = _tmp12_ == _tmp14_; -#line 1236 "image.c" +#line 1267 "image.c" } else { #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = FALSE; -#line 1240 "image.c" +#line 1271 "image.c" } #line 258 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp1_) { -#line 1244 "image.c" +#line 1275 "image.c" GdkRectangle _tmp15_; gint _tmp16_; GdkRectangle _tmp17_; @@ -1255,17 +1286,17 @@ gboolean rectangles_equal (GdkRectangle* a, GdkRectangle* b) { _tmp18_ = _tmp17_.height; #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = _tmp16_ == _tmp18_; -#line 1259 "image.c" +#line 1290 "image.c" } else { #line 258 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = FALSE; -#line 1263 "image.c" +#line 1294 "image.c" } #line 258 "/home/jens/Source/shotwell/src/util/image.vala" result = _tmp0_; #line 258 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 1269 "image.c" +#line 1300 "image.c" } @@ -1304,7 +1335,7 @@ gchar* rectangle_to_string (GdkRectangle* rect) { result = _tmp8_; #line 262 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 1308 "image.c" +#line 1339 "image.c" } @@ -1388,7 +1419,7 @@ void clamp_rectangle (GdkRectangle* original, Dimensions* max, GdkRectangle* res *result = rect; #line 272 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 1392 "image.c" +#line 1423 "image.c" } @@ -1427,7 +1458,7 @@ void scale_point (GdkPoint* p, gdouble factor, GdkPoint* result) { *result = _result_; #line 280 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 1431 "image.c" +#line 1462 "image.c" } @@ -1474,7 +1505,7 @@ void add_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result) { *result = _result_; #line 288 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 1478 "image.c" +#line 1509 "image.c" } @@ -1521,7 +1552,7 @@ void subtract_points (GdkPoint* p1, GdkPoint* p2, GdkPoint* result) { *result = _result_; #line 296 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 1525 "image.c" +#line 1556 "image.c" } @@ -1540,19 +1571,19 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { _tmp2_ = _tmp1_; #line 301 "/home/jens/Source/shotwell/src/util/image.vala" gdk_pixels = _tmp2_; -#line 1544 "image.c" +#line 1575 "image.c" { gint j = 0; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" j = 0; -#line 1549 "image.c" +#line 1580 "image.c" { gboolean _tmp3_ = FALSE; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = TRUE; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" while (TRUE) { -#line 1556 "image.c" +#line 1587 "image.c" gint _tmp5_; GdkPixbuf* _tmp6_; gint _tmp7_; @@ -1570,13 +1601,13 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { gint _tmp29_; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" if (!_tmp3_) { -#line 1574 "image.c" +#line 1605 "image.c" gint _tmp4_; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" _tmp4_ = j; #line 302 "/home/jens/Source/shotwell/src/util/image.vala" j = _tmp4_ + 1; -#line 1580 "image.c" +#line 1611 "image.c" } #line 302 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = FALSE; @@ -1592,7 +1623,7 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { if (!(_tmp5_ < _tmp8_)) { #line 302 "/home/jens/Source/shotwell/src/util/image.vala" break; -#line 1596 "image.c" +#line 1627 "image.c" } #line 303 "/home/jens/Source/shotwell/src/util/image.vala" _tmp9_ = gdk_pixels; @@ -1610,7 +1641,7 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { end = _tmp10_ + (4 * _tmp13_); #line 306 "/home/jens/Source/shotwell/src/util/image.vala" while (TRUE) { -#line 1614 "image.c" +#line 1645 "image.c" guchar* _tmp14_; guchar* _tmp15_; guchar tmp = '\0'; @@ -1632,7 +1663,7 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { if (!(_tmp14_ < _tmp15_)) { #line 306 "/home/jens/Source/shotwell/src/util/image.vala" break; -#line 1636 "image.c" +#line 1667 "image.c" } #line 307 "/home/jens/Source/shotwell/src/util/image.vala" _tmp16_ = p; @@ -1662,7 +1693,7 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { _tmp25_ = p; #line 317 "/home/jens/Source/shotwell/src/util/image.vala" p = _tmp25_ + 4; -#line 1666 "image.c" +#line 1697 "image.c" } #line 320 "/home/jens/Source/shotwell/src/util/image.vala" _tmp26_ = gdk_pixels; @@ -1674,7 +1705,7 @@ void fix_cairo_pixbuf (GdkPixbuf* pixbuf) { _tmp29_ = _tmp28_; #line 320 "/home/jens/Source/shotwell/src/util/image.vala" gdk_pixels = _tmp26_ + _tmp29_; -#line 1678 "image.c" +#line 1709 "image.c" } } } @@ -1754,13 +1785,13 @@ void compute_arb_rotated_size (gdouble src_width, gdouble src_height, gdouble an if (dest_width) { #line 334 "/home/jens/Source/shotwell/src/util/image.vala" *dest_width = _vala_dest_width; -#line 1758 "image.c" +#line 1789 "image.c" } #line 334 "/home/jens/Source/shotwell/src/util/image.vala" if (dest_height) { #line 334 "/home/jens/Source/shotwell/src/util/image.vala" *dest_height = _vala_dest_height; -#line 1764 "image.c" +#line 1795 "image.c" } } @@ -1850,7 +1881,7 @@ GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) { _tmp0_ = angle; #line 353 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp0_ == 0.0) { -#line 1854 "image.c" +#line 1885 "image.c" GdkPixbuf* _tmp1_; GdkPixbuf* _tmp2_; #line 354 "/home/jens/Source/shotwell/src/util/image.vala" @@ -1861,7 +1892,7 @@ GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) { result = _tmp2_; #line 354 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 1865 "image.c" +#line 1896 "image.c" } #line 361 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = source_pixbuf; @@ -1905,11 +1936,11 @@ GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) { if (_tmp20_) { #line 369 "/home/jens/Source/shotwell/src/util/image.vala" _tmp17_ = CAIRO_FORMAT_ARGB32; -#line 1909 "image.c" +#line 1940 "image.c" } else { #line 369 "/home/jens/Source/shotwell/src/util/image.vala" _tmp17_ = CAIRO_FORMAT_RGB24; -#line 1913 "image.c" +#line 1944 "image.c" } #line 367 "/home/jens/Source/shotwell/src/util/image.vala" _tmp21_ = dest_pixbuf; @@ -2037,7 +2068,7 @@ GdkPixbuf* rotate_arb (GdkPixbuf* source_pixbuf, gdouble angle) { _cairo_surface_destroy0 (surface); #line 390 "/home/jens/Source/shotwell/src/util/image.vala" return result; -#line 2041 "image.c" +#line 2072 "image.c" } @@ -2086,7 +2117,7 @@ void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble a _tmp0_ = angle; #line 409 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp0_ == 0.0) { -#line 2090 "image.c" +#line 2121 "image.c" GdkPoint _tmp1_; #line 411 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = *source_point; @@ -2094,7 +2125,7 @@ void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble a *result = _tmp1_; #line 411 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 2098 "image.c" +#line 2129 "image.c" } #line 416 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = img_w; @@ -2132,13 +2163,13 @@ void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble a _tmp13_ = invert; #line 422 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp13_) { -#line 2136 "image.c" +#line 2167 "image.c" cairo_status_t _tmp14_; #line 423 "/home/jens/Source/shotwell/src/util/image.vala" _tmp14_ = cairo_matrix_invert (&matrix); #line 423 "/home/jens/Source/shotwell/src/util/image.vala" _vala_assert (_tmp14_ == CAIRO_STATUS_SUCCESS, "matrix.invert() == Cairo.Status.SUCCESS"); -#line 2142 "image.c" +#line 2173 "image.c" } #line 425 "/home/jens/Source/shotwell/src/util/image.vala" _tmp15_ = *source_point; @@ -2166,7 +2197,7 @@ void rotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble a *result = _tmp21_; #line 429 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 2170 "image.c" +#line 2201 "image.c" } @@ -2205,7 +2236,335 @@ void derotate_point_arb (GdkPoint* source_point, gint img_w, gint img_h, gdouble *result = _tmp4_; #line 446 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 2209 "image.c" +#line 2240 "image.c" +} + + +static gpointer _cairo_surface_reference0 (gpointer self) { +#line 484 "/home/jens/Source/shotwell/src/util/image.vala" + return self ? cairo_surface_reference (self) : NULL; +#line 2247 "image.c" +} + + +cairo_surface_t* get_background_surface (void) { + cairo_surface_t* result = NULL; + cairo_surface_t* _tmp0_; + cairo_surface_t* _tmp31_; + cairo_surface_t* _tmp32_; +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp0_ = background_surface; +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + if (_tmp0_ == NULL) { +#line 2260 "image.c" + gchar* color_a = NULL; + gchar* color_b = NULL; + ConfigFacade* config = NULL; + ConfigFacade* _tmp1_; + gchar* type = NULL; + ConfigFacade* _tmp2_; + gchar* _tmp3_; + const gchar* _tmp4_; + const gchar* _tmp5_; + GQuark _tmp7_ = 0U; +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + static GQuark _tmp6_label0 = 0; +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + static GQuark _tmp6_label1 = 0; +#line 2275 "image.c" + cairo_surface_t* _tmp17_; + cairo_t* ctx = NULL; + cairo_surface_t* _tmp18_; + cairo_t* _tmp19_; + cairo_t* _tmp20_; + cairo_t* _tmp21_; + const gchar* _tmp22_; + cairo_t* _tmp23_; + cairo_t* _tmp24_; + cairo_t* _tmp25_; + cairo_t* _tmp26_; + const gchar* _tmp27_; + cairo_t* _tmp28_; + cairo_t* _tmp29_; + cairo_t* _tmp30_; +#line 455 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp1_ = config_facade_get_instance (); +#line 455 "/home/jens/Source/shotwell/src/util/image.vala" + config = _tmp1_; +#line 457 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp2_ = config; +#line 457 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp3_ = configuration_facade_get_transparent_background_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 457 "/home/jens/Source/shotwell/src/util/image.vala" + type = _tmp3_; +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp4_ = type; +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp5_ = _tmp4_; +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp7_ = (NULL == _tmp5_) ? 0 : g_quark_from_string (_tmp5_); +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + if (_tmp7_ == ((0 != _tmp6_label0) ? _tmp6_label0 : (_tmp6_label0 = g_quark_from_static_string ("checkered")))) { +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + switch (0) { +#line 2311 "image.c" + default: + { + gchar* _tmp8_; + gchar* _tmp9_; +#line 460 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp8_ = g_strdup ("#808080"); +#line 460 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_a); +#line 460 "/home/jens/Source/shotwell/src/util/image.vala" + color_a = _tmp8_; +#line 461 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp9_ = g_strdup ("#ccc"); +#line 461 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_b); +#line 461 "/home/jens/Source/shotwell/src/util/image.vala" + color_b = _tmp9_; +#line 462 "/home/jens/Source/shotwell/src/util/image.vala" + break; +#line 2330 "image.c" + } + } + } else if (_tmp7_ == ((0 != _tmp6_label1) ? _tmp6_label1 : (_tmp6_label1 = g_quark_from_static_string ("solid")))) { +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + switch (0) { +#line 2336 "image.c" + default: + { + ConfigFacade* _tmp10_; + gchar* _tmp11_; + const gchar* _tmp12_; + gchar* _tmp13_; +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp10_ = config; +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp11_ = configuration_facade_get_transparent_background_color (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_b); +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + color_b = _tmp11_; +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp12_ = color_b; +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp13_ = g_strdup (_tmp12_); +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_a); +#line 464 "/home/jens/Source/shotwell/src/util/image.vala" + color_a = _tmp13_; +#line 465 "/home/jens/Source/shotwell/src/util/image.vala" + break; +#line 2361 "image.c" + } + } + } else { +#line 458 "/home/jens/Source/shotwell/src/util/image.vala" + switch (0) { +#line 2367 "image.c" + default: + { + gchar* _tmp14_; + const gchar* _tmp15_; + gchar* _tmp16_; +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp14_ = g_strdup ("#000"); +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_b); +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + color_b = _tmp14_; +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp15_ = color_b; +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp16_ = g_strdup (_tmp15_); +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_a); +#line 467 "/home/jens/Source/shotwell/src/util/image.vala" + color_a = _tmp16_; +#line 468 "/home/jens/Source/shotwell/src/util/image.vala" + break; +#line 2389 "image.c" + } + } + } +#line 471 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp17_ = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 16, 16); +#line 471 "/home/jens/Source/shotwell/src/util/image.vala" + _cairo_surface_destroy0 (background_surface); +#line 471 "/home/jens/Source/shotwell/src/util/image.vala" + background_surface = _tmp17_; +#line 472 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp18_ = background_surface; +#line 472 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp19_ = cairo_create (_tmp18_); +#line 472 "/home/jens/Source/shotwell/src/util/image.vala" + ctx = _tmp19_; +#line 473 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp20_ = ctx; +#line 473 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_set_operator (_tmp20_, CAIRO_OPERATOR_SOURCE); +#line 474 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp21_ = ctx; +#line 474 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp22_ = color_a; +#line 474 "/home/jens/Source/shotwell/src/util/image.vala" + set_source_color_from_string (_tmp21_, _tmp22_); +#line 475 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp23_ = ctx; +#line 475 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_rectangle (_tmp23_, (gdouble) 0, (gdouble) 0, (gdouble) 8, (gdouble) 8); +#line 476 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp24_ = ctx; +#line 476 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_rectangle (_tmp24_, (gdouble) 8, (gdouble) 8, (gdouble) 8, (gdouble) 8); +#line 477 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp25_ = ctx; +#line 477 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_fill (_tmp25_); +#line 478 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp26_ = ctx; +#line 478 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp27_ = color_b; +#line 478 "/home/jens/Source/shotwell/src/util/image.vala" + set_source_color_from_string (_tmp26_, _tmp27_); +#line 479 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp28_ = ctx; +#line 479 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_rectangle (_tmp28_, (gdouble) 0, (gdouble) 8, (gdouble) 8, (gdouble) 8); +#line 480 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp29_ = ctx; +#line 480 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_rectangle (_tmp29_, (gdouble) 8, (gdouble) 0, (gdouble) 8, (gdouble) 8); +#line 481 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp30_ = ctx; +#line 481 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_fill (_tmp30_); +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _cairo_destroy0 (ctx); +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (type); +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _g_object_unref0 (config); +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_b); +#line 452 "/home/jens/Source/shotwell/src/util/image.vala" + _g_free0 (color_a); +#line 2455 "image.c" + } +#line 484 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp31_ = background_surface; +#line 484 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp32_ = _cairo_surface_reference0 (_tmp31_); +#line 484 "/home/jens/Source/shotwell/src/util/image.vala" + result = _tmp32_; +#line 484 "/home/jens/Source/shotwell/src/util/image.vala" + return result; +#line 2465 "image.c" +} + + +void invalidate_transparent_background (void) { +#line 488 "/home/jens/Source/shotwell/src/util/image.vala" + _cairo_surface_destroy0 (background_surface); +#line 488 "/home/jens/Source/shotwell/src/util/image.vala" + background_surface = NULL; +#line 2474 "image.c" +} + + +void paint_pixmap_with_background (cairo_t* ctx, GdkPixbuf* pixbuf, gint x, gint y) { + GdkPixbuf* _tmp0_; + gboolean _tmp1_; + cairo_t* _tmp17_; + GdkPixbuf* _tmp18_; + gint _tmp19_; + gint _tmp20_; + cairo_t* _tmp21_; +#line 491 "/home/jens/Source/shotwell/src/util/image.vala" + g_return_if_fail (ctx != NULL); +#line 491 "/home/jens/Source/shotwell/src/util/image.vala" + g_return_if_fail (GDK_IS_PIXBUF (pixbuf)); +#line 492 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp0_ = pixbuf; +#line 492 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp1_ = gdk_pixbuf_get_has_alpha (_tmp0_); +#line 492 "/home/jens/Source/shotwell/src/util/image.vala" + if (_tmp1_) { +#line 2496 "image.c" + cairo_t* _tmp2_; + cairo_surface_t* _tmp3_; + cairo_surface_t* _tmp4_; + cairo_t* _tmp5_; + cairo_pattern_t* _tmp6_; + cairo_t* _tmp7_; + gint _tmp8_; + gint _tmp9_; + GdkPixbuf* _tmp10_; + gint _tmp11_; + gint _tmp12_; + GdkPixbuf* _tmp13_; + gint _tmp14_; + gint _tmp15_; + cairo_t* _tmp16_; +#line 493 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp2_ = ctx; +#line 493 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp3_ = get_background_surface (); +#line 493 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp4_ = _tmp3_; +#line 493 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_set_source_surface (_tmp2_, _tmp4_, (gdouble) 0, (gdouble) 0); +#line 493 "/home/jens/Source/shotwell/src/util/image.vala" + _cairo_surface_destroy0 (_tmp4_); +#line 494 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp5_ = ctx; +#line 494 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp6_ = cairo_get_source (_tmp5_); +#line 494 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_pattern_set_extend (_tmp6_, CAIRO_EXTEND_REPEAT); +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp7_ = ctx; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp8_ = x; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp9_ = y; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp10_ = pixbuf; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp11_ = gdk_pixbuf_get_width (_tmp10_); +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp12_ = _tmp11_; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp13_ = pixbuf; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp14_ = gdk_pixbuf_get_height (_tmp13_); +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp15_ = _tmp14_; +#line 495 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_rectangle (_tmp7_, (gdouble) _tmp8_, (gdouble) _tmp9_, (gdouble) _tmp12_, (gdouble) _tmp15_); +#line 496 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp16_ = ctx; +#line 496 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_fill (_tmp16_); +#line 2552 "image.c" + } +#line 499 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp17_ = ctx; +#line 499 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp18_ = pixbuf; +#line 499 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp19_ = x; +#line 499 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp20_ = y; +#line 499 "/home/jens/Source/shotwell/src/util/image.vala" + gdk_cairo_set_source_pixbuf (_tmp17_, _tmp18_, (gdouble) _tmp19_, (gdouble) _tmp20_); +#line 500 "/home/jens/Source/shotwell/src/util/image.vala" + _tmp21_ = ctx; +#line 500 "/home/jens/Source/shotwell/src/util/image.vala" + cairo_paint (_tmp21_); +#line 2568 "image.c" } @@ -2289,263 +2648,263 @@ void clamp_inside_rotated_image (Box* src, gint img_w, gint img_h, gdouble angle gint _tmp73_; Box _tmp78_ = {0}; gboolean _tmp79_; -#line 451 "/home/jens/Source/shotwell/src/util/image.vala" +#line 504 "/home/jens/Source/shotwell/src/util/image.vala" g_return_if_fail (src != NULL); -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp0_ = *src; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp1_ = _tmp0_.left; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp2_ = *src; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp3_ = _tmp2_.top; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp4_.x = _tmp1_; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp4_.y = _tmp3_; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp5_ = img_w; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp6_ = img_h; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" _tmp7_ = angle_deg; -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" derotate_point_arb (&_tmp4_, _tmp5_, _tmp6_, _tmp7_, &_tmp8_); -#line 454 "/home/jens/Source/shotwell/src/util/image.vala" +#line 507 "/home/jens/Source/shotwell/src/util/image.vala" top_left = _tmp8_; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp9_ = *src; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp10_ = _tmp9_.right; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp11_ = *src; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp12_ = _tmp11_.top; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp13_.x = _tmp10_; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp13_.y = _tmp12_; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp14_ = img_w; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp15_ = img_h; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" _tmp16_ = angle_deg; -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" derotate_point_arb (&_tmp13_, _tmp14_, _tmp15_, _tmp16_, &_tmp17_); -#line 455 "/home/jens/Source/shotwell/src/util/image.vala" +#line 508 "/home/jens/Source/shotwell/src/util/image.vala" top_right = _tmp17_; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp18_ = *src; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp19_ = _tmp18_.left; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp20_ = *src; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp21_ = _tmp20_.bottom; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp22_.x = _tmp19_; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp22_.y = _tmp21_; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp23_ = img_w; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp24_ = img_h; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" _tmp25_ = angle_deg; -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" derotate_point_arb (&_tmp22_, _tmp23_, _tmp24_, _tmp25_, &_tmp26_); -#line 456 "/home/jens/Source/shotwell/src/util/image.vala" +#line 509 "/home/jens/Source/shotwell/src/util/image.vala" bottom_left = _tmp26_; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp27_ = *src; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp28_ = _tmp27_.right; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp29_ = *src; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp30_ = _tmp29_.bottom; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp31_.x = _tmp28_; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp31_.y = _tmp30_; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp32_ = img_w; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp33_ = img_h; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" _tmp34_ = angle_deg; -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" derotate_point_arb (&_tmp31_, _tmp32_, _tmp33_, _tmp34_, &_tmp35_); -#line 457 "/home/jens/Source/shotwell/src/util/image.vala" +#line 510 "/home/jens/Source/shotwell/src/util/image.vala" bottom_right = _tmp35_; -#line 459 "/home/jens/Source/shotwell/src/util/image.vala" +#line 512 "/home/jens/Source/shotwell/src/util/image.vala" _tmp36_ = angle_deg; -#line 459 "/home/jens/Source/shotwell/src/util/image.vala" +#line 512 "/home/jens/Source/shotwell/src/util/image.vala" _tmp37_ = degrees_to_radians (_tmp36_); -#line 459 "/home/jens/Source/shotwell/src/util/image.vala" +#line 512 "/home/jens/Source/shotwell/src/util/image.vala" angle = _tmp37_; -#line 460 "/home/jens/Source/shotwell/src/util/image.vala" +#line 513 "/home/jens/Source/shotwell/src/util/image.vala" top_offset = 0; -#line 460 "/home/jens/Source/shotwell/src/util/image.vala" +#line 513 "/home/jens/Source/shotwell/src/util/image.vala" bottom_offset = 0; -#line 460 "/home/jens/Source/shotwell/src/util/image.vala" +#line 513 "/home/jens/Source/shotwell/src/util/image.vala" left_offset = 0; -#line 460 "/home/jens/Source/shotwell/src/util/image.vala" +#line 513 "/home/jens/Source/shotwell/src/util/image.vala" right_offset = 0; -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" _tmp38_ = top_left; -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" _tmp39_ = _tmp38_.y; -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" _tmp40_ = top_right; -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" _tmp41_ = _tmp40_.y; -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" _tmp42_ = MIN (_tmp39_, _tmp41_); -#line 462 "/home/jens/Source/shotwell/src/util/image.vala" +#line 515 "/home/jens/Source/shotwell/src/util/image.vala" top = _tmp42_; -#line 463 "/home/jens/Source/shotwell/src/util/image.vala" +#line 516 "/home/jens/Source/shotwell/src/util/image.vala" _tmp43_ = top; -#line 463 "/home/jens/Source/shotwell/src/util/image.vala" +#line 516 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp43_ < 0) { -#line 2413 "image.c" +#line 2772 "image.c" gint _tmp44_; gdouble _tmp45_; gdouble _tmp46_; -#line 464 "/home/jens/Source/shotwell/src/util/image.vala" +#line 517 "/home/jens/Source/shotwell/src/util/image.vala" _tmp44_ = top; -#line 464 "/home/jens/Source/shotwell/src/util/image.vala" +#line 517 "/home/jens/Source/shotwell/src/util/image.vala" _tmp45_ = angle; -#line 464 "/home/jens/Source/shotwell/src/util/image.vala" +#line 517 "/home/jens/Source/shotwell/src/util/image.vala" _tmp46_ = cos (_tmp45_); -#line 464 "/home/jens/Source/shotwell/src/util/image.vala" +#line 517 "/home/jens/Source/shotwell/src/util/image.vala" top_offset = (gint) ((0 - _tmp44_) * _tmp46_); -#line 2425 "image.c" +#line 2784 "image.c" } -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" _tmp47_ = bottom_left; -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" _tmp48_ = _tmp47_.y; -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" _tmp49_ = bottom_right; -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" _tmp50_ = _tmp49_.y; -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" _tmp51_ = MAX (_tmp48_, _tmp50_); -#line 466 "/home/jens/Source/shotwell/src/util/image.vala" +#line 519 "/home/jens/Source/shotwell/src/util/image.vala" bottom = _tmp51_; -#line 467 "/home/jens/Source/shotwell/src/util/image.vala" +#line 520 "/home/jens/Source/shotwell/src/util/image.vala" _tmp52_ = bottom; -#line 467 "/home/jens/Source/shotwell/src/util/image.vala" +#line 520 "/home/jens/Source/shotwell/src/util/image.vala" _tmp53_ = img_h; -#line 467 "/home/jens/Source/shotwell/src/util/image.vala" +#line 520 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp52_ > _tmp53_) { -#line 2445 "image.c" +#line 2804 "image.c" gint _tmp54_; gint _tmp55_; gdouble _tmp56_; gdouble _tmp57_; -#line 468 "/home/jens/Source/shotwell/src/util/image.vala" +#line 521 "/home/jens/Source/shotwell/src/util/image.vala" _tmp54_ = img_h; -#line 468 "/home/jens/Source/shotwell/src/util/image.vala" +#line 521 "/home/jens/Source/shotwell/src/util/image.vala" _tmp55_ = bottom; -#line 468 "/home/jens/Source/shotwell/src/util/image.vala" +#line 521 "/home/jens/Source/shotwell/src/util/image.vala" _tmp56_ = angle; -#line 468 "/home/jens/Source/shotwell/src/util/image.vala" +#line 521 "/home/jens/Source/shotwell/src/util/image.vala" _tmp57_ = cos (_tmp56_); -#line 468 "/home/jens/Source/shotwell/src/util/image.vala" +#line 521 "/home/jens/Source/shotwell/src/util/image.vala" bottom_offset = (gint) ((_tmp54_ - _tmp55_) * _tmp57_); -#line 2460 "image.c" +#line 2819 "image.c" } -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" _tmp58_ = top_left; -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" _tmp59_ = _tmp58_.x; -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" _tmp60_ = bottom_left; -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" _tmp61_ = _tmp60_.x; -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" _tmp62_ = MIN (_tmp59_, _tmp61_); -#line 470 "/home/jens/Source/shotwell/src/util/image.vala" +#line 523 "/home/jens/Source/shotwell/src/util/image.vala" left = _tmp62_; -#line 471 "/home/jens/Source/shotwell/src/util/image.vala" +#line 524 "/home/jens/Source/shotwell/src/util/image.vala" _tmp63_ = left; -#line 471 "/home/jens/Source/shotwell/src/util/image.vala" +#line 524 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp63_ < 0) { -#line 2478 "image.c" +#line 2837 "image.c" gint _tmp64_; gdouble _tmp65_; gdouble _tmp66_; -#line 472 "/home/jens/Source/shotwell/src/util/image.vala" +#line 525 "/home/jens/Source/shotwell/src/util/image.vala" _tmp64_ = left; -#line 472 "/home/jens/Source/shotwell/src/util/image.vala" +#line 525 "/home/jens/Source/shotwell/src/util/image.vala" _tmp65_ = angle; -#line 472 "/home/jens/Source/shotwell/src/util/image.vala" +#line 525 "/home/jens/Source/shotwell/src/util/image.vala" _tmp66_ = cos (_tmp65_); -#line 472 "/home/jens/Source/shotwell/src/util/image.vala" +#line 525 "/home/jens/Source/shotwell/src/util/image.vala" left_offset = (gint) ((0 - _tmp64_) * _tmp66_); -#line 2490 "image.c" +#line 2849 "image.c" } -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" _tmp67_ = top_right; -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" _tmp68_ = _tmp67_.x; -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" _tmp69_ = bottom_right; -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" _tmp70_ = _tmp69_.x; -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" _tmp71_ = MAX (_tmp68_, _tmp70_); -#line 474 "/home/jens/Source/shotwell/src/util/image.vala" +#line 527 "/home/jens/Source/shotwell/src/util/image.vala" right = _tmp71_; -#line 475 "/home/jens/Source/shotwell/src/util/image.vala" +#line 528 "/home/jens/Source/shotwell/src/util/image.vala" _tmp72_ = right; -#line 475 "/home/jens/Source/shotwell/src/util/image.vala" +#line 528 "/home/jens/Source/shotwell/src/util/image.vala" _tmp73_ = img_w; -#line 475 "/home/jens/Source/shotwell/src/util/image.vala" +#line 528 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp72_ > _tmp73_) { -#line 2510 "image.c" +#line 2869 "image.c" gint _tmp74_; gint _tmp75_; gdouble _tmp76_; gdouble _tmp77_; -#line 476 "/home/jens/Source/shotwell/src/util/image.vala" +#line 529 "/home/jens/Source/shotwell/src/util/image.vala" _tmp74_ = img_w; -#line 476 "/home/jens/Source/shotwell/src/util/image.vala" +#line 529 "/home/jens/Source/shotwell/src/util/image.vala" _tmp75_ = right; -#line 476 "/home/jens/Source/shotwell/src/util/image.vala" +#line 529 "/home/jens/Source/shotwell/src/util/image.vala" _tmp76_ = angle; -#line 476 "/home/jens/Source/shotwell/src/util/image.vala" +#line 529 "/home/jens/Source/shotwell/src/util/image.vala" _tmp77_ = cos (_tmp76_); -#line 476 "/home/jens/Source/shotwell/src/util/image.vala" +#line 529 "/home/jens/Source/shotwell/src/util/image.vala" right_offset = (gint) ((_tmp74_ - _tmp75_) * _tmp77_); -#line 2525 "image.c" +#line 2884 "image.c" } -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp79_ = preserve_geom; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" if (_tmp79_) { -#line 2531 "image.c" +#line 2890 "image.c" gint _tmp80_; gint _tmp81_; gint _tmp82_; gint _tmp83_; Box _tmp84_ = {0}; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp80_ = left_offset; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp81_ = right_offset; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp82_ = top_offset; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp83_ = bottom_offset; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" box_get_offset (src, _tmp80_ + _tmp81_, _tmp82_ + _tmp83_, &_tmp84_); -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" _tmp78_ = _tmp84_; -#line 2549 "image.c" +#line 2908 "image.c" } else { Box _tmp85_; gint _tmp86_; @@ -2559,39 +2918,39 @@ void clamp_inside_rotated_image (Box* src, gint img_w, gint img_h, gdouble angle Box _tmp94_; gint _tmp95_; gint _tmp96_; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp85_ = *src; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp86_ = _tmp85_.left; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp87_ = left_offset; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp88_ = *src; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp89_ = _tmp88_.top; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp90_ = top_offset; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp91_ = *src; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp92_ = _tmp91_.right; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp93_ = right_offset; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp94_ = *src; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp95_ = _tmp94_.bottom; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" _tmp96_ = bottom_offset; -#line 479 "/home/jens/Source/shotwell/src/util/image.vala" +#line 532 "/home/jens/Source/shotwell/src/util/image.vala" box_init (&_tmp78_, _tmp86_ + _tmp87_, _tmp89_ + _tmp90_, _tmp92_ + _tmp93_, _tmp95_ + _tmp96_); -#line 2589 "image.c" +#line 2948 "image.c" } -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" *result = _tmp78_; -#line 478 "/home/jens/Source/shotwell/src/util/image.vala" +#line 531 "/home/jens/Source/shotwell/src/util/image.vala" return; -#line 2595 "image.c" +#line 2954 "image.c" } |