summaryrefslogtreecommitdiff
path: root/src/page-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/page-view.c')
-rw-r--r--src/page-view.c3844
1 files changed, 3017 insertions, 827 deletions
diff --git a/src/page-view.c b/src/page-view.c
index 5f916e7..24bc20d 100644
--- a/src/page-view.c
+++ b/src/page-view.c
@@ -1,4 +1,4 @@
-/* page-view.c generated by valac 0.13.1, the Vala compiler
+/* page-view.c generated by valac 0.13.4, the Vala compiler
* generated from page-view.vala, do not modify */
/*
@@ -243,16 +243,28 @@ static void _page_view_scan_direction_changed_cb_page_scan_direction_changed (Pa
PageView* page_view_construct (GType object_type, Page* page) {
PageView* self = NULL;
Page* _tmp0_;
+ Page* _tmp1_;
+ Page* _tmp2_;
+ Page* _tmp3_;
+ Page* _tmp4_;
+ Page* _tmp5_;
+ Page* _tmp6_;
g_return_val_if_fail (page != NULL, NULL);
self = (PageView*) g_type_create_instance (object_type);
- _tmp0_ = _page_ref0 (page);
+ _tmp0_ = page;
+ _tmp1_ = _page_ref0 (_tmp0_);
_page_unref0 (self->priv->page);
- self->priv->page = _tmp0_;
- g_signal_connect (page, "pixels-changed", (GCallback) _page_view_page_pixels_changed_cb_page_pixels_changed, self);
- g_signal_connect (page, "size-changed", (GCallback) _page_view_page_size_changed_cb_page_size_changed, self);
- g_signal_connect (page, "crop-changed", (GCallback) _page_view_page_overlay_changed_cb_page_crop_changed, self);
- g_signal_connect (page, "scan-line-changed", (GCallback) _page_view_page_overlay_changed_cb_page_scan_line_changed, self);
- g_signal_connect (page, "scan-direction-changed", (GCallback) _page_view_scan_direction_changed_cb_page_scan_direction_changed, self);
+ self->priv->page = _tmp1_;
+ _tmp2_ = page;
+ g_signal_connect (_tmp2_, "pixels-changed", (GCallback) _page_view_page_pixels_changed_cb_page_pixels_changed, self);
+ _tmp3_ = page;
+ g_signal_connect (_tmp3_, "size-changed", (GCallback) _page_view_page_size_changed_cb_page_size_changed, self);
+ _tmp4_ = page;
+ g_signal_connect (_tmp4_, "crop-changed", (GCallback) _page_view_page_overlay_changed_cb_page_crop_changed, self);
+ _tmp5_ = page;
+ g_signal_connect (_tmp5_, "scan-line-changed", (GCallback) _page_view_page_overlay_changed_cb_page_scan_line_changed, self);
+ _tmp6_ = page;
+ g_signal_connect (_tmp6_, "scan-direction-changed", (GCallback) _page_view_scan_direction_changed_cb_page_scan_direction_changed, self);
return self;
}
@@ -265,9 +277,11 @@ PageView* page_view_new (Page* page) {
Page* page_view_get_page (PageView* self) {
Page* result = NULL;
Page* _tmp0_;
+ Page* _tmp1_;
g_return_val_if_fail (self != NULL, NULL);
- _tmp0_ = _page_ref0 (self->priv->page);
- result = _tmp0_;
+ _tmp0_ = self->priv->page;
+ _tmp1_ = _page_ref0 (_tmp0_);
+ result = _tmp1_;
return result;
}
@@ -275,63 +289,89 @@ Page* page_view_get_page (PageView* self) {
void page_view_set_selected (PageView* self, gboolean selected) {
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_;
+ gboolean _tmp4_;
+ gboolean _tmp9_;
+ gboolean _tmp10_;
g_return_if_fail (self != NULL);
- if (self->priv->selected) {
- _tmp1_ = selected;
+ _tmp2_ = self->priv->selected;
+ if (_tmp2_) {
+ gboolean _tmp3_;
+ _tmp3_ = selected;
+ _tmp1_ = _tmp3_;
} else {
_tmp1_ = FALSE;
}
- if (_tmp1_) {
+ _tmp4_ = _tmp1_;
+ if (_tmp4_) {
_tmp0_ = TRUE;
} else {
- gboolean _tmp2_ = FALSE;
- if (!self->priv->selected) {
- _tmp2_ = !selected;
+ gboolean _tmp5_ = FALSE;
+ gboolean _tmp6_;
+ gboolean _tmp8_;
+ _tmp6_ = self->priv->selected;
+ if (!_tmp6_) {
+ gboolean _tmp7_;
+ _tmp7_ = selected;
+ _tmp5_ = !_tmp7_;
} else {
- _tmp2_ = FALSE;
+ _tmp5_ = FALSE;
}
- _tmp0_ = _tmp2_;
+ _tmp8_ = _tmp5_;
+ _tmp0_ = _tmp8_;
}
- if (_tmp0_) {
+ _tmp9_ = _tmp0_;
+ if (_tmp9_) {
return;
}
- self->priv->selected = selected;
+ _tmp10_ = selected;
+ self->priv->selected = _tmp10_;
g_signal_emit_by_name (self, "changed");
}
gboolean page_view_get_selected (PageView* self) {
gboolean result = FALSE;
+ gboolean _tmp0_;
g_return_val_if_fail (self != NULL, FALSE);
- result = self->priv->selected;
+ _tmp0_ = self->priv->selected;
+ result = _tmp0_;
return result;
}
void page_view_set_x_offset (PageView* self, gint offset) {
+ gint _tmp0_;
g_return_if_fail (self != NULL);
- self->priv->x_offset = offset;
+ _tmp0_ = offset;
+ self->priv->x_offset = _tmp0_;
}
void page_view_set_y_offset (PageView* self, gint offset) {
+ gint _tmp0_;
g_return_if_fail (self != NULL);
- self->priv->y_offset = offset;
+ _tmp0_ = offset;
+ self->priv->y_offset = _tmp0_;
}
gint page_view_get_x_offset (PageView* self) {
gint result = 0;
+ gint _tmp0_;
g_return_val_if_fail (self != NULL, 0);
- result = self->priv->x_offset;
+ _tmp0_ = self->priv->x_offset;
+ result = _tmp0_;
return result;
}
gint page_view_get_y_offset (PageView* self) {
gint result = 0;
+ gint _tmp0_;
g_return_val_if_fail (self != NULL, 0);
- result = self->priv->y_offset;
+ _tmp0_ = self->priv->y_offset;
+ result = _tmp0_;
return result;
}
@@ -345,318 +385,1042 @@ static guchar page_view_get_sample (PageView* self, guchar* pixels, int pixels_l
static void page_view_get_pixel (PageView* self, Page* page, gint x, gint y, guchar* pixel, int pixel_length1) {
- ScanDirection _tmp0_;
- gint _tmp5_;
+ Page* _tmp0_;
+ ScanDirection _tmp1_ = 0;
+ Page* _tmp18_;
+ gint _tmp19_ = 0;
gint depth;
- gint _tmp6_;
+ Page* _tmp20_;
+ gint _tmp21_ = 0;
gint n_channels;
- gint _tmp7_;
- guchar* _tmp8_ = NULL;
+ Page* _tmp22_;
+ gint _tmp23_ = 0;
+ guchar* _tmp24_ = NULL;
guchar* pixels;
gint pixels_length1;
gint _pixels_size_;
- gint _tmp9_;
+ Page* _tmp25_;
+ gint _tmp26_ = 0;
+ gint _tmp27_;
gint offset;
- gboolean _tmp10_ = FALSE;
- guchar _tmp16_;
- guchar _tmp17_;
- guchar _tmp18_;
+ gboolean _tmp28_ = FALSE;
+ gint _tmp29_;
+ gboolean _tmp31_;
+ guchar* _tmp102_;
+ gint _tmp102__length1;
+ guchar* _tmp103_;
+ gint _tmp103__length1;
+ gint _tmp104_;
+ gint _tmp105_;
+ gint _tmp106_;
+ gint _tmp107_;
+ gint _tmp108_;
+ guchar _tmp109_ = '\0';
+ guchar _tmp110_;
+ guchar* _tmp111_;
+ gint _tmp111__length1;
+ guchar* _tmp112_;
+ gint _tmp112__length1;
+ gint _tmp113_;
+ gint _tmp114_;
+ gint _tmp115_;
+ gint _tmp116_;
+ gint _tmp117_;
+ guchar _tmp118_ = '\0';
+ guchar _tmp119_;
+ guchar* _tmp120_;
+ gint _tmp120__length1;
+ guchar* _tmp121_;
+ gint _tmp121__length1;
+ gint _tmp122_;
+ gint _tmp123_;
+ gint _tmp124_;
+ gint _tmp125_;
+ gint _tmp126_;
+ guchar _tmp127_ = '\0';
+ guchar _tmp128_;
g_return_if_fail (self != NULL);
g_return_if_fail (page != NULL);
- _tmp0_ = page_get_scan_direction (page);
- switch (_tmp0_) {
+ _tmp0_ = page;
+ _tmp1_ = page_get_scan_direction (_tmp0_);
+ switch (_tmp1_) {
case SCAN_DIRECTION_TOP_TO_BOTTOM:
{
break;
}
case SCAN_DIRECTION_BOTTOM_TO_TOP:
{
- gint _tmp1_;
- gint _tmp2_;
- _tmp1_ = page_get_scan_width (page);
- x = (_tmp1_ - x) - 1;
- _tmp2_ = page_get_scan_height (page);
- y = (_tmp2_ - y) - 1;
+ Page* _tmp2_;
+ gint _tmp3_ = 0;
+ gint _tmp4_;
+ Page* _tmp5_;
+ gint _tmp6_ = 0;
+ gint _tmp7_;
+ _tmp2_ = page;
+ _tmp3_ = page_get_scan_width (_tmp2_);
+ _tmp4_ = x;
+ x = (_tmp3_ - _tmp4_) - 1;
+ _tmp5_ = page;
+ _tmp6_ = page_get_scan_height (_tmp5_);
+ _tmp7_ = y;
+ y = (_tmp6_ - _tmp7_) - 1;
break;
}
case SCAN_DIRECTION_LEFT_TO_RIGHT:
{
+ gint _tmp8_;
gint t;
- gint _tmp3_;
- t = x;
- _tmp3_ = page_get_scan_width (page);
- x = (_tmp3_ - y) - 1;
- y = t;
+ Page* _tmp9_;
+ gint _tmp10_ = 0;
+ gint _tmp11_;
+ gint _tmp12_;
+ _tmp8_ = x;
+ t = _tmp8_;
+ _tmp9_ = page;
+ _tmp10_ = page_get_scan_width (_tmp9_);
+ _tmp11_ = y;
+ x = (_tmp10_ - _tmp11_) - 1;
+ _tmp12_ = t;
+ y = _tmp12_;
break;
}
case SCAN_DIRECTION_RIGHT_TO_LEFT:
{
+ gint _tmp13_;
gint t;
- gint _tmp4_;
- t = x;
- x = y;
- _tmp4_ = page_get_scan_height (page);
- y = (_tmp4_ - t) - 1;
+ gint _tmp14_;
+ Page* _tmp15_;
+ gint _tmp16_ = 0;
+ gint _tmp17_;
+ _tmp13_ = x;
+ t = _tmp13_;
+ _tmp14_ = y;
+ x = _tmp14_;
+ _tmp15_ = page;
+ _tmp16_ = page_get_scan_height (_tmp15_);
+ _tmp17_ = t;
+ y = (_tmp16_ - _tmp17_) - 1;
break;
}
default:
break;
}
- _tmp5_ = page_get_depth (page);
- depth = _tmp5_;
- _tmp6_ = page_get_n_channels (page);
- n_channels = _tmp6_;
- _tmp8_ = page_get_pixels (page, &_tmp7_);
- pixels = _tmp8_;
- pixels_length1 = _tmp7_;
+ _tmp18_ = page;
+ _tmp19_ = page_get_depth (_tmp18_);
+ depth = _tmp19_;
+ _tmp20_ = page;
+ _tmp21_ = page_get_n_channels (_tmp20_);
+ n_channels = _tmp21_;
+ _tmp22_ = page;
+ _tmp24_ = page_get_pixels (_tmp22_, &_tmp23_);
+ pixels = _tmp24_;
+ pixels_length1 = _tmp23_;
_pixels_size_ = pixels_length1;
- _tmp9_ = page_get_rowstride (page);
- offset = _tmp9_ * y;
- if (depth == 8) {
- _tmp10_ = n_channels == 3;
+ _tmp25_ = page;
+ _tmp26_ = page_get_rowstride (_tmp25_);
+ _tmp27_ = y;
+ offset = _tmp26_ * _tmp27_;
+ _tmp29_ = depth;
+ if (_tmp29_ == 8) {
+ gint _tmp30_;
+ _tmp30_ = n_channels;
+ _tmp28_ = _tmp30_ == 3;
} else {
- _tmp10_ = FALSE;
+ _tmp28_ = FALSE;
}
- if (_tmp10_) {
+ _tmp31_ = _tmp28_;
+ if (_tmp31_) {
+ gint _tmp32_;
+ gint _tmp33_;
+ gint _tmp34_;
gint o;
- o = offset + (x * n_channels);
- pixel[0] = pixels[o];
- pixel[1] = pixels[o + 1];
- pixel[2] = pixels[o + 2];
+ guchar* _tmp35_;
+ gint _tmp35__length1;
+ guchar* _tmp36_;
+ gint _tmp36__length1;
+ gint _tmp37_;
+ guchar _tmp38_;
+ guchar _tmp39_;
+ guchar* _tmp40_;
+ gint _tmp40__length1;
+ guchar* _tmp41_;
+ gint _tmp41__length1;
+ gint _tmp42_;
+ guchar _tmp43_;
+ guchar _tmp44_;
+ guchar* _tmp45_;
+ gint _tmp45__length1;
+ guchar* _tmp46_;
+ gint _tmp46__length1;
+ gint _tmp47_;
+ guchar _tmp48_;
+ guchar _tmp49_;
+ _tmp32_ = offset;
+ _tmp33_ = x;
+ _tmp34_ = n_channels;
+ o = _tmp32_ + (_tmp33_ * _tmp34_);
+ _tmp35_ = pixel;
+ _tmp35__length1 = pixel_length1;
+ _tmp36_ = pixels;
+ _tmp36__length1 = pixels_length1;
+ _tmp37_ = o;
+ _tmp38_ = _tmp36_[_tmp37_];
+ _tmp35_[0] = _tmp38_;
+ _tmp39_ = _tmp35_[0];
+ _tmp40_ = pixel;
+ _tmp40__length1 = pixel_length1;
+ _tmp41_ = pixels;
+ _tmp41__length1 = pixels_length1;
+ _tmp42_ = o;
+ _tmp43_ = _tmp41_[_tmp42_ + 1];
+ _tmp40_[1] = _tmp43_;
+ _tmp44_ = _tmp40_[1];
+ _tmp45_ = pixel;
+ _tmp45__length1 = pixel_length1;
+ _tmp46_ = pixels;
+ _tmp46__length1 = pixels_length1;
+ _tmp47_ = o;
+ _tmp48_ = _tmp46_[_tmp47_ + 2];
+ _tmp45_[2] = _tmp48_;
+ _tmp49_ = _tmp45_[2];
return;
} else {
- gboolean _tmp11_ = FALSE;
- if (depth == 8) {
- _tmp11_ = n_channels == 1;
+ gboolean _tmp50_ = FALSE;
+ gint _tmp51_;
+ gboolean _tmp53_;
+ _tmp51_ = depth;
+ if (_tmp51_ == 8) {
+ gint _tmp52_;
+ _tmp52_ = n_channels;
+ _tmp50_ = _tmp52_ == 1;
} else {
- _tmp11_ = FALSE;
+ _tmp50_ = FALSE;
}
- if (_tmp11_) {
- pixel[2] = pixels[offset + x];
- pixel[1] = pixel[2];
- pixel[0] = pixel[1];
+ _tmp53_ = _tmp50_;
+ if (_tmp53_) {
+ guchar* _tmp54_;
+ gint _tmp54__length1;
+ guchar* _tmp55_;
+ gint _tmp55__length1;
+ guchar* _tmp56_;
+ gint _tmp56__length1;
+ guchar* _tmp57_;
+ gint _tmp57__length1;
+ gint _tmp58_;
+ gint _tmp59_;
+ guchar _tmp60_;
+ guchar _tmp61_;
+ guchar _tmp62_;
+ guchar _tmp63_;
+ _tmp54_ = pixel;
+ _tmp54__length1 = pixel_length1;
+ _tmp55_ = pixel;
+ _tmp55__length1 = pixel_length1;
+ _tmp56_ = pixel;
+ _tmp56__length1 = pixel_length1;
+ _tmp57_ = pixels;
+ _tmp57__length1 = pixels_length1;
+ _tmp58_ = offset;
+ _tmp59_ = x;
+ _tmp60_ = _tmp57_[_tmp58_ + _tmp59_];
+ _tmp56_[2] = _tmp60_;
+ _tmp61_ = _tmp56_[2];
+ _tmp55_[1] = _tmp61_;
+ _tmp62_ = _tmp55_[1];
+ _tmp54_[0] = _tmp62_;
+ _tmp63_ = _tmp54_[0];
return;
} else {
- gboolean _tmp12_ = FALSE;
- if (depth == 1) {
- _tmp12_ = n_channels == 1;
+ gboolean _tmp64_ = FALSE;
+ gint _tmp65_;
+ gboolean _tmp67_;
+ _tmp65_ = depth;
+ if (_tmp65_ == 1) {
+ gint _tmp66_;
+ _tmp66_ = n_channels;
+ _tmp64_ = _tmp66_ == 1;
} else {
- _tmp12_ = FALSE;
+ _tmp64_ = FALSE;
}
- if (_tmp12_) {
+ _tmp67_ = _tmp64_;
+ if (_tmp67_) {
+ gint _tmp68_;
+ gint _tmp69_;
gint o;
- gint _tmp13_ = 0;
- o = offset + (x / 8);
- if (((gint) (pixels[o] & (0x80 >> (x % 8)))) != 0) {
- _tmp13_ = 0x00;
+ gint _tmp70_ = 0;
+ guchar* _tmp71_;
+ gint _tmp71__length1;
+ gint _tmp72_;
+ guchar _tmp73_;
+ gint _tmp74_;
+ guchar* _tmp75_;
+ gint _tmp75__length1;
+ guchar* _tmp76_;
+ gint _tmp76__length1;
+ guchar* _tmp77_;
+ gint _tmp77__length1;
+ gint _tmp78_;
+ guchar _tmp79_;
+ guchar _tmp80_;
+ guchar _tmp81_;
+ _tmp68_ = offset;
+ _tmp69_ = x;
+ o = _tmp68_ + (_tmp69_ / 8);
+ _tmp71_ = pixels;
+ _tmp71__length1 = pixels_length1;
+ _tmp72_ = o;
+ _tmp73_ = _tmp71_[_tmp72_];
+ _tmp74_ = x;
+ if (((gint) (_tmp73_ & (0x80 >> (_tmp74_ % 8)))) != 0) {
+ _tmp70_ = 0x00;
} else {
- _tmp13_ = 0xFF;
+ _tmp70_ = 0xFF;
}
- pixel[2] = (guchar) _tmp13_;
- pixel[1] = pixel[2];
- pixel[0] = pixel[1];
+ _tmp75_ = pixel;
+ _tmp75__length1 = pixel_length1;
+ _tmp76_ = pixel;
+ _tmp76__length1 = pixel_length1;
+ _tmp77_ = pixel;
+ _tmp77__length1 = pixel_length1;
+ _tmp78_ = _tmp70_;
+ _tmp77_[2] = (guchar) _tmp78_;
+ _tmp79_ = _tmp77_[2];
+ _tmp76_[1] = _tmp79_;
+ _tmp80_ = _tmp76_[1];
+ _tmp75_[0] = _tmp80_;
+ _tmp81_ = _tmp75_[0];
return;
} else {
- gboolean _tmp14_ = FALSE;
- if (depth == 2) {
- _tmp14_ = n_channels == 1;
+ gboolean _tmp82_ = FALSE;
+ gint _tmp83_;
+ gboolean _tmp85_;
+ _tmp83_ = depth;
+ if (_tmp83_ == 2) {
+ gint _tmp84_;
+ _tmp84_ = n_channels;
+ _tmp82_ = _tmp84_ == 1;
} else {
- _tmp14_ = FALSE;
+ _tmp82_ = FALSE;
}
- if (_tmp14_) {
- gint _tmp15_[4] = {0};
+ _tmp85_ = _tmp82_;
+ if (_tmp85_) {
+ gint _tmp86_[4] = {0};
gint block_shift[4];
+ gint _tmp87_;
+ gint _tmp88_;
gint o;
+ guchar* _tmp89_;
+ gint _tmp89__length1;
+ gint _tmp90_;
+ guchar _tmp91_;
+ gint _tmp92_;
+ gint _tmp93_;
gint sample;
- _tmp15_[0] = 6;
- _tmp15_[1] = 4;
- _tmp15_[2] = 2;
- _tmp15_[3] = 0;
- memcpy (block_shift, _tmp15_, 4 * sizeof (gint));
- o = offset + (x / 4);
- sample = (pixels[o] >> block_shift[x % 4]) & 0x3;
- sample = (sample * 255) / 3;
- pixel[2] = (guchar) sample;
- pixel[1] = pixel[2];
- pixel[0] = pixel[1];
+ gint _tmp94_;
+ guchar* _tmp95_;
+ gint _tmp95__length1;
+ guchar* _tmp96_;
+ gint _tmp96__length1;
+ guchar* _tmp97_;
+ gint _tmp97__length1;
+ gint _tmp98_;
+ guchar _tmp99_;
+ guchar _tmp100_;
+ guchar _tmp101_;
+ _tmp86_[0] = 6;
+ _tmp86_[1] = 4;
+ _tmp86_[2] = 2;
+ _tmp86_[3] = 0;
+ memcpy (block_shift, _tmp86_, 4 * sizeof (gint));
+ _tmp87_ = offset;
+ _tmp88_ = x;
+ o = _tmp87_ + (_tmp88_ / 4);
+ _tmp89_ = pixels;
+ _tmp89__length1 = pixels_length1;
+ _tmp90_ = o;
+ _tmp91_ = _tmp89_[_tmp90_];
+ _tmp92_ = x;
+ _tmp93_ = block_shift[_tmp92_ % 4];
+ sample = (_tmp91_ >> _tmp93_) & 0x3;
+ _tmp94_ = sample;
+ sample = (_tmp94_ * 255) / 3;
+ _tmp95_ = pixel;
+ _tmp95__length1 = pixel_length1;
+ _tmp96_ = pixel;
+ _tmp96__length1 = pixel_length1;
+ _tmp97_ = pixel;
+ _tmp97__length1 = pixel_length1;
+ _tmp98_ = sample;
+ _tmp97_[2] = (guchar) _tmp98_;
+ _tmp99_ = _tmp97_[2];
+ _tmp96_[1] = _tmp99_;
+ _tmp100_ = _tmp96_[1];
+ _tmp95_[0] = _tmp100_;
+ _tmp101_ = _tmp95_[0];
return;
}
}
}
}
- _tmp16_ = page_view_get_sample (self, pixels, pixels_length1, offset, x, depth, x * n_channels);
- pixel[0] = _tmp16_;
- _tmp17_ = page_view_get_sample (self, pixels, pixels_length1, offset, x, depth, (x * n_channels) + 1);
- pixel[1] = _tmp17_;
- _tmp18_ = page_view_get_sample (self, pixels, pixels_length1, offset, x, depth, (x * n_channels) + 2);
- pixel[2] = _tmp18_;
+ _tmp102_ = pixel;
+ _tmp102__length1 = pixel_length1;
+ _tmp103_ = pixels;
+ _tmp103__length1 = pixels_length1;
+ _tmp104_ = offset;
+ _tmp105_ = x;
+ _tmp106_ = depth;
+ _tmp107_ = x;
+ _tmp108_ = n_channels;
+ _tmp109_ = page_view_get_sample (self, _tmp103_, _tmp103__length1, _tmp104_, _tmp105_, _tmp106_, _tmp107_ * _tmp108_);
+ _tmp102_[0] = _tmp109_;
+ _tmp110_ = _tmp102_[0];
+ _tmp111_ = pixel;
+ _tmp111__length1 = pixel_length1;
+ _tmp112_ = pixels;
+ _tmp112__length1 = pixels_length1;
+ _tmp113_ = offset;
+ _tmp114_ = x;
+ _tmp115_ = depth;
+ _tmp116_ = x;
+ _tmp117_ = n_channels;
+ _tmp118_ = page_view_get_sample (self, _tmp112_, _tmp112__length1, _tmp113_, _tmp114_, _tmp115_, (_tmp116_ * _tmp117_) + 1);
+ _tmp111_[1] = _tmp118_;
+ _tmp119_ = _tmp111_[1];
+ _tmp120_ = pixel;
+ _tmp120__length1 = pixel_length1;
+ _tmp121_ = pixels;
+ _tmp121__length1 = pixels_length1;
+ _tmp122_ = offset;
+ _tmp123_ = x;
+ _tmp124_ = depth;
+ _tmp125_ = x;
+ _tmp126_ = n_channels;
+ _tmp127_ = page_view_get_sample (self, _tmp121_, _tmp121__length1, _tmp122_, _tmp123_, _tmp124_, (_tmp125_ * _tmp126_) + 2);
+ _tmp120_[2] = _tmp127_;
+ _tmp128_ = _tmp120_[2];
}
static void page_view_set_pixel (PageView* self, Page* page, gdouble l, gdouble r, gdouble t, gdouble b, guchar* output, int output_length1, gint offset) {
+ gdouble _tmp0_;
gint L;
+ gint _tmp1_;
+ gdouble _tmp2_;
+ gdouble _tmp4_;
gint R;
+ gdouble _tmp5_;
gint T;
+ gint _tmp6_;
+ gdouble _tmp7_;
+ gdouble _tmp9_;
gint B;
gdouble red;
gdouble green;
gdouble blue;
- gboolean _tmp0_ = FALSE;
- gboolean _tmp1_ = FALSE;
gboolean _tmp10_ = FALSE;
gboolean _tmp11_ = FALSE;
- gboolean _tmp12_ = FALSE;
- gboolean _tmp13_ = FALSE;
+ gdouble _tmp12_;
+ gdouble _tmp13_;
+ gboolean _tmp16_;
+ gboolean _tmp23_;
+ gboolean _tmp293_ = FALSE;
+ gdouble _tmp294_;
+ gint _tmp295_;
+ gboolean _tmp298_;
+ gboolean _tmp320_ = FALSE;
+ gdouble _tmp321_;
+ gint _tmp322_;
+ gboolean _tmp325_;
+ gboolean _tmp347_ = FALSE;
+ gdouble _tmp348_;
+ gint _tmp349_;
+ gboolean _tmp352_;
+ gboolean _tmp374_ = FALSE;
+ gdouble _tmp375_;
+ gint _tmp376_;
+ gboolean _tmp379_;
+ gdouble _tmp401_;
+ gdouble _tmp402_;
+ gdouble _tmp403_;
+ gdouble _tmp404_;
gdouble scale;
+ guchar* _tmp405_;
+ gint _tmp405__length1;
+ gint _tmp406_;
+ gdouble _tmp407_;
+ gdouble _tmp408_;
+ guchar _tmp409_;
+ guchar* _tmp410_;
+ gint _tmp410__length1;
+ gint _tmp411_;
+ gdouble _tmp412_;
+ gdouble _tmp413_;
+ guchar _tmp414_;
+ guchar* _tmp415_;
+ gint _tmp415__length1;
+ gint _tmp416_;
+ gdouble _tmp417_;
+ gdouble _tmp418_;
+ guchar _tmp419_;
g_return_if_fail (self != NULL);
g_return_if_fail (page != NULL);
- L = (gint) l;
- if (((gdouble) L) != l) {
- L++;
+ _tmp0_ = l;
+ L = (gint) _tmp0_;
+ _tmp1_ = L;
+ _tmp2_ = l;
+ if (((gdouble) _tmp1_) != _tmp2_) {
+ gint _tmp3_;
+ _tmp3_ = L;
+ L = _tmp3_ + 1;
}
- R = (gint) r;
- T = (gint) t;
- if (((gdouble) T) != t) {
- T++;
+ _tmp4_ = r;
+ R = (gint) _tmp4_;
+ _tmp5_ = t;
+ T = (gint) _tmp5_;
+ _tmp6_ = T;
+ _tmp7_ = t;
+ if (((gdouble) _tmp6_) != _tmp7_) {
+ gint _tmp8_;
+ _tmp8_ = T;
+ T = _tmp8_ + 1;
}
- B = (gint) b;
+ _tmp9_ = b;
+ B = (gint) _tmp9_;
red = 0.0;
green = 0.0;
blue = 0.0;
- if ((r - l) <= 1.0) {
- _tmp1_ = ((gint) r) == ((gint) l);
+ _tmp12_ = r;
+ _tmp13_ = l;
+ if ((_tmp12_ - _tmp13_) <= 1.0) {
+ gdouble _tmp14_;
+ gdouble _tmp15_;
+ _tmp14_ = r;
+ _tmp15_ = l;
+ _tmp11_ = ((gint) _tmp14_) == ((gint) _tmp15_);
} else {
- _tmp1_ = FALSE;
+ _tmp11_ = FALSE;
}
- if (_tmp1_) {
- _tmp0_ = TRUE;
+ _tmp16_ = _tmp11_;
+ if (_tmp16_) {
+ _tmp10_ = TRUE;
} else {
- gboolean _tmp2_ = FALSE;
- if ((b - t) <= 1.0) {
- _tmp2_ = ((gint) b) == ((gint) t);
+ gboolean _tmp17_ = FALSE;
+ gdouble _tmp18_;
+ gdouble _tmp19_;
+ gboolean _tmp22_;
+ _tmp18_ = b;
+ _tmp19_ = t;
+ if ((_tmp18_ - _tmp19_) <= 1.0) {
+ gdouble _tmp20_;
+ gdouble _tmp21_;
+ _tmp20_ = b;
+ _tmp21_ = t;
+ _tmp17_ = ((gint) _tmp20_) == ((gint) _tmp21_);
} else {
- _tmp2_ = FALSE;
+ _tmp17_ = FALSE;
}
- _tmp0_ = _tmp2_;
+ _tmp22_ = _tmp17_;
+ _tmp10_ = _tmp22_;
}
- if (_tmp0_) {
- gboolean _tmp3_ = FALSE;
+ _tmp23_ = _tmp10_;
+ if (_tmp23_) {
+ gboolean _tmp24_ = FALSE;
+ gdouble _tmp25_;
+ gdouble _tmp26_;
+ gboolean _tmp29_;
+ gint _tmp45_;
+ gint _tmp46_;
+ gdouble _tmp173_;
+ gdouble _tmp174_;
+ gdouble _tmp175_;
+ gdouble _tmp176_;
gdouble scale;
- if (((gint) l) == ((gint) r)) {
- _tmp3_ = TRUE;
+ guchar* _tmp177_;
+ gint _tmp177__length1;
+ gint _tmp178_;
+ gdouble _tmp179_;
+ gdouble _tmp180_;
+ guchar _tmp181_;
+ guchar* _tmp182_;
+ gint _tmp182__length1;
+ gint _tmp183_;
+ gdouble _tmp184_;
+ gdouble _tmp185_;
+ guchar _tmp186_;
+ guchar* _tmp187_;
+ gint _tmp187__length1;
+ gint _tmp188_;
+ gdouble _tmp189_;
+ gdouble _tmp190_;
+ guchar _tmp191_;
+ _tmp25_ = l;
+ _tmp26_ = r;
+ if (((gint) _tmp25_) == ((gint) _tmp26_)) {
+ _tmp24_ = TRUE;
} else {
- _tmp3_ = ((gint) t) == ((gint) b);
+ gdouble _tmp27_;
+ gdouble _tmp28_;
+ _tmp27_ = t;
+ _tmp28_ = b;
+ _tmp24_ = ((gint) _tmp27_) == ((gint) _tmp28_);
}
- if (_tmp3_) {
+ _tmp29_ = _tmp24_;
+ if (_tmp29_) {
guchar p[3] = {0};
- page_view_get_pixel (self, page, (gint) l, (gint) t, p, 3);
- output[offset] = p[0];
- output[offset + 1] = p[1];
- output[offset + 2] = p[2];
+ Page* _tmp30_;
+ gdouble _tmp31_;
+ gdouble _tmp32_;
+ guchar* _tmp33_;
+ gint _tmp33__length1;
+ gint _tmp34_;
+ guchar _tmp35_;
+ guchar _tmp36_;
+ guchar* _tmp37_;
+ gint _tmp37__length1;
+ gint _tmp38_;
+ guchar _tmp39_;
+ guchar _tmp40_;
+ guchar* _tmp41_;
+ gint _tmp41__length1;
+ gint _tmp42_;
+ guchar _tmp43_;
+ guchar _tmp44_;
+ _tmp30_ = page;
+ _tmp31_ = l;
+ _tmp32_ = t;
+ page_view_get_pixel (self, _tmp30_, (gint) _tmp31_, (gint) _tmp32_, p, 3);
+ _tmp33_ = output;
+ _tmp33__length1 = output_length1;
+ _tmp34_ = offset;
+ _tmp35_ = p[0];
+ _tmp33_[_tmp34_] = _tmp35_;
+ _tmp36_ = _tmp33_[_tmp34_];
+ _tmp37_ = output;
+ _tmp37__length1 = output_length1;
+ _tmp38_ = offset;
+ _tmp39_ = p[1];
+ _tmp37_[_tmp38_ + 1] = _tmp39_;
+ _tmp40_ = _tmp37_[_tmp38_ + 1];
+ _tmp41_ = output;
+ _tmp41__length1 = output_length1;
+ _tmp42_ = offset;
+ _tmp43_ = p[2];
+ _tmp41_[_tmp42_ + 2] = _tmp43_;
+ _tmp44_ = _tmp41_[_tmp42_ + 2];
return;
}
- if (L > R) {
+ _tmp45_ = L;
+ _tmp46_ = R;
+ if (_tmp45_ > _tmp46_) {
guchar p[3] = {0};
- page_view_get_pixel (self, page, R, T - 1, p, 3);
- red = red + ((p[0] * (r - l)) * (T - t));
- green = green + ((p[1] * (r - l)) * (T - t));
- blue = blue + ((p[2] * (r - l)) * (T - t));
+ Page* _tmp47_;
+ gint _tmp48_;
+ gint _tmp49_;
+ gdouble _tmp50_;
+ guchar _tmp51_;
+ gdouble _tmp52_;
+ gdouble _tmp53_;
+ gint _tmp54_;
+ gdouble _tmp55_;
+ gdouble _tmp56_;
+ guchar _tmp57_;
+ gdouble _tmp58_;
+ gdouble _tmp59_;
+ gint _tmp60_;
+ gdouble _tmp61_;
+ gdouble _tmp62_;
+ guchar _tmp63_;
+ gdouble _tmp64_;
+ gdouble _tmp65_;
+ gint _tmp66_;
+ gdouble _tmp67_;
+ Page* _tmp89_;
+ gint _tmp90_;
+ gint _tmp91_;
+ gdouble _tmp92_;
+ guchar _tmp93_;
+ gdouble _tmp94_;
+ gdouble _tmp95_;
+ gdouble _tmp96_;
+ gint _tmp97_;
+ gdouble _tmp98_;
+ guchar _tmp99_;
+ gdouble _tmp100_;
+ gdouble _tmp101_;
+ gdouble _tmp102_;
+ gint _tmp103_;
+ gdouble _tmp104_;
+ guchar _tmp105_;
+ gdouble _tmp106_;
+ gdouble _tmp107_;
+ gdouble _tmp108_;
+ gint _tmp109_;
+ _tmp47_ = page;
+ _tmp48_ = R;
+ _tmp49_ = T;
+ page_view_get_pixel (self, _tmp47_, _tmp48_, _tmp49_ - 1, p, 3);
+ _tmp50_ = red;
+ _tmp51_ = p[0];
+ _tmp52_ = r;
+ _tmp53_ = l;
+ _tmp54_ = T;
+ _tmp55_ = t;
+ red = _tmp50_ + ((_tmp51_ * (_tmp52_ - _tmp53_)) * (_tmp54_ - _tmp55_));
+ _tmp56_ = green;
+ _tmp57_ = p[1];
+ _tmp58_ = r;
+ _tmp59_ = l;
+ _tmp60_ = T;
+ _tmp61_ = t;
+ green = _tmp56_ + ((_tmp57_ * (_tmp58_ - _tmp59_)) * (_tmp60_ - _tmp61_));
+ _tmp62_ = blue;
+ _tmp63_ = p[2];
+ _tmp64_ = r;
+ _tmp65_ = l;
+ _tmp66_ = T;
+ _tmp67_ = t;
+ blue = _tmp62_ + ((_tmp63_ * (_tmp64_ - _tmp65_)) * (_tmp66_ - _tmp67_));
{
+ gint _tmp68_;
gint y;
- y = T;
+ _tmp68_ = T;
+ y = _tmp68_;
{
- gboolean _tmp4_;
- _tmp4_ = TRUE;
+ gboolean _tmp69_;
+ _tmp69_ = TRUE;
while (TRUE) {
- if (!_tmp4_) {
- y++;
+ gboolean _tmp70_;
+ gint _tmp72_;
+ gint _tmp73_;
+ Page* _tmp74_;
+ gint _tmp75_;
+ gint _tmp76_;
+ gdouble _tmp77_;
+ guchar _tmp78_;
+ gdouble _tmp79_;
+ gdouble _tmp80_;
+ gdouble _tmp81_;
+ guchar _tmp82_;
+ gdouble _tmp83_;
+ gdouble _tmp84_;
+ gdouble _tmp85_;
+ guchar _tmp86_;
+ gdouble _tmp87_;
+ gdouble _tmp88_;
+ _tmp70_ = _tmp69_;
+ if (!_tmp70_) {
+ gint _tmp71_;
+ _tmp71_ = y;
+ y = _tmp71_ + 1;
}
- _tmp4_ = FALSE;
- if (!(y < B)) {
+ _tmp69_ = FALSE;
+ _tmp72_ = y;
+ _tmp73_ = B;
+ if (!(_tmp72_ < _tmp73_)) {
break;
}
- page_view_get_pixel (self, page, R, y, p, 3);
- red = red + (p[0] * (r - l));
- green = green + (p[1] * (r - l));
- blue = blue + (p[2] * (r - l));
+ _tmp74_ = page;
+ _tmp75_ = R;
+ _tmp76_ = y;
+ page_view_get_pixel (self, _tmp74_, _tmp75_, _tmp76_, p, 3);
+ _tmp77_ = red;
+ _tmp78_ = p[0];
+ _tmp79_ = r;
+ _tmp80_ = l;
+ red = _tmp77_ + (_tmp78_ * (_tmp79_ - _tmp80_));
+ _tmp81_ = green;
+ _tmp82_ = p[1];
+ _tmp83_ = r;
+ _tmp84_ = l;
+ green = _tmp81_ + (_tmp82_ * (_tmp83_ - _tmp84_));
+ _tmp85_ = blue;
+ _tmp86_ = p[2];
+ _tmp87_ = r;
+ _tmp88_ = l;
+ blue = _tmp85_ + (_tmp86_ * (_tmp87_ - _tmp88_));
}
}
}
- page_view_get_pixel (self, page, R, B, p, 3);
- red = red + ((p[0] * (r - l)) * (b - B));
- green = green + ((p[1] * (r - l)) * (b - B));
- blue = blue + ((p[2] * (r - l)) * (b - B));
+ _tmp89_ = page;
+ _tmp90_ = R;
+ _tmp91_ = B;
+ page_view_get_pixel (self, _tmp89_, _tmp90_, _tmp91_, p, 3);
+ _tmp92_ = red;
+ _tmp93_ = p[0];
+ _tmp94_ = r;
+ _tmp95_ = l;
+ _tmp96_ = b;
+ _tmp97_ = B;
+ red = _tmp92_ + ((_tmp93_ * (_tmp94_ - _tmp95_)) * (_tmp96_ - _tmp97_));
+ _tmp98_ = green;
+ _tmp99_ = p[1];
+ _tmp100_ = r;
+ _tmp101_ = l;
+ _tmp102_ = b;
+ _tmp103_ = B;
+ green = _tmp98_ + ((_tmp99_ * (_tmp100_ - _tmp101_)) * (_tmp102_ - _tmp103_));
+ _tmp104_ = blue;
+ _tmp105_ = p[2];
+ _tmp106_ = r;
+ _tmp107_ = l;
+ _tmp108_ = b;
+ _tmp109_ = B;
+ blue = _tmp104_ + ((_tmp105_ * (_tmp106_ - _tmp107_)) * (_tmp108_ - _tmp109_));
} else {
guchar p[3] = {0};
- page_view_get_pixel (self, page, L - 1, B, p, 3);
- red = red + ((p[0] * (b - t)) * (L - l));
- green = green + ((p[1] * (b - t)) * (L - l));
- blue = blue + ((p[2] * (b - t)) * (L - l));
+ Page* _tmp110_;
+ gint _tmp111_;
+ gint _tmp112_;
+ gdouble _tmp113_;
+ guchar _tmp114_;
+ gdouble _tmp115_;
+ gdouble _tmp116_;
+ gint _tmp117_;
+ gdouble _tmp118_;
+ gdouble _tmp119_;
+ guchar _tmp120_;
+ gdouble _tmp121_;
+ gdouble _tmp122_;
+ gint _tmp123_;
+ gdouble _tmp124_;
+ gdouble _tmp125_;
+ guchar _tmp126_;
+ gdouble _tmp127_;
+ gdouble _tmp128_;
+ gint _tmp129_;
+ gdouble _tmp130_;
+ Page* _tmp152_;
+ gint _tmp153_;
+ gint _tmp154_;
+ gdouble _tmp155_;
+ guchar _tmp156_;
+ gdouble _tmp157_;
+ gdouble _tmp158_;
+ gdouble _tmp159_;
+ gint _tmp160_;
+ gdouble _tmp161_;
+ guchar _tmp162_;
+ gdouble _tmp163_;
+ gdouble _tmp164_;
+ gdouble _tmp165_;
+ gint _tmp166_;
+ gdouble _tmp167_;
+ guchar _tmp168_;
+ gdouble _tmp169_;
+ gdouble _tmp170_;
+ gdouble _tmp171_;
+ gint _tmp172_;
+ _tmp110_ = page;
+ _tmp111_ = L;
+ _tmp112_ = B;
+ page_view_get_pixel (self, _tmp110_, _tmp111_ - 1, _tmp112_, p, 3);
+ _tmp113_ = red;
+ _tmp114_ = p[0];
+ _tmp115_ = b;
+ _tmp116_ = t;
+ _tmp117_ = L;
+ _tmp118_ = l;
+ red = _tmp113_ + ((_tmp114_ * (_tmp115_ - _tmp116_)) * (_tmp117_ - _tmp118_));
+ _tmp119_ = green;
+ _tmp120_ = p[1];
+ _tmp121_ = b;
+ _tmp122_ = t;
+ _tmp123_ = L;
+ _tmp124_ = l;
+ green = _tmp119_ + ((_tmp120_ * (_tmp121_ - _tmp122_)) * (_tmp123_ - _tmp124_));
+ _tmp125_ = blue;
+ _tmp126_ = p[2];
+ _tmp127_ = b;
+ _tmp128_ = t;
+ _tmp129_ = L;
+ _tmp130_ = l;
+ blue = _tmp125_ + ((_tmp126_ * (_tmp127_ - _tmp128_)) * (_tmp129_ - _tmp130_));
{
+ gint _tmp131_;
gint x;
- x = L;
+ _tmp131_ = L;
+ x = _tmp131_;
{
- gboolean _tmp5_;
- _tmp5_ = TRUE;
+ gboolean _tmp132_;
+ _tmp132_ = TRUE;
while (TRUE) {
- if (!_tmp5_) {
- x++;
+ gboolean _tmp133_;
+ gint _tmp135_;
+ gint _tmp136_;
+ Page* _tmp137_;
+ gint _tmp138_;
+ gint _tmp139_;
+ gdouble _tmp140_;
+ guchar _tmp141_;
+ gdouble _tmp142_;
+ gdouble _tmp143_;
+ gdouble _tmp144_;
+ guchar _tmp145_;
+ gdouble _tmp146_;
+ gdouble _tmp147_;
+ gdouble _tmp148_;
+ guchar _tmp149_;
+ gdouble _tmp150_;
+ gdouble _tmp151_;
+ _tmp133_ = _tmp132_;
+ if (!_tmp133_) {
+ gint _tmp134_;
+ _tmp134_ = x;
+ x = _tmp134_ + 1;
}
- _tmp5_ = FALSE;
- if (!(x < R)) {
+ _tmp132_ = FALSE;
+ _tmp135_ = x;
+ _tmp136_ = R;
+ if (!(_tmp135_ < _tmp136_)) {
break;
}
- page_view_get_pixel (self, page, x, B, p, 3);
- red = red + (p[0] * (b - t));
- green = green + (p[1] * (b - t));
- blue = blue + (p[2] * (b - t));
+ _tmp137_ = page;
+ _tmp138_ = x;
+ _tmp139_ = B;
+ page_view_get_pixel (self, _tmp137_, _tmp138_, _tmp139_, p, 3);
+ _tmp140_ = red;
+ _tmp141_ = p[0];
+ _tmp142_ = b;
+ _tmp143_ = t;
+ red = _tmp140_ + (_tmp141_ * (_tmp142_ - _tmp143_));
+ _tmp144_ = green;
+ _tmp145_ = p[1];
+ _tmp146_ = b;
+ _tmp147_ = t;
+ green = _tmp144_ + (_tmp145_ * (_tmp146_ - _tmp147_));
+ _tmp148_ = blue;
+ _tmp149_ = p[2];
+ _tmp150_ = b;
+ _tmp151_ = t;
+ blue = _tmp148_ + (_tmp149_ * (_tmp150_ - _tmp151_));
}
}
}
- page_view_get_pixel (self, page, R, B, p, 3);
- red = red + ((p[0] * (b - t)) * (r - R));
- green = green + ((p[1] * (b - t)) * (r - R));
- blue = blue + ((p[2] * (b - t)) * (r - R));
+ _tmp152_ = page;
+ _tmp153_ = R;
+ _tmp154_ = B;
+ page_view_get_pixel (self, _tmp152_, _tmp153_, _tmp154_, p, 3);
+ _tmp155_ = red;
+ _tmp156_ = p[0];
+ _tmp157_ = b;
+ _tmp158_ = t;
+ _tmp159_ = r;
+ _tmp160_ = R;
+ red = _tmp155_ + ((_tmp156_ * (_tmp157_ - _tmp158_)) * (_tmp159_ - _tmp160_));
+ _tmp161_ = green;
+ _tmp162_ = p[1];
+ _tmp163_ = b;
+ _tmp164_ = t;
+ _tmp165_ = r;
+ _tmp166_ = R;
+ green = _tmp161_ + ((_tmp162_ * (_tmp163_ - _tmp164_)) * (_tmp165_ - _tmp166_));
+ _tmp167_ = blue;
+ _tmp168_ = p[2];
+ _tmp169_ = b;
+ _tmp170_ = t;
+ _tmp171_ = r;
+ _tmp172_ = R;
+ blue = _tmp167_ + ((_tmp168_ * (_tmp169_ - _tmp170_)) * (_tmp171_ - _tmp172_));
}
- scale = 1.0 / ((r - l) * (b - t));
- output[offset] = (guchar) ((red * scale) + 0.5);
- output[offset + 1] = (guchar) ((green * scale) + 0.5);
- output[offset + 2] = (guchar) ((blue * scale) + 0.5);
+ _tmp173_ = r;
+ _tmp174_ = l;
+ _tmp175_ = b;
+ _tmp176_ = t;
+ scale = 1.0 / ((_tmp173_ - _tmp174_) * (_tmp175_ - _tmp176_));
+ _tmp177_ = output;
+ _tmp177__length1 = output_length1;
+ _tmp178_ = offset;
+ _tmp179_ = red;
+ _tmp180_ = scale;
+ _tmp177_[_tmp178_] = (guchar) ((_tmp179_ * _tmp180_) + 0.5);
+ _tmp181_ = _tmp177_[_tmp178_];
+ _tmp182_ = output;
+ _tmp182__length1 = output_length1;
+ _tmp183_ = offset;
+ _tmp184_ = green;
+ _tmp185_ = scale;
+ _tmp182_[_tmp183_ + 1] = (guchar) ((_tmp184_ * _tmp185_) + 0.5);
+ _tmp186_ = _tmp182_[_tmp183_ + 1];
+ _tmp187_ = output;
+ _tmp187__length1 = output_length1;
+ _tmp188_ = offset;
+ _tmp189_ = blue;
+ _tmp190_ = scale;
+ _tmp187_[_tmp188_ + 2] = (guchar) ((_tmp189_ * _tmp190_) + 0.5);
+ _tmp191_ = _tmp187_[_tmp188_ + 2];
return;
}
{
+ gint _tmp192_;
gint x;
- x = L;
+ _tmp192_ = L;
+ x = _tmp192_;
{
- gboolean _tmp6_;
- _tmp6_ = TRUE;
+ gboolean _tmp193_;
+ _tmp193_ = TRUE;
while (TRUE) {
- if (!_tmp6_) {
- x++;
+ gboolean _tmp194_;
+ gint _tmp196_;
+ gint _tmp197_;
+ _tmp194_ = _tmp193_;
+ if (!_tmp194_) {
+ gint _tmp195_;
+ _tmp195_ = x;
+ x = _tmp195_ + 1;
}
- _tmp6_ = FALSE;
- if (!(x < R)) {
+ _tmp193_ = FALSE;
+ _tmp196_ = x;
+ _tmp197_ = R;
+ if (!(_tmp196_ < _tmp197_)) {
break;
}
{
+ gint _tmp198_;
gint y;
- y = T;
+ _tmp198_ = T;
+ y = _tmp198_;
{
- gboolean _tmp7_;
- _tmp7_ = TRUE;
+ gboolean _tmp199_;
+ _tmp199_ = TRUE;
while (TRUE) {
+ gboolean _tmp200_;
+ gint _tmp202_;
+ gint _tmp203_;
guchar p[3] = {0};
- if (!_tmp7_) {
- y++;
+ Page* _tmp204_;
+ gint _tmp205_;
+ gint _tmp206_;
+ gdouble _tmp207_;
+ guchar _tmp208_;
+ gdouble _tmp209_;
+ guchar _tmp210_;
+ gdouble _tmp211_;
+ guchar _tmp212_;
+ _tmp200_ = _tmp199_;
+ if (!_tmp200_) {
+ gint _tmp201_;
+ _tmp201_ = y;
+ y = _tmp201_ + 1;
}
- _tmp7_ = FALSE;
- if (!(y < B)) {
+ _tmp199_ = FALSE;
+ _tmp202_ = y;
+ _tmp203_ = B;
+ if (!(_tmp202_ < _tmp203_)) {
break;
}
- page_view_get_pixel (self, page, x, y, p, 3);
- red = red + p[0];
- green = green + p[1];
- blue = blue + p[2];
+ _tmp204_ = page;
+ _tmp205_ = x;
+ _tmp206_ = y;
+ page_view_get_pixel (self, _tmp204_, _tmp205_, _tmp206_, p, 3);
+ _tmp207_ = red;
+ _tmp208_ = p[0];
+ red = _tmp207_ + _tmp208_;
+ _tmp209_ = green;
+ _tmp210_ = p[1];
+ green = _tmp209_ + _tmp210_;
+ _tmp211_ = blue;
+ _tmp212_ = p[2];
+ blue = _tmp211_ + _tmp212_;
}
}
}
@@ -664,269 +1428,827 @@ static void page_view_set_pixel (PageView* self, Page* page, gdouble l, gdouble
}
}
{
+ gint _tmp213_;
gint x;
- x = L;
+ _tmp213_ = L;
+ x = _tmp213_;
{
- gboolean _tmp8_;
- _tmp8_ = TRUE;
+ gboolean _tmp214_;
+ _tmp214_ = TRUE;
while (TRUE) {
- if (!_tmp8_) {
- x++;
+ gboolean _tmp215_;
+ gint _tmp217_;
+ gint _tmp218_;
+ gdouble _tmp219_;
+ gint _tmp220_;
+ gdouble _tmp236_;
+ gint _tmp237_;
+ _tmp215_ = _tmp214_;
+ if (!_tmp215_) {
+ gint _tmp216_;
+ _tmp216_ = x;
+ x = _tmp216_ + 1;
}
- _tmp8_ = FALSE;
- if (!(x < R)) {
+ _tmp214_ = FALSE;
+ _tmp217_ = x;
+ _tmp218_ = R;
+ if (!(_tmp217_ < _tmp218_)) {
break;
}
- if (t != ((gdouble) T)) {
+ _tmp219_ = t;
+ _tmp220_ = T;
+ if (_tmp219_ != ((gdouble) _tmp220_)) {
guchar p[3] = {0};
- page_view_get_pixel (self, page, x, T - 1, p, 3);
- red = red + (p[0] * (T - t));
- green = green + (p[1] * (T - t));
- blue = blue + (p[2] * (T - t));
+ Page* _tmp221_;
+ gint _tmp222_;
+ gint _tmp223_;
+ gdouble _tmp224_;
+ guchar _tmp225_;
+ gint _tmp226_;
+ gdouble _tmp227_;
+ gdouble _tmp228_;
+ guchar _tmp229_;
+ gint _tmp230_;
+ gdouble _tmp231_;
+ gdouble _tmp232_;
+ guchar _tmp233_;
+ gint _tmp234_;
+ gdouble _tmp235_;
+ _tmp221_ = page;
+ _tmp222_ = x;
+ _tmp223_ = T;
+ page_view_get_pixel (self, _tmp221_, _tmp222_, _tmp223_ - 1, p, 3);
+ _tmp224_ = red;
+ _tmp225_ = p[0];
+ _tmp226_ = T;
+ _tmp227_ = t;
+ red = _tmp224_ + (_tmp225_ * (_tmp226_ - _tmp227_));
+ _tmp228_ = green;
+ _tmp229_ = p[1];
+ _tmp230_ = T;
+ _tmp231_ = t;
+ green = _tmp228_ + (_tmp229_ * (_tmp230_ - _tmp231_));
+ _tmp232_ = blue;
+ _tmp233_ = p[2];
+ _tmp234_ = T;
+ _tmp235_ = t;
+ blue = _tmp232_ + (_tmp233_ * (_tmp234_ - _tmp235_));
}
- if (b != ((gdouble) B)) {
+ _tmp236_ = b;
+ _tmp237_ = B;
+ if (_tmp236_ != ((gdouble) _tmp237_)) {
guchar p[3] = {0};
- page_view_get_pixel (self, page, x, B, p, 3);
- red = red + (p[0] * (b - B));
- green = green + (p[1] * (b - B));
- blue = blue + (p[2] * (b - B));
+ Page* _tmp238_;
+ gint _tmp239_;
+ gint _tmp240_;
+ gdouble _tmp241_;
+ guchar _tmp242_;
+ gdouble _tmp243_;
+ gint _tmp244_;
+ gdouble _tmp245_;
+ guchar _tmp246_;
+ gdouble _tmp247_;
+ gint _tmp248_;
+ gdouble _tmp249_;
+ guchar _tmp250_;
+ gdouble _tmp251_;
+ gint _tmp252_;
+ _tmp238_ = page;
+ _tmp239_ = x;
+ _tmp240_ = B;
+ page_view_get_pixel (self, _tmp238_, _tmp239_, _tmp240_, p, 3);
+ _tmp241_ = red;
+ _tmp242_ = p[0];
+ _tmp243_ = b;
+ _tmp244_ = B;
+ red = _tmp241_ + (_tmp242_ * (_tmp243_ - _tmp244_));
+ _tmp245_ = green;
+ _tmp246_ = p[1];
+ _tmp247_ = b;
+ _tmp248_ = B;
+ green = _tmp245_ + (_tmp246_ * (_tmp247_ - _tmp248_));
+ _tmp249_ = blue;
+ _tmp250_ = p[2];
+ _tmp251_ = b;
+ _tmp252_ = B;
+ blue = _tmp249_ + (_tmp250_ * (_tmp251_ - _tmp252_));
}
}
}
}
{
+ gint _tmp253_;
gint y;
- y = T;
+ _tmp253_ = T;
+ y = _tmp253_;
{
- gboolean _tmp9_;
- _tmp9_ = TRUE;
+ gboolean _tmp254_;
+ _tmp254_ = TRUE;
while (TRUE) {
- if (!_tmp9_) {
- y++;
+ gboolean _tmp255_;
+ gint _tmp257_;
+ gint _tmp258_;
+ gdouble _tmp259_;
+ gint _tmp260_;
+ gdouble _tmp276_;
+ gint _tmp277_;
+ _tmp255_ = _tmp254_;
+ if (!_tmp255_) {
+ gint _tmp256_;
+ _tmp256_ = y;
+ y = _tmp256_ + 1;
}
- _tmp9_ = FALSE;
- if (!(y < B)) {
+ _tmp254_ = FALSE;
+ _tmp257_ = y;
+ _tmp258_ = B;
+ if (!(_tmp257_ < _tmp258_)) {
break;
}
- if (l != ((gdouble) L)) {
+ _tmp259_ = l;
+ _tmp260_ = L;
+ if (_tmp259_ != ((gdouble) _tmp260_)) {
guchar p[3] = {0};
- page_view_get_pixel (self, page, L - 1, y, p, 3);
- red = red + (p[0] * (L - l));
- green = green + (p[1] * (L - l));
- blue = blue + (p[2] * (L - l));
+ Page* _tmp261_;
+ gint _tmp262_;
+ gint _tmp263_;
+ gdouble _tmp264_;
+ guchar _tmp265_;
+ gint _tmp266_;
+ gdouble _tmp267_;
+ gdouble _tmp268_;
+ guchar _tmp269_;
+ gint _tmp270_;
+ gdouble _tmp271_;
+ gdouble _tmp272_;
+ guchar _tmp273_;
+ gint _tmp274_;
+ gdouble _tmp275_;
+ _tmp261_ = page;
+ _tmp262_ = L;
+ _tmp263_ = y;
+ page_view_get_pixel (self, _tmp261_, _tmp262_ - 1, _tmp263_, p, 3);
+ _tmp264_ = red;
+ _tmp265_ = p[0];
+ _tmp266_ = L;
+ _tmp267_ = l;
+ red = _tmp264_ + (_tmp265_ * (_tmp266_ - _tmp267_));
+ _tmp268_ = green;
+ _tmp269_ = p[1];
+ _tmp270_ = L;
+ _tmp271_ = l;
+ green = _tmp268_ + (_tmp269_ * (_tmp270_ - _tmp271_));
+ _tmp272_ = blue;
+ _tmp273_ = p[2];
+ _tmp274_ = L;
+ _tmp275_ = l;
+ blue = _tmp272_ + (_tmp273_ * (_tmp274_ - _tmp275_));
}
- if (r != ((gdouble) R)) {
+ _tmp276_ = r;
+ _tmp277_ = R;
+ if (_tmp276_ != ((gdouble) _tmp277_)) {
guchar p[3] = {0};
- page_view_get_pixel (self, page, R, y, p, 3);
- red = red + (p[0] * (r - R));
- green = green + (p[1] * (r - R));
- blue = blue + (p[2] * (r - R));
+ Page* _tmp278_;
+ gint _tmp279_;
+ gint _tmp280_;
+ gdouble _tmp281_;
+ guchar _tmp282_;
+ gdouble _tmp283_;
+ gint _tmp284_;
+ gdouble _tmp285_;
+ guchar _tmp286_;
+ gdouble _tmp287_;
+ gint _tmp288_;
+ gdouble _tmp289_;
+ guchar _tmp290_;
+ gdouble _tmp291_;
+ gint _tmp292_;
+ _tmp278_ = page;
+ _tmp279_ = R;
+ _tmp280_ = y;
+ page_view_get_pixel (self, _tmp278_, _tmp279_, _tmp280_, p, 3);
+ _tmp281_ = red;
+ _tmp282_ = p[0];
+ _tmp283_ = r;
+ _tmp284_ = R;
+ red = _tmp281_ + (_tmp282_ * (_tmp283_ - _tmp284_));
+ _tmp285_ = green;
+ _tmp286_ = p[1];
+ _tmp287_ = r;
+ _tmp288_ = R;
+ green = _tmp285_ + (_tmp286_ * (_tmp287_ - _tmp288_));
+ _tmp289_ = blue;
+ _tmp290_ = p[2];
+ _tmp291_ = r;
+ _tmp292_ = R;
+ blue = _tmp289_ + (_tmp290_ * (_tmp291_ - _tmp292_));
}
}
}
}
- if (l != ((gdouble) L)) {
- _tmp10_ = t != ((gdouble) T);
+ _tmp294_ = l;
+ _tmp295_ = L;
+ if (_tmp294_ != ((gdouble) _tmp295_)) {
+ gdouble _tmp296_;
+ gint _tmp297_;
+ _tmp296_ = t;
+ _tmp297_ = T;
+ _tmp293_ = _tmp296_ != ((gdouble) _tmp297_);
} else {
- _tmp10_ = FALSE;
+ _tmp293_ = FALSE;
}
- if (_tmp10_) {
+ _tmp298_ = _tmp293_;
+ if (_tmp298_) {
guchar p[3] = {0};
- page_view_get_pixel (self, page, L - 1, T - 1, p, 3);
- red = red + ((p[0] * (L - l)) * (T - t));
- green = green + ((p[1] * (L - l)) * (T - t));
- blue = blue + ((p[2] * (L - l)) * (T - t));
+ Page* _tmp299_;
+ gint _tmp300_;
+ gint _tmp301_;
+ gdouble _tmp302_;
+ guchar _tmp303_;
+ gint _tmp304_;
+ gdouble _tmp305_;
+ gint _tmp306_;
+ gdouble _tmp307_;
+ gdouble _tmp308_;
+ guchar _tmp309_;
+ gint _tmp310_;
+ gdouble _tmp311_;
+ gint _tmp312_;
+ gdouble _tmp313_;
+ gdouble _tmp314_;
+ guchar _tmp315_;
+ gint _tmp316_;
+ gdouble _tmp317_;
+ gint _tmp318_;
+ gdouble _tmp319_;
+ _tmp299_ = page;
+ _tmp300_ = L;
+ _tmp301_ = T;
+ page_view_get_pixel (self, _tmp299_, _tmp300_ - 1, _tmp301_ - 1, p, 3);
+ _tmp302_ = red;
+ _tmp303_ = p[0];
+ _tmp304_ = L;
+ _tmp305_ = l;
+ _tmp306_ = T;
+ _tmp307_ = t;
+ red = _tmp302_ + ((_tmp303_ * (_tmp304_ - _tmp305_)) * (_tmp306_ - _tmp307_));
+ _tmp308_ = green;
+ _tmp309_ = p[1];
+ _tmp310_ = L;
+ _tmp311_ = l;
+ _tmp312_ = T;
+ _tmp313_ = t;
+ green = _tmp308_ + ((_tmp309_ * (_tmp310_ - _tmp311_)) * (_tmp312_ - _tmp313_));
+ _tmp314_ = blue;
+ _tmp315_ = p[2];
+ _tmp316_ = L;
+ _tmp317_ = l;
+ _tmp318_ = T;
+ _tmp319_ = t;
+ blue = _tmp314_ + ((_tmp315_ * (_tmp316_ - _tmp317_)) * (_tmp318_ - _tmp319_));
}
- if (r != ((gdouble) R)) {
- _tmp11_ = t != ((gdouble) T);
+ _tmp321_ = r;
+ _tmp322_ = R;
+ if (_tmp321_ != ((gdouble) _tmp322_)) {
+ gdouble _tmp323_;
+ gint _tmp324_;
+ _tmp323_ = t;
+ _tmp324_ = T;
+ _tmp320_ = _tmp323_ != ((gdouble) _tmp324_);
} else {
- _tmp11_ = FALSE;
+ _tmp320_ = FALSE;
}
- if (_tmp11_) {
+ _tmp325_ = _tmp320_;
+ if (_tmp325_) {
guchar p[3] = {0};
- page_view_get_pixel (self, page, R, T - 1, p, 3);
- red = red + ((p[0] * (r - R)) * (T - t));
- green = green + ((p[1] * (r - R)) * (T - t));
- blue = blue + ((p[2] * (r - R)) * (T - t));
+ Page* _tmp326_;
+ gint _tmp327_;
+ gint _tmp328_;
+ gdouble _tmp329_;
+ guchar _tmp330_;
+ gdouble _tmp331_;
+ gint _tmp332_;
+ gint _tmp333_;
+ gdouble _tmp334_;
+ gdouble _tmp335_;
+ guchar _tmp336_;
+ gdouble _tmp337_;
+ gint _tmp338_;
+ gint _tmp339_;
+ gdouble _tmp340_;
+ gdouble _tmp341_;
+ guchar _tmp342_;
+ gdouble _tmp343_;
+ gint _tmp344_;
+ gint _tmp345_;
+ gdouble _tmp346_;
+ _tmp326_ = page;
+ _tmp327_ = R;
+ _tmp328_ = T;
+ page_view_get_pixel (self, _tmp326_, _tmp327_, _tmp328_ - 1, p, 3);
+ _tmp329_ = red;
+ _tmp330_ = p[0];
+ _tmp331_ = r;
+ _tmp332_ = R;
+ _tmp333_ = T;
+ _tmp334_ = t;
+ red = _tmp329_ + ((_tmp330_ * (_tmp331_ - _tmp332_)) * (_tmp333_ - _tmp334_));
+ _tmp335_ = green;
+ _tmp336_ = p[1];
+ _tmp337_ = r;
+ _tmp338_ = R;
+ _tmp339_ = T;
+ _tmp340_ = t;
+ green = _tmp335_ + ((_tmp336_ * (_tmp337_ - _tmp338_)) * (_tmp339_ - _tmp340_));
+ _tmp341_ = blue;
+ _tmp342_ = p[2];
+ _tmp343_ = r;
+ _tmp344_ = R;
+ _tmp345_ = T;
+ _tmp346_ = t;
+ blue = _tmp341_ + ((_tmp342_ * (_tmp343_ - _tmp344_)) * (_tmp345_ - _tmp346_));
}
- if (r != ((gdouble) R)) {
- _tmp12_ = b != ((gdouble) B);
+ _tmp348_ = r;
+ _tmp349_ = R;
+ if (_tmp348_ != ((gdouble) _tmp349_)) {
+ gdouble _tmp350_;
+ gint _tmp351_;
+ _tmp350_ = b;
+ _tmp351_ = B;
+ _tmp347_ = _tmp350_ != ((gdouble) _tmp351_);
} else {
- _tmp12_ = FALSE;
+ _tmp347_ = FALSE;
}
- if (_tmp12_) {
+ _tmp352_ = _tmp347_;
+ if (_tmp352_) {
guchar p[3] = {0};
- page_view_get_pixel (self, page, R, B, p, 3);
- red = red + ((p[0] * (r - R)) * (b - B));
- green = green + ((p[1] * (r - R)) * (b - B));
- blue = blue + ((p[2] * (r - R)) * (b - B));
+ Page* _tmp353_;
+ gint _tmp354_;
+ gint _tmp355_;
+ gdouble _tmp356_;
+ guchar _tmp357_;
+ gdouble _tmp358_;
+ gint _tmp359_;
+ gdouble _tmp360_;
+ gint _tmp361_;
+ gdouble _tmp362_;
+ guchar _tmp363_;
+ gdouble _tmp364_;
+ gint _tmp365_;
+ gdouble _tmp366_;
+ gint _tmp367_;
+ gdouble _tmp368_;
+ guchar _tmp369_;
+ gdouble _tmp370_;
+ gint _tmp371_;
+ gdouble _tmp372_;
+ gint _tmp373_;
+ _tmp353_ = page;
+ _tmp354_ = R;
+ _tmp355_ = B;
+ page_view_get_pixel (self, _tmp353_, _tmp354_, _tmp355_, p, 3);
+ _tmp356_ = red;
+ _tmp357_ = p[0];
+ _tmp358_ = r;
+ _tmp359_ = R;
+ _tmp360_ = b;
+ _tmp361_ = B;
+ red = _tmp356_ + ((_tmp357_ * (_tmp358_ - _tmp359_)) * (_tmp360_ - _tmp361_));
+ _tmp362_ = green;
+ _tmp363_ = p[1];
+ _tmp364_ = r;
+ _tmp365_ = R;
+ _tmp366_ = b;
+ _tmp367_ = B;
+ green = _tmp362_ + ((_tmp363_ * (_tmp364_ - _tmp365_)) * (_tmp366_ - _tmp367_));
+ _tmp368_ = blue;
+ _tmp369_ = p[2];
+ _tmp370_ = r;
+ _tmp371_ = R;
+ _tmp372_ = b;
+ _tmp373_ = B;
+ blue = _tmp368_ + ((_tmp369_ * (_tmp370_ - _tmp371_)) * (_tmp372_ - _tmp373_));
}
- if (l != ((gdouble) L)) {
- _tmp13_ = b != ((gdouble) B);
+ _tmp375_ = l;
+ _tmp376_ = L;
+ if (_tmp375_ != ((gdouble) _tmp376_)) {
+ gdouble _tmp377_;
+ gint _tmp378_;
+ _tmp377_ = b;
+ _tmp378_ = B;
+ _tmp374_ = _tmp377_ != ((gdouble) _tmp378_);
} else {
- _tmp13_ = FALSE;
+ _tmp374_ = FALSE;
}
- if (_tmp13_) {
+ _tmp379_ = _tmp374_;
+ if (_tmp379_) {
guchar p[3] = {0};
- page_view_get_pixel (self, page, L - 1, B, p, 3);
- red = red + ((p[0] * (L - l)) * (b - B));
- green = green + ((p[1] * (L - l)) * (b - B));
- blue = blue + ((p[2] * (L - l)) * (b - B));
- }
- scale = 1.0 / ((r - l) * (b - t));
- output[offset] = (guchar) ((red * scale) + 0.5);
- output[offset + 1] = (guchar) ((green * scale) + 0.5);
- output[offset + 2] = (guchar) ((blue * scale) + 0.5);
+ Page* _tmp380_;
+ gint _tmp381_;
+ gint _tmp382_;
+ gdouble _tmp383_;
+ guchar _tmp384_;
+ gint _tmp385_;
+ gdouble _tmp386_;
+ gdouble _tmp387_;
+ gint _tmp388_;
+ gdouble _tmp389_;
+ guchar _tmp390_;
+ gint _tmp391_;
+ gdouble _tmp392_;
+ gdouble _tmp393_;
+ gint _tmp394_;
+ gdouble _tmp395_;
+ guchar _tmp396_;
+ gint _tmp397_;
+ gdouble _tmp398_;
+ gdouble _tmp399_;
+ gint _tmp400_;
+ _tmp380_ = page;
+ _tmp381_ = L;
+ _tmp382_ = B;
+ page_view_get_pixel (self, _tmp380_, _tmp381_ - 1, _tmp382_, p, 3);
+ _tmp383_ = red;
+ _tmp384_ = p[0];
+ _tmp385_ = L;
+ _tmp386_ = l;
+ _tmp387_ = b;
+ _tmp388_ = B;
+ red = _tmp383_ + ((_tmp384_ * (_tmp385_ - _tmp386_)) * (_tmp387_ - _tmp388_));
+ _tmp389_ = green;
+ _tmp390_ = p[1];
+ _tmp391_ = L;
+ _tmp392_ = l;
+ _tmp393_ = b;
+ _tmp394_ = B;
+ green = _tmp389_ + ((_tmp390_ * (_tmp391_ - _tmp392_)) * (_tmp393_ - _tmp394_));
+ _tmp395_ = blue;
+ _tmp396_ = p[2];
+ _tmp397_ = L;
+ _tmp398_ = l;
+ _tmp399_ = b;
+ _tmp400_ = B;
+ blue = _tmp395_ + ((_tmp396_ * (_tmp397_ - _tmp398_)) * (_tmp399_ - _tmp400_));
+ }
+ _tmp401_ = r;
+ _tmp402_ = l;
+ _tmp403_ = b;
+ _tmp404_ = t;
+ scale = 1.0 / ((_tmp401_ - _tmp402_) * (_tmp403_ - _tmp404_));
+ _tmp405_ = output;
+ _tmp405__length1 = output_length1;
+ _tmp406_ = offset;
+ _tmp407_ = red;
+ _tmp408_ = scale;
+ _tmp405_[_tmp406_] = (guchar) ((_tmp407_ * _tmp408_) + 0.5);
+ _tmp409_ = _tmp405_[_tmp406_];
+ _tmp410_ = output;
+ _tmp410__length1 = output_length1;
+ _tmp411_ = offset;
+ _tmp412_ = green;
+ _tmp413_ = scale;
+ _tmp410_[_tmp411_ + 1] = (guchar) ((_tmp412_ * _tmp413_) + 0.5);
+ _tmp414_ = _tmp410_[_tmp411_ + 1];
+ _tmp415_ = output;
+ _tmp415__length1 = output_length1;
+ _tmp416_ = offset;
+ _tmp417_ = blue;
+ _tmp418_ = scale;
+ _tmp415_[_tmp416_ + 2] = (guchar) ((_tmp417_ * _tmp418_) + 0.5);
+ _tmp419_ = _tmp415_[_tmp416_ + 2];
}
static void page_view_update_preview (PageView* self, Page* page, GdkPixbuf** output_image, gint output_width, gint output_height, ScanDirection scan_direction, gint old_scan_line, gint scan_line) {
- gint _tmp0_;
+ Page* _tmp0_;
+ gint _tmp1_ = 0;
gint input_width;
- gint _tmp1_;
+ Page* _tmp2_;
+ gint _tmp3_ = 0;
gint input_height;
gint L = 0;
gint R = 0;
gint T = 0;
gint B = 0;
- gboolean _tmp2_ = FALSE;
- gboolean _tmp3_ = FALSE;
- guint8* _tmp7_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+ GdkPixbuf* _tmp6_;
+ gboolean _tmp10_;
+ gboolean _tmp14_;
+ gint _tmp56_;
+ gint _tmp57_;
+ gint _tmp59_;
+ gint _tmp60_;
+ gint _tmp62_;
+ gint _tmp63_;
+ gint _tmp64_;
+ gint _tmp65_;
+ gint _tmp66_;
+ gint _tmp67_;
+ GdkPixbuf* _tmp68_;
+ GdkPixbuf* _tmp69_;
+ guint8* _tmp70_ = NULL;
guchar* output;
gint output_length1;
gint _output_size_;
- gint _tmp8_;
+ GdkPixbuf* _tmp71_;
+ gint _tmp72_ = 0;
gint output_rowstride;
- gint _tmp9_;
+ GdkPixbuf* _tmp73_;
+ gint _tmp74_ = 0;
gint output_n_channels;
- gboolean _tmp10_;
+ Page* _tmp75_;
+ gboolean _tmp76_ = FALSE;
g_return_if_fail (self != NULL);
g_return_if_fail (page != NULL);
- _tmp0_ = page_get_width (page);
- input_width = _tmp0_;
- _tmp1_ = page_get_height (page);
- input_height = _tmp1_;
- if ((*output_image) == NULL) {
- _tmp3_ = TRUE;
+ _tmp0_ = page;
+ _tmp1_ = page_get_width (_tmp0_);
+ input_width = _tmp1_;
+ _tmp2_ = page;
+ _tmp3_ = page_get_height (_tmp2_);
+ input_height = _tmp3_;
+ _tmp6_ = *output_image;
+ if (_tmp6_ == NULL) {
+ _tmp5_ = TRUE;
} else {
- gint _tmp4_;
- _tmp4_ = gdk_pixbuf_get_width (*output_image);
- _tmp3_ = _tmp4_ != output_width;
+ GdkPixbuf* _tmp7_;
+ gint _tmp8_ = 0;
+ gint _tmp9_;
+ _tmp7_ = *output_image;
+ _tmp8_ = gdk_pixbuf_get_width (_tmp7_);
+ _tmp9_ = output_width;
+ _tmp5_ = _tmp8_ != _tmp9_;
}
- if (_tmp3_) {
- _tmp2_ = TRUE;
+ _tmp10_ = _tmp5_;
+ if (_tmp10_) {
+ _tmp4_ = TRUE;
} else {
- gint _tmp5_;
- _tmp5_ = gdk_pixbuf_get_height (*output_image);
- _tmp2_ = _tmp5_ != output_height;
+ GdkPixbuf* _tmp11_;
+ gint _tmp12_ = 0;
+ gint _tmp13_;
+ _tmp11_ = *output_image;
+ _tmp12_ = gdk_pixbuf_get_height (_tmp11_);
+ _tmp13_ = output_height;
+ _tmp4_ = _tmp12_ != _tmp13_;
}
- if (_tmp2_) {
- GdkPixbuf* _tmp6_ = NULL;
- _tmp6_ = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, output_width, output_height);
+ _tmp14_ = _tmp4_;
+ if (_tmp14_) {
+ gint _tmp15_;
+ gint _tmp16_;
+ GdkPixbuf* _tmp17_;
+ gint _tmp18_;
+ gint _tmp19_;
+ _tmp15_ = output_width;
+ _tmp16_ = output_height;
+ _tmp17_ = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, _tmp15_, _tmp16_);
_g_object_unref0 (*output_image);
- *output_image = _tmp6_;
+ *output_image = _tmp17_;
L = 0;
- R = output_width - 1;
+ _tmp18_ = output_width;
+ R = _tmp18_ - 1;
T = 0;
- B = output_height - 1;
+ _tmp19_ = output_height;
+ B = _tmp19_ - 1;
} else {
- switch (scan_direction) {
+ ScanDirection _tmp20_;
+ _tmp20_ = scan_direction;
+ switch (_tmp20_) {
case SCAN_DIRECTION_TOP_TO_BOTTOM:
{
+ gint _tmp21_;
+ gint _tmp22_;
+ gint _tmp23_;
+ gint _tmp24_;
+ gint _tmp25_;
+ gint _tmp26_;
+ gint _tmp27_;
L = 0;
- R = output_width - 1;
- T = (gint) ((((gdouble) old_scan_line) * output_height) / input_height);
- B = (gint) (((((gdouble) scan_line) * output_height) / input_height) + 0.5);
+ _tmp21_ = output_width;
+ R = _tmp21_ - 1;
+ _tmp22_ = old_scan_line;
+ _tmp23_ = output_height;
+ _tmp24_ = input_height;
+ T = (gint) ((((gdouble) _tmp22_) * _tmp23_) / _tmp24_);
+ _tmp25_ = scan_line;
+ _tmp26_ = output_height;
+ _tmp27_ = input_height;
+ B = (gint) (((((gdouble) _tmp25_) * _tmp26_) / _tmp27_) + 0.5);
break;
}
case SCAN_DIRECTION_LEFT_TO_RIGHT:
{
- L = (gint) ((((gdouble) old_scan_line) * output_width) / input_width);
- R = (gint) (((((gdouble) scan_line) * output_width) / input_width) + 0.5);
+ gint _tmp28_;
+ gint _tmp29_;
+ gint _tmp30_;
+ gint _tmp31_;
+ gint _tmp32_;
+ gint _tmp33_;
+ gint _tmp34_;
+ _tmp28_ = old_scan_line;
+ _tmp29_ = output_width;
+ _tmp30_ = input_width;
+ L = (gint) ((((gdouble) _tmp28_) * _tmp29_) / _tmp30_);
+ _tmp31_ = scan_line;
+ _tmp32_ = output_width;
+ _tmp33_ = input_width;
+ R = (gint) (((((gdouble) _tmp31_) * _tmp32_) / _tmp33_) + 0.5);
T = 0;
- B = output_height - 1;
+ _tmp34_ = output_height;
+ B = _tmp34_ - 1;
break;
}
case SCAN_DIRECTION_BOTTOM_TO_TOP:
{
+ gint _tmp35_;
+ gint _tmp36_;
+ gint _tmp37_;
+ gint _tmp38_;
+ gint _tmp39_;
+ gint _tmp40_;
+ gint _tmp41_;
+ gint _tmp42_;
+ gint _tmp43_;
L = 0;
- R = output_width - 1;
- T = (gint) ((((gdouble) (input_height - scan_line)) * output_height) / input_height);
- B = (gint) (((((gdouble) (input_height - old_scan_line)) * output_height) / input_height) + 0.5);
+ _tmp35_ = output_width;
+ R = _tmp35_ - 1;
+ _tmp36_ = input_height;
+ _tmp37_ = scan_line;
+ _tmp38_ = output_height;
+ _tmp39_ = input_height;
+ T = (gint) ((((gdouble) (_tmp36_ - _tmp37_)) * _tmp38_) / _tmp39_);
+ _tmp40_ = input_height;
+ _tmp41_ = old_scan_line;
+ _tmp42_ = output_height;
+ _tmp43_ = input_height;
+ B = (gint) (((((gdouble) (_tmp40_ - _tmp41_)) * _tmp42_) / _tmp43_) + 0.5);
break;
}
case SCAN_DIRECTION_RIGHT_TO_LEFT:
{
- L = (gint) ((((gdouble) (input_width - scan_line)) * output_width) / input_width);
- R = (gint) (((((gdouble) (input_width - old_scan_line)) * output_width) / input_width) + 0.5);
+ gint _tmp44_;
+ gint _tmp45_;
+ gint _tmp46_;
+ gint _tmp47_;
+ gint _tmp48_;
+ gint _tmp49_;
+ gint _tmp50_;
+ gint _tmp51_;
+ gint _tmp52_;
+ _tmp44_ = input_width;
+ _tmp45_ = scan_line;
+ _tmp46_ = output_width;
+ _tmp47_ = input_width;
+ L = (gint) ((((gdouble) (_tmp44_ - _tmp45_)) * _tmp46_) / _tmp47_);
+ _tmp48_ = input_width;
+ _tmp49_ = old_scan_line;
+ _tmp50_ = output_width;
+ _tmp51_ = input_width;
+ R = (gint) (((((gdouble) (_tmp48_ - _tmp49_)) * _tmp50_) / _tmp51_) + 0.5);
T = 0;
- B = output_height - 1;
+ _tmp52_ = output_height;
+ B = _tmp52_ - 1;
break;
}
default:
{
+ gint _tmp53_;
+ gint _tmp54_;
+ gint _tmp55_;
T = 0;
- B = T;
- R = B;
- L = R;
+ _tmp53_ = T;
+ B = _tmp53_;
+ _tmp54_ = B;
+ R = _tmp54_;
+ _tmp55_ = R;
+ L = _tmp55_;
break;
}
}
}
- if (R >= output_width) {
- R = output_width - 1;
+ _tmp56_ = R;
+ _tmp57_ = output_width;
+ if (_tmp56_ >= _tmp57_) {
+ gint _tmp58_;
+ _tmp58_ = output_width;
+ R = _tmp58_ - 1;
}
- if (B >= output_height) {
- B = output_height - 1;
+ _tmp59_ = B;
+ _tmp60_ = output_height;
+ if (_tmp59_ >= _tmp60_) {
+ gint _tmp61_;
+ _tmp61_ = output_height;
+ B = _tmp61_ - 1;
}
- g_return_if_fail (L >= 0);
- g_return_if_fail (R < output_width);
- g_return_if_fail (T >= 0);
- g_return_if_fail (B < output_height);
- g_return_if_fail ((*output_image) != NULL);
- _tmp7_ = gdk_pixbuf_get_pixels (*output_image);
- output = _tmp7_;
+ _tmp62_ = L;
+ g_return_if_fail (_tmp62_ >= 0);
+ _tmp63_ = R;
+ _tmp64_ = output_width;
+ g_return_if_fail (_tmp63_ < _tmp64_);
+ _tmp65_ = T;
+ g_return_if_fail (_tmp65_ >= 0);
+ _tmp66_ = B;
+ _tmp67_ = output_height;
+ g_return_if_fail (_tmp66_ < _tmp67_);
+ _tmp68_ = *output_image;
+ g_return_if_fail (_tmp68_ != NULL);
+ _tmp69_ = *output_image;
+ _tmp70_ = gdk_pixbuf_get_pixels (_tmp69_);
+ output = _tmp70_;
output_length1 = -1;
_output_size_ = output_length1;
- _tmp8_ = gdk_pixbuf_get_rowstride (*output_image);
- output_rowstride = _tmp8_;
- _tmp9_ = gdk_pixbuf_get_n_channels (*output_image);
- output_n_channels = _tmp9_;
- _tmp10_ = page_has_data (page);
- if (!_tmp10_) {
+ _tmp71_ = *output_image;
+ _tmp72_ = gdk_pixbuf_get_rowstride (_tmp71_);
+ output_rowstride = _tmp72_;
+ _tmp73_ = *output_image;
+ _tmp74_ = gdk_pixbuf_get_n_channels (_tmp73_);
+ output_n_channels = _tmp74_;
+ _tmp75_ = page;
+ _tmp76_ = page_has_data (_tmp75_);
+ if (!_tmp76_) {
{
+ gint _tmp77_;
gint x;
- x = L;
+ _tmp77_ = L;
+ x = _tmp77_;
{
- gboolean _tmp11_;
- _tmp11_ = TRUE;
+ gboolean _tmp78_;
+ _tmp78_ = TRUE;
while (TRUE) {
- if (!_tmp11_) {
- x++;
+ gboolean _tmp79_;
+ gint _tmp81_;
+ gint _tmp82_;
+ _tmp79_ = _tmp78_;
+ if (!_tmp79_) {
+ gint _tmp80_;
+ _tmp80_ = x;
+ x = _tmp80_ + 1;
}
- _tmp11_ = FALSE;
- if (!(x <= R)) {
+ _tmp78_ = FALSE;
+ _tmp81_ = x;
+ _tmp82_ = R;
+ if (!(_tmp81_ <= _tmp82_)) {
break;
}
{
+ gint _tmp83_;
gint y;
- y = T;
+ _tmp83_ = T;
+ y = _tmp83_;
{
- gboolean _tmp12_;
- _tmp12_ = TRUE;
+ gboolean _tmp84_;
+ _tmp84_ = TRUE;
while (TRUE) {
+ gboolean _tmp85_;
+ gint _tmp87_;
+ gint _tmp88_;
+ gint _tmp89_;
+ gint _tmp90_;
+ gint _tmp91_;
+ gint _tmp92_;
gint o;
- if (!_tmp12_) {
- y++;
+ guchar* _tmp93_;
+ gint _tmp93__length1;
+ gint _tmp94_;
+ guchar* _tmp95_;
+ gint _tmp95__length1;
+ gint _tmp96_;
+ guchar* _tmp97_;
+ gint _tmp97__length1;
+ gint _tmp98_;
+ guchar _tmp99_;
+ guchar _tmp100_;
+ guchar _tmp101_;
+ _tmp85_ = _tmp84_;
+ if (!_tmp85_) {
+ gint _tmp86_;
+ _tmp86_ = y;
+ y = _tmp86_ + 1;
}
- _tmp12_ = FALSE;
- if (!(y <= B)) {
+ _tmp84_ = FALSE;
+ _tmp87_ = y;
+ _tmp88_ = B;
+ if (!(_tmp87_ <= _tmp88_)) {
break;
}
- o = (output_rowstride * y) + (x * output_n_channels);
- output[o + 2] = (guchar) 0xFF;
- output[o + 1] = output[o + 2];
- output[o] = output[o + 1];
+ _tmp89_ = output_rowstride;
+ _tmp90_ = y;
+ _tmp91_ = x;
+ _tmp92_ = output_n_channels;
+ o = (_tmp89_ * _tmp90_) + (_tmp91_ * _tmp92_);
+ _tmp93_ = output;
+ _tmp93__length1 = output_length1;
+ _tmp94_ = o;
+ _tmp95_ = output;
+ _tmp95__length1 = output_length1;
+ _tmp96_ = o;
+ _tmp97_ = output;
+ _tmp97__length1 = output_length1;
+ _tmp98_ = o;
+ _tmp97_[_tmp98_ + 2] = (guchar) 0xFF;
+ _tmp99_ = _tmp97_[_tmp98_ + 2];
+ _tmp95_[_tmp96_ + 1] = _tmp99_;
+ _tmp100_ = _tmp95_[_tmp96_ + 1];
+ _tmp93_[_tmp94_] = _tmp100_;
+ _tmp101_ = _tmp93_[_tmp94_];
}
}
}
@@ -936,42 +2258,108 @@ static void page_view_update_preview (PageView* self, Page* page, GdkPixbuf** ou
return;
}
{
+ gint _tmp102_;
gint x;
- x = L;
+ _tmp102_ = L;
+ x = _tmp102_;
{
- gboolean _tmp13_;
- _tmp13_ = TRUE;
+ gboolean _tmp103_;
+ _tmp103_ = TRUE;
while (TRUE) {
+ gboolean _tmp104_;
+ gint _tmp106_;
+ gint _tmp107_;
+ gint _tmp108_;
+ gint _tmp109_;
+ gint _tmp110_;
gdouble l;
+ gint _tmp111_;
+ gint _tmp112_;
+ gint _tmp113_;
gdouble r;
- if (!_tmp13_) {
- x++;
+ _tmp104_ = _tmp103_;
+ if (!_tmp104_) {
+ gint _tmp105_;
+ _tmp105_ = x;
+ x = _tmp105_ + 1;
}
- _tmp13_ = FALSE;
- if (!(x <= R)) {
+ _tmp103_ = FALSE;
+ _tmp106_ = x;
+ _tmp107_ = R;
+ if (!(_tmp106_ <= _tmp107_)) {
break;
}
- l = (((gdouble) x) * input_width) / output_width;
- r = (((gdouble) (x + 1)) * input_width) / output_width;
+ _tmp108_ = x;
+ _tmp109_ = input_width;
+ _tmp110_ = output_width;
+ l = (((gdouble) _tmp108_) * _tmp109_) / _tmp110_;
+ _tmp111_ = x;
+ _tmp112_ = input_width;
+ _tmp113_ = output_width;
+ r = (((gdouble) (_tmp111_ + 1)) * _tmp112_) / _tmp113_;
{
+ gint _tmp114_;
gint y;
- y = T;
+ _tmp114_ = T;
+ y = _tmp114_;
{
- gboolean _tmp14_;
- _tmp14_ = TRUE;
+ gboolean _tmp115_;
+ _tmp115_ = TRUE;
while (TRUE) {
+ gboolean _tmp116_;
+ gint _tmp118_;
+ gint _tmp119_;
+ gint _tmp120_;
+ gint _tmp121_;
+ gint _tmp122_;
gdouble t;
+ gint _tmp123_;
+ gint _tmp124_;
+ gint _tmp125_;
gdouble b;
- if (!_tmp14_) {
- y++;
+ Page* _tmp126_;
+ gdouble _tmp127_;
+ gdouble _tmp128_;
+ gdouble _tmp129_;
+ gdouble _tmp130_;
+ guchar* _tmp131_;
+ gint _tmp131__length1;
+ gint _tmp132_;
+ gint _tmp133_;
+ gint _tmp134_;
+ gint _tmp135_;
+ _tmp116_ = _tmp115_;
+ if (!_tmp116_) {
+ gint _tmp117_;
+ _tmp117_ = y;
+ y = _tmp117_ + 1;
}
- _tmp14_ = FALSE;
- if (!(y <= B)) {
+ _tmp115_ = FALSE;
+ _tmp118_ = y;
+ _tmp119_ = B;
+ if (!(_tmp118_ <= _tmp119_)) {
break;
}
- t = (((gdouble) y) * input_height) / output_height;
- b = (((gdouble) (y + 1)) * input_height) / output_height;
- page_view_set_pixel (self, page, l, r, t, b, output, output_length1, (output_rowstride * y) + (x * output_n_channels));
+ _tmp120_ = y;
+ _tmp121_ = input_height;
+ _tmp122_ = output_height;
+ t = (((gdouble) _tmp120_) * _tmp121_) / _tmp122_;
+ _tmp123_ = y;
+ _tmp124_ = input_height;
+ _tmp125_ = output_height;
+ b = (((gdouble) (_tmp123_ + 1)) * _tmp124_) / _tmp125_;
+ _tmp126_ = page;
+ _tmp127_ = l;
+ _tmp128_ = r;
+ _tmp129_ = t;
+ _tmp130_ = b;
+ _tmp131_ = output;
+ _tmp131__length1 = output_length1;
+ _tmp132_ = output_rowstride;
+ _tmp133_ = y;
+ _tmp134_ = x;
+ _tmp135_ = output_n_channels;
+ page_view_set_pixel (self, _tmp126_, _tmp127_, _tmp128_, _tmp129_, _tmp130_, _tmp131_, _tmp131__length1, (_tmp132_ * _tmp133_) + (_tmp134_ * _tmp135_));
}
}
}
@@ -983,68 +2371,108 @@ static void page_view_update_preview (PageView* self, Page* page, GdkPixbuf** ou
static gint page_view_get_preview_width (PageView* self) {
gint result = 0;
+ gint _tmp0_;
+ gint _tmp1_;
g_return_val_if_fail (self != NULL, 0);
- result = self->priv->width - (self->priv->border_width * 2);
+ _tmp0_ = self->priv->width;
+ _tmp1_ = self->priv->border_width;
+ result = _tmp0_ - (_tmp1_ * 2);
return result;
}
static gint page_view_get_preview_height (PageView* self) {
gint result = 0;
+ gint _tmp0_;
+ gint _tmp1_;
g_return_val_if_fail (self != NULL, 0);
- result = self->priv->height - (self->priv->border_width * 2);
+ _tmp0_ = self->priv->height;
+ _tmp1_ = self->priv->border_width;
+ result = _tmp0_ - (_tmp1_ * 2);
return result;
}
static void page_view_update_page_view (PageView* self) {
+ gboolean _tmp0_;
+ gint _tmp1_;
gint old_scan_line;
- gint _tmp0_;
+ Page* _tmp2_;
+ gint _tmp3_ = 0;
gint scan_line;
- ScanDirection _tmp1_;
+ ScanDirection _tmp4_;
+ Page* _tmp5_;
+ ScanDirection _tmp6_ = 0;
ScanDirection left_steps;
- gboolean _tmp2_ = FALSE;
- ScanDirection _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
- ScanDirection _tmp6_;
+ gboolean _tmp7_ = FALSE;
+ ScanDirection _tmp8_;
+ gboolean _tmp10_;
+ Page* _tmp11_;
+ ScanDirection _tmp12_ = 0;
+ Page* _tmp13_;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ Page* _tmp16_;
+ ScanDirection _tmp17_ = 0;
+ gint _tmp18_;
+ gint _tmp19_;
+ gint _tmp20_;
g_return_if_fail (self != NULL);
- if (!self->priv->update_image) {
+ _tmp0_ = self->priv->update_image;
+ if (!_tmp0_) {
return;
}
- old_scan_line = self->priv->scan_line;
- _tmp0_ = page_get_scan_line (self->priv->page);
- scan_line = _tmp0_;
- _tmp1_ = page_get_scan_direction (self->priv->page);
- left_steps = self->priv->scan_direction - _tmp1_;
- if (left_steps != 0) {
- _tmp2_ = self->priv->image != NULL;
+ _tmp1_ = self->priv->scan_line;
+ old_scan_line = _tmp1_;
+ _tmp2_ = self->priv->page;
+ _tmp3_ = page_get_scan_line (_tmp2_);
+ scan_line = _tmp3_;
+ _tmp4_ = self->priv->scan_direction;
+ _tmp5_ = self->priv->page;
+ _tmp6_ = page_get_scan_direction (_tmp5_);
+ left_steps = _tmp4_ - _tmp6_;
+ _tmp8_ = left_steps;
+ if (_tmp8_ != 0) {
+ GdkPixbuf* _tmp9_;
+ _tmp9_ = self->priv->image;
+ _tmp7_ = _tmp9_ != NULL;
} else {
- _tmp2_ = FALSE;
+ _tmp7_ = FALSE;
}
- if (_tmp2_) {
+ _tmp10_ = _tmp7_;
+ if (_tmp10_) {
_g_object_unref0 (self->priv->image);
self->priv->image = NULL;
}
- _tmp3_ = page_get_scan_direction (self->priv->page);
- self->priv->scan_direction = _tmp3_;
- _tmp4_ = page_view_get_preview_width (self);
- _tmp5_ = page_view_get_preview_height (self);
- _tmp6_ = page_get_scan_direction (self->priv->page);
- page_view_update_preview (self, self->priv->page, &self->priv->image, _tmp4_, _tmp5_, _tmp6_, old_scan_line, scan_line);
+ _tmp11_ = self->priv->page;
+ _tmp12_ = page_get_scan_direction (_tmp11_);
+ self->priv->scan_direction = _tmp12_;
+ _tmp13_ = self->priv->page;
+ _tmp14_ = page_view_get_preview_width (self);
+ _tmp15_ = page_view_get_preview_height (self);
+ _tmp16_ = self->priv->page;
+ _tmp17_ = page_get_scan_direction (_tmp16_);
+ _tmp18_ = old_scan_line;
+ _tmp19_ = scan_line;
+ page_view_update_preview (self, _tmp13_, &self->priv->image, _tmp14_, _tmp15_, _tmp17_, _tmp18_, _tmp19_);
self->priv->update_image = FALSE;
- self->priv->scan_line = scan_line;
+ _tmp20_ = scan_line;
+ self->priv->scan_line = _tmp20_;
}
static gint page_view_page_to_screen_x (PageView* self, gint x) {
gint result = 0;
gint _tmp0_;
- gint _tmp1_;
+ gint _tmp1_ = 0;
+ Page* _tmp2_;
+ gint _tmp3_ = 0;
g_return_val_if_fail (self != NULL, 0);
- _tmp0_ = page_view_get_preview_width (self);
- _tmp1_ = page_get_width (self->priv->page);
- result = (gint) (((((gdouble) x) * _tmp0_) / _tmp1_) + 0.5);
+ _tmp0_ = x;
+ _tmp1_ = page_view_get_preview_width (self);
+ _tmp2_ = self->priv->page;
+ _tmp3_ = page_get_width (_tmp2_);
+ result = (gint) (((((gdouble) _tmp0_) * _tmp1_) / _tmp3_) + 0.5);
return result;
}
@@ -1052,11 +2480,15 @@ static gint page_view_page_to_screen_x (PageView* self, gint x) {
static gint page_view_page_to_screen_y (PageView* self, gint y) {
gint result = 0;
gint _tmp0_;
- gint _tmp1_;
+ gint _tmp1_ = 0;
+ Page* _tmp2_;
+ gint _tmp3_ = 0;
g_return_val_if_fail (self != NULL, 0);
- _tmp0_ = page_view_get_preview_height (self);
- _tmp1_ = page_get_height (self->priv->page);
- result = (gint) (((((gdouble) y) * _tmp0_) / _tmp1_) + 0.5);
+ _tmp0_ = y;
+ _tmp1_ = page_view_get_preview_height (self);
+ _tmp2_ = self->priv->page;
+ _tmp3_ = page_get_height (_tmp2_);
+ result = (gint) (((((gdouble) _tmp0_) * _tmp1_) / _tmp3_) + 0.5);
return result;
}
@@ -1064,11 +2496,15 @@ static gint page_view_page_to_screen_y (PageView* self, gint y) {
static gint page_view_screen_to_page_x (PageView* self, gint x) {
gint result = 0;
gint _tmp0_;
- gint _tmp1_;
+ Page* _tmp1_;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
g_return_val_if_fail (self != NULL, 0);
- _tmp0_ = page_get_width (self->priv->page);
- _tmp1_ = page_view_get_preview_width (self);
- result = (gint) (((((gdouble) x) * _tmp0_) / _tmp1_) + 0.5);
+ _tmp0_ = x;
+ _tmp1_ = self->priv->page;
+ _tmp2_ = page_get_width (_tmp1_);
+ _tmp3_ = page_view_get_preview_width (self);
+ result = (gint) (((((gdouble) _tmp0_) * _tmp2_) / _tmp3_) + 0.5);
return result;
}
@@ -1076,156 +2512,282 @@ static gint page_view_screen_to_page_x (PageView* self, gint x) {
static gint page_view_screen_to_page_y (PageView* self, gint y) {
gint result = 0;
gint _tmp0_;
- gint _tmp1_;
+ Page* _tmp1_;
+ gint _tmp2_ = 0;
+ gint _tmp3_ = 0;
g_return_val_if_fail (self != NULL, 0);
- _tmp0_ = page_get_height (self->priv->page);
- _tmp1_ = page_view_get_preview_height (self);
- result = (gint) (((((gdouble) y) * _tmp0_) / _tmp1_) + 0.5);
+ _tmp0_ = y;
+ _tmp1_ = self->priv->page;
+ _tmp2_ = page_get_height (_tmp1_);
+ _tmp3_ = page_view_get_preview_height (self);
+ result = (gint) (((((gdouble) _tmp0_) * _tmp2_) / _tmp3_) + 0.5);
return result;
}
static CropLocation page_view_get_crop_location (PageView* self, gint x, gint y) {
CropLocation result = 0;
- gboolean _tmp0_;
+ Page* _tmp0_;
+ gboolean _tmp1_ = FALSE;
gint cx = 0;
gint cy = 0;
gint cw = 0;
gint ch = 0;
- gint _tmp1_;
- gint _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
+ Page* _tmp2_;
+ gint _tmp3_ = 0;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ gint _tmp6_ = 0;
+ gint _tmp7_;
+ gint _tmp8_ = 0;
gint dx;
- gint _tmp6_;
+ gint _tmp9_;
+ gint _tmp10_ = 0;
gint dy;
- gint _tmp7_;
+ gint _tmp11_;
+ gint _tmp12_ = 0;
gint dw;
- gint _tmp8_;
+ gint _tmp13_;
+ gint _tmp14_ = 0;
gint dh;
+ gint _tmp15_;
+ gint _tmp16_;
gint ix;
+ gint _tmp17_;
+ gint _tmp18_;
gint iy;
- gboolean _tmp9_ = FALSE;
- gboolean _tmp10_ = FALSE;
- gboolean _tmp11_ = FALSE;
- gchar* _tmp12_ = NULL;
+ gboolean _tmp19_ = FALSE;
+ gboolean _tmp20_ = FALSE;
+ gboolean _tmp21_ = FALSE;
+ gint _tmp22_;
+ gboolean _tmp25_;
+ gboolean _tmp27_;
+ gboolean _tmp30_;
+ Page* _tmp31_;
+ gchar* _tmp32_ = NULL;
gchar* name;
+ const gchar* _tmp33_;
gint crop_border;
- gboolean _tmp13_ = FALSE;
- gboolean _tmp14_ = FALSE;
- gboolean _tmp15_ = FALSE;
- gboolean _tmp16_ = FALSE;
+ gint _tmp34_;
+ gint _tmp35_;
+ gint _tmp37_;
+ gint _tmp38_;
+ gboolean _tmp40_ = FALSE;
+ gint _tmp41_;
+ gint _tmp42_;
+ gboolean _tmp45_;
+ gboolean _tmp46_ = FALSE;
+ gint _tmp47_;
+ gint _tmp48_;
+ gint _tmp49_;
+ gboolean _tmp52_;
+ gboolean _tmp53_ = FALSE;
+ gint _tmp54_;
+ gint _tmp55_;
+ gboolean _tmp59_;
+ gboolean _tmp60_ = FALSE;
+ gint _tmp61_;
+ gint _tmp62_;
+ gint _tmp63_;
+ gboolean _tmp67_;
+ gint _tmp68_;
+ gint _tmp69_;
+ gint _tmp70_;
+ gint _tmp71_;
+ gint _tmp72_;
+ gint _tmp73_;
+ gint _tmp74_;
+ gint _tmp75_;
+ gint _tmp76_;
+ gint _tmp77_;
g_return_val_if_fail (self != NULL, 0);
- _tmp0_ = page_has_crop (self->priv->page);
- if (!_tmp0_) {
+ _tmp0_ = self->priv->page;
+ _tmp1_ = page_has_crop (_tmp0_);
+ if (!_tmp1_) {
result = 0;
return result;
}
- page_get_crop (self->priv->page, &_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_);
- cx = _tmp1_;
- cy = _tmp2_;
- cw = _tmp3_;
- ch = _tmp4_;
- _tmp5_ = page_view_page_to_screen_x (self, cx);
- dx = _tmp5_;
- _tmp6_ = page_view_page_to_screen_y (self, cy);
- dy = _tmp6_;
- _tmp7_ = page_view_page_to_screen_x (self, cw);
- dw = _tmp7_;
- _tmp8_ = page_view_page_to_screen_y (self, ch);
- dh = _tmp8_;
- ix = x - dx;
- iy = y - dy;
- if (ix < 0) {
- _tmp11_ = TRUE;
+ _tmp2_ = self->priv->page;
+ page_get_crop (_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_, &_tmp6_);
+ cx = _tmp3_;
+ cy = _tmp4_;
+ cw = _tmp5_;
+ ch = _tmp6_;
+ _tmp7_ = cx;
+ _tmp8_ = page_view_page_to_screen_x (self, _tmp7_);
+ dx = _tmp8_;
+ _tmp9_ = cy;
+ _tmp10_ = page_view_page_to_screen_y (self, _tmp9_);
+ dy = _tmp10_;
+ _tmp11_ = cw;
+ _tmp12_ = page_view_page_to_screen_x (self, _tmp11_);
+ dw = _tmp12_;
+ _tmp13_ = ch;
+ _tmp14_ = page_view_page_to_screen_y (self, _tmp13_);
+ dh = _tmp14_;
+ _tmp15_ = x;
+ _tmp16_ = dx;
+ ix = _tmp15_ - _tmp16_;
+ _tmp17_ = y;
+ _tmp18_ = dy;
+ iy = _tmp17_ - _tmp18_;
+ _tmp22_ = ix;
+ if (_tmp22_ < 0) {
+ _tmp21_ = TRUE;
} else {
- _tmp11_ = ix > dw;
+ gint _tmp23_;
+ gint _tmp24_;
+ _tmp23_ = ix;
+ _tmp24_ = dw;
+ _tmp21_ = _tmp23_ > _tmp24_;
}
- if (_tmp11_) {
- _tmp10_ = TRUE;
+ _tmp25_ = _tmp21_;
+ if (_tmp25_) {
+ _tmp20_ = TRUE;
} else {
- _tmp10_ = iy < 0;
+ gint _tmp26_;
+ _tmp26_ = iy;
+ _tmp20_ = _tmp26_ < 0;
}
- if (_tmp10_) {
- _tmp9_ = TRUE;
+ _tmp27_ = _tmp20_;
+ if (_tmp27_) {
+ _tmp19_ = TRUE;
} else {
- _tmp9_ = iy > dh;
+ gint _tmp28_;
+ gint _tmp29_;
+ _tmp28_ = iy;
+ _tmp29_ = dh;
+ _tmp19_ = _tmp28_ > _tmp29_;
}
- if (_tmp9_) {
+ _tmp30_ = _tmp19_;
+ if (_tmp30_) {
result = CROP_LOCATION_NONE;
return result;
}
- _tmp12_ = page_get_named_crop (self->priv->page);
- name = _tmp12_;
- if (name != NULL) {
+ _tmp31_ = self->priv->page;
+ _tmp32_ = page_get_named_crop (_tmp31_);
+ name = _tmp32_;
+ _tmp33_ = name;
+ if (_tmp33_ != NULL) {
result = CROP_LOCATION_MIDDLE;
_g_free0 (name);
return result;
}
crop_border = 20;
- if (dw < (crop_border * 3)) {
- crop_border = dw / 3;
+ _tmp34_ = dw;
+ _tmp35_ = crop_border;
+ if (_tmp34_ < (_tmp35_ * 3)) {
+ gint _tmp36_;
+ _tmp36_ = dw;
+ crop_border = _tmp36_ / 3;
}
- if (dh < (crop_border * 3)) {
- crop_border = dh / 3;
+ _tmp37_ = dh;
+ _tmp38_ = crop_border;
+ if (_tmp37_ < (_tmp38_ * 3)) {
+ gint _tmp39_;
+ _tmp39_ = dh;
+ crop_border = _tmp39_ / 3;
}
- if (ix < crop_border) {
- _tmp13_ = iy < crop_border;
+ _tmp41_ = ix;
+ _tmp42_ = crop_border;
+ if (_tmp41_ < _tmp42_) {
+ gint _tmp43_;
+ gint _tmp44_;
+ _tmp43_ = iy;
+ _tmp44_ = crop_border;
+ _tmp40_ = _tmp43_ < _tmp44_;
} else {
- _tmp13_ = FALSE;
+ _tmp40_ = FALSE;
}
- if (_tmp13_) {
+ _tmp45_ = _tmp40_;
+ if (_tmp45_) {
result = CROP_LOCATION_TOP_LEFT;
_g_free0 (name);
return result;
}
- if (ix > (dw - crop_border)) {
- _tmp14_ = iy < crop_border;
+ _tmp47_ = ix;
+ _tmp48_ = dw;
+ _tmp49_ = crop_border;
+ if (_tmp47_ > (_tmp48_ - _tmp49_)) {
+ gint _tmp50_;
+ gint _tmp51_;
+ _tmp50_ = iy;
+ _tmp51_ = crop_border;
+ _tmp46_ = _tmp50_ < _tmp51_;
} else {
- _tmp14_ = FALSE;
+ _tmp46_ = FALSE;
}
- if (_tmp14_) {
+ _tmp52_ = _tmp46_;
+ if (_tmp52_) {
result = CROP_LOCATION_TOP_RIGHT;
_g_free0 (name);
return result;
}
- if (ix < crop_border) {
- _tmp15_ = iy > (dh - crop_border);
+ _tmp54_ = ix;
+ _tmp55_ = crop_border;
+ if (_tmp54_ < _tmp55_) {
+ gint _tmp56_;
+ gint _tmp57_;
+ gint _tmp58_;
+ _tmp56_ = iy;
+ _tmp57_ = dh;
+ _tmp58_ = crop_border;
+ _tmp53_ = _tmp56_ > (_tmp57_ - _tmp58_);
} else {
- _tmp15_ = FALSE;
+ _tmp53_ = FALSE;
}
- if (_tmp15_) {
+ _tmp59_ = _tmp53_;
+ if (_tmp59_) {
result = CROP_LOCATION_BOTTOM_LEFT;
_g_free0 (name);
return result;
}
- if (ix > (dw - crop_border)) {
- _tmp16_ = iy > (dh - crop_border);
+ _tmp61_ = ix;
+ _tmp62_ = dw;
+ _tmp63_ = crop_border;
+ if (_tmp61_ > (_tmp62_ - _tmp63_)) {
+ gint _tmp64_;
+ gint _tmp65_;
+ gint _tmp66_;
+ _tmp64_ = iy;
+ _tmp65_ = dh;
+ _tmp66_ = crop_border;
+ _tmp60_ = _tmp64_ > (_tmp65_ - _tmp66_);
} else {
- _tmp16_ = FALSE;
+ _tmp60_ = FALSE;
}
- if (_tmp16_) {
+ _tmp67_ = _tmp60_;
+ if (_tmp67_) {
result = CROP_LOCATION_BOTTOM_RIGHT;
_g_free0 (name);
return result;
}
- if (ix < crop_border) {
+ _tmp68_ = ix;
+ _tmp69_ = crop_border;
+ if (_tmp68_ < _tmp69_) {
result = CROP_LOCATION_LEFT;
_g_free0 (name);
return result;
}
- if (ix > (dw - crop_border)) {
+ _tmp70_ = ix;
+ _tmp71_ = dw;
+ _tmp72_ = crop_border;
+ if (_tmp70_ > (_tmp71_ - _tmp72_)) {
result = CROP_LOCATION_RIGHT;
_g_free0 (name);
return result;
}
- if (iy < crop_border) {
+ _tmp73_ = iy;
+ _tmp74_ = crop_border;
+ if (_tmp73_ < _tmp74_) {
result = CROP_LOCATION_TOP;
_g_free0 (name);
return result;
}
- if (iy > (dh - crop_border)) {
+ _tmp75_ = iy;
+ _tmp76_ = dh;
+ _tmp77_ = crop_border;
+ if (_tmp75_ > (_tmp76_ - _tmp77_)) {
result = CROP_LOCATION_BOTTOM;
_g_free0 (name);
return result;
@@ -1238,74 +2800,138 @@ static CropLocation page_view_get_crop_location (PageView* self, gint x, gint y)
void page_view_button_press (PageView* self, gint x, gint y) {
CropLocation location = 0;
- CropLocation _tmp0_;
+ gint _tmp0_;
+ gint _tmp1_;
+ CropLocation _tmp2_ = 0;
+ CropLocation _tmp3_;
g_return_if_fail (self != NULL);
- _tmp0_ = page_view_get_crop_location (self, x, y);
- location = _tmp0_;
- if (location != CROP_LOCATION_NONE) {
- gint _tmp1_;
- gint _tmp2_;
- gint _tmp3_;
- gint _tmp4_;
- self->priv->crop_location = location;
- self->priv->selected_crop_px = (gdouble) x;
- self->priv->selected_crop_py = (gdouble) y;
- page_get_crop (self->priv->page, &_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_);
- self->priv->selected_crop_x = _tmp1_;
- self->priv->selected_crop_y = _tmp2_;
- self->priv->selected_crop_w = _tmp3_;
- self->priv->selected_crop_h = _tmp4_;
+ _tmp0_ = x;
+ _tmp1_ = y;
+ _tmp2_ = page_view_get_crop_location (self, _tmp0_, _tmp1_);
+ location = _tmp2_;
+ _tmp3_ = location;
+ if (_tmp3_ != CROP_LOCATION_NONE) {
+ CropLocation _tmp4_;
+ gint _tmp5_;
+ gint _tmp6_;
+ Page* _tmp7_;
+ gint _tmp8_ = 0;
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ _tmp4_ = location;
+ self->priv->crop_location = _tmp4_;
+ _tmp5_ = x;
+ self->priv->selected_crop_px = (gdouble) _tmp5_;
+ _tmp6_ = y;
+ self->priv->selected_crop_py = (gdouble) _tmp6_;
+ _tmp7_ = self->priv->page;
+ page_get_crop (_tmp7_, &_tmp8_, &_tmp9_, &_tmp10_, &_tmp11_);
+ self->priv->selected_crop_x = _tmp8_;
+ self->priv->selected_crop_y = _tmp9_;
+ self->priv->selected_crop_w = _tmp10_;
+ self->priv->selected_crop_h = _tmp11_;
}
}
void page_view_motion (PageView* self, gint x, gint y) {
- CropLocation _tmp0_;
+ gint _tmp0_;
+ gint _tmp1_;
+ CropLocation _tmp2_ = 0;
CropLocation location;
GdkCursorType cursor = 0;
- gint _tmp1_;
+ CropLocation _tmp3_;
+ CropLocation _tmp4_;
+ Page* _tmp6_;
+ gint _tmp7_ = 0;
gint pw;
- gint _tmp2_;
+ Page* _tmp8_;
+ gint _tmp9_ = 0;
gint ph;
gint cx = 0;
gint cy = 0;
gint cw = 0;
gint ch = 0;
- gint _tmp3_;
- gint _tmp4_;
- gint _tmp5_;
- gint _tmp6_;
- gint _tmp7_;
+ Page* _tmp10_;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+ gint _tmp14_ = 0;
+ gint _tmp15_;
+ gdouble _tmp16_;
+ gint _tmp17_ = 0;
gint dx;
- gint _tmp8_;
+ gint _tmp18_;
+ gdouble _tmp19_;
+ gint _tmp20_ = 0;
gint dy;
+ gint _tmp21_;
gint new_x;
+ gint _tmp22_;
gint new_y;
+ gint _tmp23_;
gint new_w;
+ gint _tmp24_;
gint new_h;
- gint _tmp9_;
+ gint _tmp25_ = 0;
gint min_size;
- gboolean _tmp10_ = FALSE;
- gboolean _tmp11_ = FALSE;
- gboolean _tmp12_ = FALSE;
- gboolean _tmp13_ = FALSE;
- gboolean _tmp14_ = FALSE;
- gboolean _tmp15_ = FALSE;
- gboolean _tmp16_ = FALSE;
- gboolean _tmp17_ = FALSE;
- gboolean _tmp18_ = FALSE;
- gboolean _tmp19_ = FALSE;
- gboolean _tmp20_ = FALSE;
- gboolean _tmp21_ = FALSE;
- gboolean _tmp22_ = FALSE;
- gboolean _tmp23_ = FALSE;
- gboolean _tmp24_ = FALSE;
- gboolean _tmp25_ = FALSE;
gboolean _tmp26_ = FALSE;
+ gboolean _tmp27_ = FALSE;
+ CropLocation _tmp28_;
+ gboolean _tmp30_;
+ gboolean _tmp32_;
+ gboolean _tmp41_ = FALSE;
+ gboolean _tmp42_ = FALSE;
+ CropLocation _tmp43_;
+ gboolean _tmp45_;
+ gboolean _tmp47_;
+ gboolean _tmp56_ = FALSE;
+ gboolean _tmp57_ = FALSE;
+ CropLocation _tmp58_;
+ gboolean _tmp60_;
+ gboolean _tmp62_;
+ gboolean _tmp75_ = FALSE;
+ gboolean _tmp76_ = FALSE;
+ CropLocation _tmp77_;
+ gboolean _tmp79_;
+ gboolean _tmp81_;
+ CropLocation _tmp94_;
+ CropLocation _tmp115_;
+ gboolean _tmp120_ = FALSE;
+ gboolean _tmp121_ = FALSE;
+ CropLocation _tmp122_;
+ gboolean _tmp124_;
+ gboolean _tmp126_;
+ gboolean _tmp131_ = FALSE;
+ gboolean _tmp132_ = FALSE;
+ CropLocation _tmp133_;
+ gboolean _tmp135_;
+ gboolean _tmp137_;
+ gboolean _tmp142_ = FALSE;
+ gboolean _tmp143_ = FALSE;
+ CropLocation _tmp144_;
+ gboolean _tmp146_;
+ gboolean _tmp148_;
+ gboolean _tmp151_ = FALSE;
+ gboolean _tmp152_ = FALSE;
+ CropLocation _tmp153_;
+ gboolean _tmp155_;
+ gboolean _tmp157_;
+ Page* _tmp160_;
+ gint _tmp161_;
+ gint _tmp162_;
+ gboolean _tmp163_ = FALSE;
+ gint _tmp164_;
+ gint _tmp165_;
+ gboolean _tmp168_;
g_return_if_fail (self != NULL);
- _tmp0_ = page_view_get_crop_location (self, x, y);
- location = _tmp0_;
- switch (location) {
+ _tmp0_ = x;
+ _tmp1_ = y;
+ _tmp2_ = page_view_get_crop_location (self, _tmp0_, _tmp1_);
+ location = _tmp2_;
+ _tmp3_ = location;
+ switch (_tmp3_) {
case CROP_LOCATION_MIDDLE:
{
cursor = GDK_HAND1;
@@ -1357,181 +2983,421 @@ void page_view_motion (PageView* self, gint x, gint y) {
break;
}
}
- if (self->priv->crop_location == CROP_LOCATION_NONE) {
- self->priv->cursor = cursor;
+ _tmp4_ = self->priv->crop_location;
+ if (_tmp4_ == CROP_LOCATION_NONE) {
+ GdkCursorType _tmp5_;
+ _tmp5_ = cursor;
+ self->priv->cursor = _tmp5_;
return;
}
- _tmp1_ = page_get_width (self->priv->page);
- pw = _tmp1_;
- _tmp2_ = page_get_height (self->priv->page);
- ph = _tmp2_;
- page_get_crop (self->priv->page, &_tmp3_, &_tmp4_, &_tmp5_, &_tmp6_);
- cx = _tmp3_;
- cy = _tmp4_;
- cw = _tmp5_;
- ch = _tmp6_;
- _tmp7_ = page_view_screen_to_page_x (self, x - ((gint) self->priv->selected_crop_px));
- dx = _tmp7_;
- _tmp8_ = page_view_screen_to_page_y (self, y - ((gint) self->priv->selected_crop_py));
- dy = _tmp8_;
- new_x = self->priv->selected_crop_x;
- new_y = self->priv->selected_crop_y;
- new_w = self->priv->selected_crop_w;
- new_h = self->priv->selected_crop_h;
- _tmp9_ = page_view_screen_to_page_x (self, 15);
- min_size = _tmp9_;
- if (self->priv->crop_location == CROP_LOCATION_TOP_LEFT) {
- _tmp11_ = TRUE;
+ _tmp6_ = self->priv->page;
+ _tmp7_ = page_get_width (_tmp6_);
+ pw = _tmp7_;
+ _tmp8_ = self->priv->page;
+ _tmp9_ = page_get_height (_tmp8_);
+ ph = _tmp9_;
+ _tmp10_ = self->priv->page;
+ page_get_crop (_tmp10_, &_tmp11_, &_tmp12_, &_tmp13_, &_tmp14_);
+ cx = _tmp11_;
+ cy = _tmp12_;
+ cw = _tmp13_;
+ ch = _tmp14_;
+ _tmp15_ = x;
+ _tmp16_ = self->priv->selected_crop_px;
+ _tmp17_ = page_view_screen_to_page_x (self, _tmp15_ - ((gint) _tmp16_));
+ dx = _tmp17_;
+ _tmp18_ = y;
+ _tmp19_ = self->priv->selected_crop_py;
+ _tmp20_ = page_view_screen_to_page_y (self, _tmp18_ - ((gint) _tmp19_));
+ dy = _tmp20_;
+ _tmp21_ = self->priv->selected_crop_x;
+ new_x = _tmp21_;
+ _tmp22_ = self->priv->selected_crop_y;
+ new_y = _tmp22_;
+ _tmp23_ = self->priv->selected_crop_w;
+ new_w = _tmp23_;
+ _tmp24_ = self->priv->selected_crop_h;
+ new_h = _tmp24_;
+ _tmp25_ = page_view_screen_to_page_x (self, 15);
+ min_size = _tmp25_;
+ _tmp28_ = self->priv->crop_location;
+ if (_tmp28_ == CROP_LOCATION_TOP_LEFT) {
+ _tmp27_ = TRUE;
} else {
- _tmp11_ = self->priv->crop_location == CROP_LOCATION_LEFT;
+ CropLocation _tmp29_;
+ _tmp29_ = self->priv->crop_location;
+ _tmp27_ = _tmp29_ == CROP_LOCATION_LEFT;
}
- if (_tmp11_) {
- _tmp10_ = TRUE;
+ _tmp30_ = _tmp27_;
+ if (_tmp30_) {
+ _tmp26_ = TRUE;
} else {
- _tmp10_ = self->priv->crop_location == CROP_LOCATION_BOTTOM_LEFT;
+ CropLocation _tmp31_;
+ _tmp31_ = self->priv->crop_location;
+ _tmp26_ = _tmp31_ == CROP_LOCATION_BOTTOM_LEFT;
}
- if (_tmp10_) {
- if (dx > (new_w - min_size)) {
- dx = new_w - min_size;
+ _tmp32_ = _tmp26_;
+ if (_tmp32_) {
+ gint _tmp33_;
+ gint _tmp34_;
+ gint _tmp35_;
+ gint _tmp38_;
+ gint _tmp39_;
+ _tmp33_ = dx;
+ _tmp34_ = new_w;
+ _tmp35_ = min_size;
+ if (_tmp33_ > (_tmp34_ - _tmp35_)) {
+ gint _tmp36_;
+ gint _tmp37_;
+ _tmp36_ = new_w;
+ _tmp37_ = min_size;
+ dx = _tmp36_ - _tmp37_;
}
- if ((new_x + dx) < 0) {
- dx = -new_x;
+ _tmp38_ = new_x;
+ _tmp39_ = dx;
+ if ((_tmp38_ + _tmp39_) < 0) {
+ gint _tmp40_;
+ _tmp40_ = new_x;
+ dx = -_tmp40_;
}
}
- if (self->priv->crop_location == CROP_LOCATION_TOP_LEFT) {
- _tmp13_ = TRUE;
+ _tmp43_ = self->priv->crop_location;
+ if (_tmp43_ == CROP_LOCATION_TOP_LEFT) {
+ _tmp42_ = TRUE;
} else {
- _tmp13_ = self->priv->crop_location == CROP_LOCATION_TOP;
+ CropLocation _tmp44_;
+ _tmp44_ = self->priv->crop_location;
+ _tmp42_ = _tmp44_ == CROP_LOCATION_TOP;
}
- if (_tmp13_) {
- _tmp12_ = TRUE;
+ _tmp45_ = _tmp42_;
+ if (_tmp45_) {
+ _tmp41_ = TRUE;
} else {
- _tmp12_ = self->priv->crop_location == CROP_LOCATION_TOP_RIGHT;
+ CropLocation _tmp46_;
+ _tmp46_ = self->priv->crop_location;
+ _tmp41_ = _tmp46_ == CROP_LOCATION_TOP_RIGHT;
}
- if (_tmp12_) {
- if (dy > (new_h - min_size)) {
- dy = new_h - min_size;
+ _tmp47_ = _tmp41_;
+ if (_tmp47_) {
+ gint _tmp48_;
+ gint _tmp49_;
+ gint _tmp50_;
+ gint _tmp53_;
+ gint _tmp54_;
+ _tmp48_ = dy;
+ _tmp49_ = new_h;
+ _tmp50_ = min_size;
+ if (_tmp48_ > (_tmp49_ - _tmp50_)) {
+ gint _tmp51_;
+ gint _tmp52_;
+ _tmp51_ = new_h;
+ _tmp52_ = min_size;
+ dy = _tmp51_ - _tmp52_;
}
- if ((new_y + dy) < 0) {
- dy = -new_y;
+ _tmp53_ = new_y;
+ _tmp54_ = dy;
+ if ((_tmp53_ + _tmp54_) < 0) {
+ gint _tmp55_;
+ _tmp55_ = new_y;
+ dy = -_tmp55_;
}
}
- if (self->priv->crop_location == CROP_LOCATION_TOP_RIGHT) {
- _tmp15_ = TRUE;
+ _tmp58_ = self->priv->crop_location;
+ if (_tmp58_ == CROP_LOCATION_TOP_RIGHT) {
+ _tmp57_ = TRUE;
} else {
- _tmp15_ = self->priv->crop_location == CROP_LOCATION_RIGHT;
+ CropLocation _tmp59_;
+ _tmp59_ = self->priv->crop_location;
+ _tmp57_ = _tmp59_ == CROP_LOCATION_RIGHT;
}
- if (_tmp15_) {
- _tmp14_ = TRUE;
+ _tmp60_ = _tmp57_;
+ if (_tmp60_) {
+ _tmp56_ = TRUE;
} else {
- _tmp14_ = self->priv->crop_location == CROP_LOCATION_BOTTOM_RIGHT;
+ CropLocation _tmp61_;
+ _tmp61_ = self->priv->crop_location;
+ _tmp56_ = _tmp61_ == CROP_LOCATION_BOTTOM_RIGHT;
}
- if (_tmp14_) {
- if (dx < (min_size - new_w)) {
- dx = min_size - new_w;
+ _tmp62_ = _tmp56_;
+ if (_tmp62_) {
+ gint _tmp63_;
+ gint _tmp64_;
+ gint _tmp65_;
+ gint _tmp68_;
+ gint _tmp69_;
+ gint _tmp70_;
+ gint _tmp71_;
+ _tmp63_ = dx;
+ _tmp64_ = min_size;
+ _tmp65_ = new_w;
+ if (_tmp63_ < (_tmp64_ - _tmp65_)) {
+ gint _tmp66_;
+ gint _tmp67_;
+ _tmp66_ = min_size;
+ _tmp67_ = new_w;
+ dx = _tmp66_ - _tmp67_;
}
- if (((new_x + new_w) + dx) > pw) {
- dx = (pw - new_x) - new_w;
+ _tmp68_ = new_x;
+ _tmp69_ = new_w;
+ _tmp70_ = dx;
+ _tmp71_ = pw;
+ if (((_tmp68_ + _tmp69_) + _tmp70_) > _tmp71_) {
+ gint _tmp72_;
+ gint _tmp73_;
+ gint _tmp74_;
+ _tmp72_ = pw;
+ _tmp73_ = new_x;
+ _tmp74_ = new_w;
+ dx = (_tmp72_ - _tmp73_) - _tmp74_;
}
}
- if (self->priv->crop_location == CROP_LOCATION_BOTTOM_LEFT) {
- _tmp17_ = TRUE;
+ _tmp77_ = self->priv->crop_location;
+ if (_tmp77_ == CROP_LOCATION_BOTTOM_LEFT) {
+ _tmp76_ = TRUE;
} else {
- _tmp17_ = self->priv->crop_location == CROP_LOCATION_BOTTOM;
+ CropLocation _tmp78_;
+ _tmp78_ = self->priv->crop_location;
+ _tmp76_ = _tmp78_ == CROP_LOCATION_BOTTOM;
}
- if (_tmp17_) {
- _tmp16_ = TRUE;
+ _tmp79_ = _tmp76_;
+ if (_tmp79_) {
+ _tmp75_ = TRUE;
} else {
- _tmp16_ = self->priv->crop_location == CROP_LOCATION_BOTTOM_RIGHT;
+ CropLocation _tmp80_;
+ _tmp80_ = self->priv->crop_location;
+ _tmp75_ = _tmp80_ == CROP_LOCATION_BOTTOM_RIGHT;
}
- if (_tmp16_) {
- if (dy < (min_size - new_h)) {
- dy = min_size - new_h;
+ _tmp81_ = _tmp75_;
+ if (_tmp81_) {
+ gint _tmp82_;
+ gint _tmp83_;
+ gint _tmp84_;
+ gint _tmp87_;
+ gint _tmp88_;
+ gint _tmp89_;
+ gint _tmp90_;
+ _tmp82_ = dy;
+ _tmp83_ = min_size;
+ _tmp84_ = new_h;
+ if (_tmp82_ < (_tmp83_ - _tmp84_)) {
+ gint _tmp85_;
+ gint _tmp86_;
+ _tmp85_ = min_size;
+ _tmp86_ = new_h;
+ dy = _tmp85_ - _tmp86_;
}
- if (((new_y + new_h) + dy) > ph) {
- dy = (ph - new_y) - new_h;
+ _tmp87_ = new_y;
+ _tmp88_ = new_h;
+ _tmp89_ = dy;
+ _tmp90_ = ph;
+ if (((_tmp87_ + _tmp88_) + _tmp89_) > _tmp90_) {
+ gint _tmp91_;
+ gint _tmp92_;
+ gint _tmp93_;
+ _tmp91_ = ph;
+ _tmp92_ = new_y;
+ _tmp93_ = new_h;
+ dy = (_tmp91_ - _tmp92_) - _tmp93_;
}
}
- if (self->priv->crop_location == CROP_LOCATION_MIDDLE) {
- if (((new_x + dx) + new_w) > pw) {
- dx = (pw - new_x) - new_w;
+ _tmp94_ = self->priv->crop_location;
+ if (_tmp94_ == CROP_LOCATION_MIDDLE) {
+ gint _tmp95_;
+ gint _tmp96_;
+ gint _tmp97_;
+ gint _tmp98_;
+ gint _tmp102_;
+ gint _tmp103_;
+ gint _tmp105_;
+ gint _tmp106_;
+ gint _tmp107_;
+ gint _tmp108_;
+ gint _tmp112_;
+ gint _tmp113_;
+ _tmp95_ = new_x;
+ _tmp96_ = dx;
+ _tmp97_ = new_w;
+ _tmp98_ = pw;
+ if (((_tmp95_ + _tmp96_) + _tmp97_) > _tmp98_) {
+ gint _tmp99_;
+ gint _tmp100_;
+ gint _tmp101_;
+ _tmp99_ = pw;
+ _tmp100_ = new_x;
+ _tmp101_ = new_w;
+ dx = (_tmp99_ - _tmp100_) - _tmp101_;
}
- if ((new_x + dx) < 0) {
- dx = -new_x;
+ _tmp102_ = new_x;
+ _tmp103_ = dx;
+ if ((_tmp102_ + _tmp103_) < 0) {
+ gint _tmp104_;
+ _tmp104_ = new_x;
+ dx = -_tmp104_;
}
- if (((new_y + dy) + new_h) > ph) {
- dy = (ph - new_y) - new_h;
+ _tmp105_ = new_y;
+ _tmp106_ = dy;
+ _tmp107_ = new_h;
+ _tmp108_ = ph;
+ if (((_tmp105_ + _tmp106_) + _tmp107_) > _tmp108_) {
+ gint _tmp109_;
+ gint _tmp110_;
+ gint _tmp111_;
+ _tmp109_ = ph;
+ _tmp110_ = new_y;
+ _tmp111_ = new_h;
+ dy = (_tmp109_ - _tmp110_) - _tmp111_;
}
- if ((new_y + dy) < 0) {
- dy = -new_y;
+ _tmp112_ = new_y;
+ _tmp113_ = dy;
+ if ((_tmp112_ + _tmp113_) < 0) {
+ gint _tmp114_;
+ _tmp114_ = new_y;
+ dy = -_tmp114_;
}
}
- if (self->priv->crop_location == CROP_LOCATION_MIDDLE) {
- new_x = new_x + dx;
- new_y = new_y + dy;
+ _tmp115_ = self->priv->crop_location;
+ if (_tmp115_ == CROP_LOCATION_MIDDLE) {
+ gint _tmp116_;
+ gint _tmp117_;
+ gint _tmp118_;
+ gint _tmp119_;
+ _tmp116_ = new_x;
+ _tmp117_ = dx;
+ new_x = _tmp116_ + _tmp117_;
+ _tmp118_ = new_y;
+ _tmp119_ = dy;
+ new_y = _tmp118_ + _tmp119_;
}
- if (self->priv->crop_location == CROP_LOCATION_TOP_LEFT) {
- _tmp19_ = TRUE;
+ _tmp122_ = self->priv->crop_location;
+ if (_tmp122_ == CROP_LOCATION_TOP_LEFT) {
+ _tmp121_ = TRUE;
} else {
- _tmp19_ = self->priv->crop_location == CROP_LOCATION_LEFT;
+ CropLocation _tmp123_;
+ _tmp123_ = self->priv->crop_location;
+ _tmp121_ = _tmp123_ == CROP_LOCATION_LEFT;
}
- if (_tmp19_) {
- _tmp18_ = TRUE;
+ _tmp124_ = _tmp121_;
+ if (_tmp124_) {
+ _tmp120_ = TRUE;
} else {
- _tmp18_ = self->priv->crop_location == CROP_LOCATION_BOTTOM_LEFT;
+ CropLocation _tmp125_;
+ _tmp125_ = self->priv->crop_location;
+ _tmp120_ = _tmp125_ == CROP_LOCATION_BOTTOM_LEFT;
}
- if (_tmp18_) {
- new_x = new_x + dx;
- new_w = new_w - dx;
+ _tmp126_ = _tmp120_;
+ if (_tmp126_) {
+ gint _tmp127_;
+ gint _tmp128_;
+ gint _tmp129_;
+ gint _tmp130_;
+ _tmp127_ = new_x;
+ _tmp128_ = dx;
+ new_x = _tmp127_ + _tmp128_;
+ _tmp129_ = new_w;
+ _tmp130_ = dx;
+ new_w = _tmp129_ - _tmp130_;
}
- if (self->priv->crop_location == CROP_LOCATION_TOP_LEFT) {
- _tmp21_ = TRUE;
+ _tmp133_ = self->priv->crop_location;
+ if (_tmp133_ == CROP_LOCATION_TOP_LEFT) {
+ _tmp132_ = TRUE;
} else {
- _tmp21_ = self->priv->crop_location == CROP_LOCATION_TOP;
+ CropLocation _tmp134_;
+ _tmp134_ = self->priv->crop_location;
+ _tmp132_ = _tmp134_ == CROP_LOCATION_TOP;
}
- if (_tmp21_) {
- _tmp20_ = TRUE;
+ _tmp135_ = _tmp132_;
+ if (_tmp135_) {
+ _tmp131_ = TRUE;
} else {
- _tmp20_ = self->priv->crop_location == CROP_LOCATION_TOP_RIGHT;
+ CropLocation _tmp136_;
+ _tmp136_ = self->priv->crop_location;
+ _tmp131_ = _tmp136_ == CROP_LOCATION_TOP_RIGHT;
}
- if (_tmp20_) {
- new_y = new_y + dy;
- new_h = new_h - dy;
+ _tmp137_ = _tmp131_;
+ if (_tmp137_) {
+ gint _tmp138_;
+ gint _tmp139_;
+ gint _tmp140_;
+ gint _tmp141_;
+ _tmp138_ = new_y;
+ _tmp139_ = dy;
+ new_y = _tmp138_ + _tmp139_;
+ _tmp140_ = new_h;
+ _tmp141_ = dy;
+ new_h = _tmp140_ - _tmp141_;
}
- if (self->priv->crop_location == CROP_LOCATION_TOP_RIGHT) {
- _tmp23_ = TRUE;
+ _tmp144_ = self->priv->crop_location;
+ if (_tmp144_ == CROP_LOCATION_TOP_RIGHT) {
+ _tmp143_ = TRUE;
} else {
- _tmp23_ = self->priv->crop_location == CROP_LOCATION_RIGHT;
+ CropLocation _tmp145_;
+ _tmp145_ = self->priv->crop_location;
+ _tmp143_ = _tmp145_ == CROP_LOCATION_RIGHT;
}
- if (_tmp23_) {
- _tmp22_ = TRUE;
+ _tmp146_ = _tmp143_;
+ if (_tmp146_) {
+ _tmp142_ = TRUE;
} else {
- _tmp22_ = self->priv->crop_location == CROP_LOCATION_BOTTOM_RIGHT;
+ CropLocation _tmp147_;
+ _tmp147_ = self->priv->crop_location;
+ _tmp142_ = _tmp147_ == CROP_LOCATION_BOTTOM_RIGHT;
}
- if (_tmp22_) {
- new_w = new_w + dx;
+ _tmp148_ = _tmp142_;
+ if (_tmp148_) {
+ gint _tmp149_;
+ gint _tmp150_;
+ _tmp149_ = new_w;
+ _tmp150_ = dx;
+ new_w = _tmp149_ + _tmp150_;
}
- if (self->priv->crop_location == CROP_LOCATION_BOTTOM_LEFT) {
- _tmp25_ = TRUE;
+ _tmp153_ = self->priv->crop_location;
+ if (_tmp153_ == CROP_LOCATION_BOTTOM_LEFT) {
+ _tmp152_ = TRUE;
} else {
- _tmp25_ = self->priv->crop_location == CROP_LOCATION_BOTTOM;
+ CropLocation _tmp154_;
+ _tmp154_ = self->priv->crop_location;
+ _tmp152_ = _tmp154_ == CROP_LOCATION_BOTTOM;
}
- if (_tmp25_) {
- _tmp24_ = TRUE;
+ _tmp155_ = _tmp152_;
+ if (_tmp155_) {
+ _tmp151_ = TRUE;
} else {
- _tmp24_ = self->priv->crop_location == CROP_LOCATION_BOTTOM_RIGHT;
+ CropLocation _tmp156_;
+ _tmp156_ = self->priv->crop_location;
+ _tmp151_ = _tmp156_ == CROP_LOCATION_BOTTOM_RIGHT;
}
- if (_tmp24_) {
- new_h = new_h + dy;
+ _tmp157_ = _tmp151_;
+ if (_tmp157_) {
+ gint _tmp158_;
+ gint _tmp159_;
+ _tmp158_ = new_h;
+ _tmp159_ = dy;
+ new_h = _tmp158_ + _tmp159_;
}
- page_move_crop (self->priv->page, new_x, new_y);
- if (new_w != cw) {
- _tmp26_ = TRUE;
+ _tmp160_ = self->priv->page;
+ _tmp161_ = new_x;
+ _tmp162_ = new_y;
+ page_move_crop (_tmp160_, _tmp161_, _tmp162_);
+ _tmp164_ = new_w;
+ _tmp165_ = cw;
+ if (_tmp164_ != _tmp165_) {
+ _tmp163_ = TRUE;
} else {
- _tmp26_ = new_h != ch;
+ gint _tmp166_;
+ gint _tmp167_;
+ _tmp166_ = new_h;
+ _tmp167_ = ch;
+ _tmp163_ = _tmp166_ != _tmp167_;
}
- if (_tmp26_) {
- page_set_custom_crop (self->priv->page, new_w, new_h);
+ _tmp168_ = _tmp163_;
+ if (_tmp168_) {
+ Page* _tmp169_;
+ gint _tmp170_;
+ gint _tmp171_;
+ _tmp169_ = self->priv->page;
+ _tmp170_ = new_w;
+ _tmp171_ = new_h;
+ page_set_custom_crop (_tmp169_, _tmp170_, _tmp171_);
}
}
@@ -1545,16 +3411,22 @@ void page_view_button_release (PageView* self, gint x, gint y) {
GdkCursorType page_view_get_cursor (PageView* self) {
GdkCursorType result = 0;
+ GdkCursorType _tmp0_;
g_return_val_if_fail (self != NULL, 0);
- result = self->priv->cursor;
+ _tmp0_ = self->priv->cursor;
+ result = _tmp0_;
return result;
}
static gboolean page_view_animation_cb (PageView* self) {
gboolean result = FALSE;
+ gint _tmp0_;
+ gint _tmp1_;
g_return_val_if_fail (self != NULL, FALSE);
- self->priv->animate_segment = (self->priv->animate_segment + 1) % self->priv->animate_n_segments;
+ _tmp0_ = self->priv->animate_segment;
+ _tmp1_ = self->priv->animate_n_segments;
+ self->priv->animate_segment = (_tmp0_ + 1) % _tmp1_;
g_signal_emit_by_name (self, "changed");
result = TRUE;
return result;
@@ -1572,31 +3444,51 @@ static void page_view_update_animation (PageView* self) {
gboolean animate = FALSE;
gboolean is_animating = FALSE;
gboolean _tmp0_ = FALSE;
- gboolean _tmp1_;
+ Page* _tmp1_;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp5_;
+ guint _tmp6_;
+ gboolean _tmp7_;
+ gboolean _tmp8_;
+ gboolean _tmp9_;
g_return_if_fail (self != NULL);
- _tmp1_ = page_is_scanning (self->priv->page);
- if (_tmp1_) {
- gboolean _tmp2_;
- _tmp2_ = page_has_data (self->priv->page);
- _tmp0_ = !_tmp2_;
+ _tmp1_ = self->priv->page;
+ _tmp2_ = page_is_scanning (_tmp1_);
+ if (_tmp2_) {
+ Page* _tmp3_;
+ gboolean _tmp4_ = FALSE;
+ _tmp3_ = self->priv->page;
+ _tmp4_ = page_has_data (_tmp3_);
+ _tmp0_ = !_tmp4_;
} else {
_tmp0_ = FALSE;
}
- animate = _tmp0_;
- is_animating = self->priv->animate_timeout != ((guint) 0);
- if (animate == is_animating) {
+ _tmp5_ = _tmp0_;
+ animate = _tmp5_;
+ _tmp6_ = self->priv->animate_timeout;
+ is_animating = _tmp6_ != ((guint) 0);
+ _tmp7_ = animate;
+ _tmp8_ = is_animating;
+ if (_tmp7_ == _tmp8_) {
return;
}
- if (animate) {
+ _tmp9_ = animate;
+ if (_tmp9_) {
+ guint _tmp10_;
self->priv->animate_segment = 0;
- if (self->priv->animate_timeout == ((guint) 0)) {
- guint _tmp3_;
- _tmp3_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 150, _page_view_animation_cb_gsource_func, page_view_ref (self), page_view_unref);
- self->priv->animate_timeout = _tmp3_;
+ _tmp10_ = self->priv->animate_timeout;
+ if (_tmp10_ == ((guint) 0)) {
+ guint _tmp11_ = 0U;
+ _tmp11_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 150, _page_view_animation_cb_gsource_func, page_view_ref (self), page_view_unref);
+ self->priv->animate_timeout = _tmp11_;
}
} else {
- if (self->priv->animate_timeout != ((guint) 0)) {
- g_source_remove (self->priv->animate_timeout);
+ guint _tmp12_;
+ _tmp12_ = self->priv->animate_timeout;
+ if (_tmp12_ != ((guint) 0)) {
+ guint _tmp13_;
+ _tmp13_ = self->priv->animate_timeout;
+ g_source_remove (_tmp13_);
}
self->priv->animate_timeout = (guint) 0;
}
@@ -1604,15 +3496,41 @@ static void page_view_update_animation (PageView* self) {
void page_view_render (PageView* self, cairo_t* context) {
- gint _tmp0_;
+ gint _tmp0_ = 0;
gint w;
- gint _tmp1_;
+ gint _tmp1_ = 0;
gint h;
- gboolean _tmp2_ = FALSE;
- gboolean _tmp3_;
- gboolean _tmp11_ = FALSE;
- gboolean _tmp12_;
- gboolean _tmp20_;
+ cairo_t* _tmp2_;
+ cairo_t* _tmp3_;
+ gint _tmp4_;
+ gint _tmp5_;
+ cairo_t* _tmp6_;
+ cairo_t* _tmp7_;
+ gint _tmp8_;
+ cairo_t* _tmp9_;
+ gint _tmp10_;
+ gint _tmp11_;
+ gint _tmp12_;
+ gint _tmp13_;
+ gint _tmp14_;
+ gint _tmp15_;
+ cairo_t* _tmp16_;
+ cairo_t* _tmp17_;
+ gint _tmp18_;
+ gint _tmp19_;
+ cairo_t* _tmp20_;
+ GdkPixbuf* _tmp21_;
+ cairo_t* _tmp22_;
+ gboolean _tmp23_ = FALSE;
+ Page* _tmp24_;
+ gboolean _tmp25_ = FALSE;
+ gboolean _tmp28_;
+ gboolean _tmp70_ = FALSE;
+ Page* _tmp71_;
+ gboolean _tmp72_ = FALSE;
+ gboolean _tmp75_;
+ Page* _tmp115_;
+ gboolean _tmp116_ = FALSE;
g_return_if_fail (self != NULL);
g_return_if_fail (context != NULL);
page_view_update_animation (self);
@@ -1621,223 +3539,471 @@ void page_view_render (PageView* self, cairo_t* context) {
w = _tmp0_;
_tmp1_ = page_view_get_preview_height (self);
h = _tmp1_;
- cairo_set_line_width (context, (gdouble) 1);
- cairo_translate (context, (gdouble) self->priv->x_offset, (gdouble) self->priv->y_offset);
- cairo_set_source_rgb (context, (gdouble) 0, (gdouble) 0, (gdouble) 0);
- cairo_set_line_width (context, (gdouble) self->priv->border_width);
- cairo_rectangle (context, ((gdouble) self->priv->border_width) / 2, ((gdouble) self->priv->border_width) / 2, (gdouble) (self->priv->width - self->priv->border_width), (gdouble) (self->priv->height - self->priv->border_width));
- cairo_stroke (context);
- cairo_translate (context, (gdouble) self->priv->border_width, (gdouble) self->priv->border_width);
- gdk_cairo_set_source_pixbuf (context, self->priv->image, (gdouble) 0, (gdouble) 0);
- cairo_paint (context);
- _tmp3_ = page_is_scanning (self->priv->page);
- if (_tmp3_) {
- gboolean _tmp4_;
- _tmp4_ = page_has_data (self->priv->page);
- _tmp2_ = !_tmp4_;
+ _tmp2_ = context;
+ cairo_set_line_width (_tmp2_, (gdouble) 1);
+ _tmp3_ = context;
+ _tmp4_ = self->priv->x_offset;
+ _tmp5_ = self->priv->y_offset;
+ cairo_translate (_tmp3_, (gdouble) _tmp4_, (gdouble) _tmp5_);
+ _tmp6_ = context;
+ cairo_set_source_rgb (_tmp6_, (gdouble) 0, (gdouble) 0, (gdouble) 0);
+ _tmp7_ = context;
+ _tmp8_ = self->priv->border_width;
+ cairo_set_line_width (_tmp7_, (gdouble) _tmp8_);
+ _tmp9_ = context;
+ _tmp10_ = self->priv->border_width;
+ _tmp11_ = self->priv->border_width;
+ _tmp12_ = self->priv->width;
+ _tmp13_ = self->priv->border_width;
+ _tmp14_ = self->priv->height;
+ _tmp15_ = self->priv->border_width;
+ cairo_rectangle (_tmp9_, ((gdouble) _tmp10_) / 2, ((gdouble) _tmp11_) / 2, (gdouble) (_tmp12_ - _tmp13_), (gdouble) (_tmp14_ - _tmp15_));
+ _tmp16_ = context;
+ cairo_stroke (_tmp16_);
+ _tmp17_ = context;
+ _tmp18_ = self->priv->border_width;
+ _tmp19_ = self->priv->border_width;
+ cairo_translate (_tmp17_, (gdouble) _tmp18_, (gdouble) _tmp19_);
+ _tmp20_ = context;
+ _tmp21_ = self->priv->image;
+ gdk_cairo_set_source_pixbuf (_tmp20_, _tmp21_, (gdouble) 0, (gdouble) 0);
+ _tmp22_ = context;
+ cairo_paint (_tmp22_);
+ _tmp24_ = self->priv->page;
+ _tmp25_ = page_is_scanning (_tmp24_);
+ if (_tmp25_) {
+ Page* _tmp26_;
+ gboolean _tmp27_ = FALSE;
+ _tmp26_ = self->priv->page;
+ _tmp27_ = page_has_data (_tmp26_);
+ _tmp23_ = !_tmp27_;
} else {
- _tmp2_ = FALSE;
+ _tmp23_ = FALSE;
}
- if (_tmp2_) {
+ _tmp28_ = _tmp23_;
+ if (_tmp28_) {
gdouble outer_radius = 0.0;
+ gint _tmp29_;
+ gint _tmp30_;
+ gint _tmp33_;
gdouble arc;
- gdouble _tmp5_;
+ gdouble _tmp34_;
+ gdouble _tmp35_;
+ gdouble _tmp36_ = 0.0;
gdouble x;
- gdouble _tmp6_;
+ gdouble _tmp37_;
+ gdouble _tmp38_;
+ gdouble _tmp39_ = 0.0;
gdouble y;
- gdouble _tmp7_;
+ gdouble _tmp40_;
+ gdouble _tmp41_;
+ gdouble _tmp42_;
+ gdouble _tmp43_;
+ gdouble _tmp44_ = 0.0;
gdouble inner_radius;
gdouble offset;
- if (w > h) {
- outer_radius = 0.15 * w;
+ _tmp29_ = w;
+ _tmp30_ = h;
+ if (_tmp29_ > _tmp30_) {
+ gint _tmp31_;
+ _tmp31_ = w;
+ outer_radius = 0.15 * _tmp31_;
} else {
- outer_radius = 0.15 * h;
+ gint _tmp32_;
+ _tmp32_ = h;
+ outer_radius = 0.15 * _tmp32_;
}
- arc = G_PI / self->priv->animate_n_segments;
- _tmp5_ = sin (arc);
- x = outer_radius * _tmp5_;
- _tmp6_ = cos (arc);
- y = outer_radius * (_tmp6_ - 1.0);
- _tmp7_ = sqrt ((x * x) + (y * y));
- inner_radius = 0.6 * _tmp7_;
+ _tmp33_ = self->priv->animate_n_segments;
+ arc = G_PI / _tmp33_;
+ _tmp34_ = outer_radius;
+ _tmp35_ = arc;
+ _tmp36_ = sin (_tmp35_);
+ x = _tmp34_ * _tmp36_;
+ _tmp37_ = outer_radius;
+ _tmp38_ = arc;
+ _tmp39_ = cos (_tmp38_);
+ y = _tmp37_ * (_tmp39_ - 1.0);
+ _tmp40_ = x;
+ _tmp41_ = x;
+ _tmp42_ = y;
+ _tmp43_ = y;
+ _tmp44_ = sqrt ((_tmp40_ * _tmp41_) + (_tmp42_ * _tmp43_));
+ inner_radius = 0.6 * _tmp44_;
offset = 0.0;
{
gint i;
i = 0;
{
- gboolean _tmp8_;
- _tmp8_ = TRUE;
+ gboolean _tmp45_;
+ _tmp45_ = TRUE;
while (TRUE) {
- gdouble _tmp9_;
- gdouble _tmp10_;
- if (!_tmp8_) {
- i++;
- offset = offset + (arc * 2);
+ gboolean _tmp46_;
+ gint _tmp50_;
+ gint _tmp51_;
+ gint _tmp52_;
+ gdouble _tmp53_;
+ gdouble _tmp54_;
+ gdouble _tmp55_ = 0.0;
+ gint _tmp56_;
+ gdouble _tmp57_;
+ gdouble _tmp58_;
+ gdouble _tmp59_ = 0.0;
+ cairo_t* _tmp60_;
+ gdouble _tmp61_;
+ gdouble _tmp62_;
+ gdouble _tmp63_;
+ gint _tmp64_;
+ gint _tmp65_;
+ cairo_t* _tmp68_;
+ cairo_t* _tmp69_;
+ _tmp46_ = _tmp45_;
+ if (!_tmp46_) {
+ gint _tmp47_;
+ gdouble _tmp48_;
+ gdouble _tmp49_;
+ _tmp47_ = i;
+ i = _tmp47_ + 1;
+ _tmp48_ = offset;
+ _tmp49_ = arc;
+ offset = _tmp48_ + (_tmp49_ * 2);
}
- _tmp8_ = FALSE;
- if (!(i < self->priv->animate_n_segments)) {
+ _tmp45_ = FALSE;
+ _tmp50_ = i;
+ _tmp51_ = self->priv->animate_n_segments;
+ if (!(_tmp50_ < _tmp51_)) {
break;
}
- _tmp9_ = sin (offset);
- x = (w / 2) + (outer_radius * _tmp9_);
- _tmp10_ = cos (offset);
- y = (h / 2) - (outer_radius * _tmp10_);
- cairo_arc (context, x, y, inner_radius, (gdouble) 0, 2 * G_PI);
- if (i == self->priv->animate_segment) {
- cairo_set_source_rgb (context, 0.75, 0.75, 0.75);
- cairo_fill_preserve (context);
+ _tmp52_ = w;
+ _tmp53_ = outer_radius;
+ _tmp54_ = offset;
+ _tmp55_ = sin (_tmp54_);
+ x = (_tmp52_ / 2) + (_tmp53_ * _tmp55_);
+ _tmp56_ = h;
+ _tmp57_ = outer_radius;
+ _tmp58_ = offset;
+ _tmp59_ = cos (_tmp58_);
+ y = (_tmp56_ / 2) - (_tmp57_ * _tmp59_);
+ _tmp60_ = context;
+ _tmp61_ = x;
+ _tmp62_ = y;
+ _tmp63_ = inner_radius;
+ cairo_arc (_tmp60_, _tmp61_, _tmp62_, _tmp63_, (gdouble) 0, 2 * G_PI);
+ _tmp64_ = i;
+ _tmp65_ = self->priv->animate_segment;
+ if (_tmp64_ == _tmp65_) {
+ cairo_t* _tmp66_;
+ cairo_t* _tmp67_;
+ _tmp66_ = context;
+ cairo_set_source_rgb (_tmp66_, 0.75, 0.75, 0.75);
+ _tmp67_ = context;
+ cairo_fill_preserve (_tmp67_);
}
- cairo_set_source_rgb (context, 0.5, 0.5, 0.5);
- cairo_stroke (context);
+ _tmp68_ = context;
+ cairo_set_source_rgb (_tmp68_, 0.5, 0.5, 0.5);
+ _tmp69_ = context;
+ cairo_stroke (_tmp69_);
}
}
}
}
- _tmp12_ = page_is_scanning (self->priv->page);
- if (_tmp12_) {
- gint _tmp13_;
- _tmp13_ = page_get_scan_line (self->priv->page);
- _tmp11_ = _tmp13_ > 0;
+ _tmp71_ = self->priv->page;
+ _tmp72_ = page_is_scanning (_tmp71_);
+ if (_tmp72_) {
+ Page* _tmp73_;
+ gint _tmp74_ = 0;
+ _tmp73_ = self->priv->page;
+ _tmp74_ = page_get_scan_line (_tmp73_);
+ _tmp70_ = _tmp74_ > 0;
} else {
- _tmp11_ = FALSE;
+ _tmp70_ = FALSE;
}
- if (_tmp11_) {
- gint _tmp14_;
+ _tmp75_ = _tmp70_;
+ if (_tmp75_) {
+ Page* _tmp76_;
+ gint _tmp77_ = 0;
gint scan_line;
gdouble s = 0.0;
gdouble x1 = 0.0;
gdouble y1 = 0.0;
gdouble x2 = 0.0;
gdouble y2 = 0.0;
- ScanDirection _tmp15_;
- _tmp14_ = page_get_scan_line (self->priv->page);
- scan_line = _tmp14_;
- _tmp15_ = page_get_scan_direction (self->priv->page);
- switch (_tmp15_) {
+ Page* _tmp78_;
+ ScanDirection _tmp79_ = 0;
+ cairo_t* _tmp107_;
+ gdouble _tmp108_;
+ gdouble _tmp109_;
+ cairo_t* _tmp110_;
+ gdouble _tmp111_;
+ gdouble _tmp112_;
+ cairo_t* _tmp113_;
+ cairo_t* _tmp114_;
+ _tmp76_ = self->priv->page;
+ _tmp77_ = page_get_scan_line (_tmp76_);
+ scan_line = _tmp77_;
+ _tmp78_ = self->priv->page;
+ _tmp79_ = page_get_scan_direction (_tmp78_);
+ switch (_tmp79_) {
case SCAN_DIRECTION_TOP_TO_BOTTOM:
{
- gint _tmp16_;
- _tmp16_ = page_view_page_to_screen_y (self, scan_line);
- s = (gdouble) _tmp16_;
+ gint _tmp80_;
+ gint _tmp81_ = 0;
+ gdouble _tmp82_;
+ gint _tmp83_;
+ gdouble _tmp84_;
+ _tmp80_ = scan_line;
+ _tmp81_ = page_view_page_to_screen_y (self, _tmp80_);
+ s = (gdouble) _tmp81_;
x1 = (gdouble) 0;
- y1 = s + 0.5;
- x2 = (gdouble) w;
- y2 = s + 0.5;
+ _tmp82_ = s;
+ y1 = _tmp82_ + 0.5;
+ _tmp83_ = w;
+ x2 = (gdouble) _tmp83_;
+ _tmp84_ = s;
+ y2 = _tmp84_ + 0.5;
break;
}
case SCAN_DIRECTION_BOTTOM_TO_TOP:
{
- gint _tmp17_;
- _tmp17_ = page_view_page_to_screen_y (self, scan_line);
- s = (gdouble) _tmp17_;
+ gint _tmp85_;
+ gint _tmp86_ = 0;
+ gint _tmp87_;
+ gdouble _tmp88_;
+ gint _tmp89_;
+ gint _tmp90_;
+ gdouble _tmp91_;
+ _tmp85_ = scan_line;
+ _tmp86_ = page_view_page_to_screen_y (self, _tmp85_);
+ s = (gdouble) _tmp86_;
x1 = (gdouble) 0;
- y1 = (h - s) + 0.5;
- x2 = (gdouble) w;
- y2 = (h - s) + 0.5;
+ _tmp87_ = h;
+ _tmp88_ = s;
+ y1 = (_tmp87_ - _tmp88_) + 0.5;
+ _tmp89_ = w;
+ x2 = (gdouble) _tmp89_;
+ _tmp90_ = h;
+ _tmp91_ = s;
+ y2 = (_tmp90_ - _tmp91_) + 0.5;
break;
}
case SCAN_DIRECTION_LEFT_TO_RIGHT:
{
- gint _tmp18_;
- _tmp18_ = page_view_page_to_screen_x (self, scan_line);
- s = (gdouble) _tmp18_;
- x1 = s + 0.5;
+ gint _tmp92_;
+ gint _tmp93_ = 0;
+ gdouble _tmp94_;
+ gdouble _tmp95_;
+ gint _tmp96_;
+ _tmp92_ = scan_line;
+ _tmp93_ = page_view_page_to_screen_x (self, _tmp92_);
+ s = (gdouble) _tmp93_;
+ _tmp94_ = s;
+ x1 = _tmp94_ + 0.5;
y1 = (gdouble) 0;
- x2 = s + 0.5;
- y2 = (gdouble) h;
+ _tmp95_ = s;
+ x2 = _tmp95_ + 0.5;
+ _tmp96_ = h;
+ y2 = (gdouble) _tmp96_;
break;
}
case SCAN_DIRECTION_RIGHT_TO_LEFT:
{
- gint _tmp19_;
- _tmp19_ = page_view_page_to_screen_x (self, scan_line);
- s = (gdouble) _tmp19_;
- x1 = (w - s) + 0.5;
+ gint _tmp97_;
+ gint _tmp98_ = 0;
+ gint _tmp99_;
+ gdouble _tmp100_;
+ gint _tmp101_;
+ gdouble _tmp102_;
+ gint _tmp103_;
+ _tmp97_ = scan_line;
+ _tmp98_ = page_view_page_to_screen_x (self, _tmp97_);
+ s = (gdouble) _tmp98_;
+ _tmp99_ = w;
+ _tmp100_ = s;
+ x1 = (_tmp99_ - _tmp100_) + 0.5;
y1 = (gdouble) 0;
- x2 = (w - s) + 0.5;
- y2 = (gdouble) h;
+ _tmp101_ = w;
+ _tmp102_ = s;
+ x2 = (_tmp101_ - _tmp102_) + 0.5;
+ _tmp103_ = h;
+ y2 = (gdouble) _tmp103_;
break;
}
default:
{
+ gdouble _tmp104_;
+ gdouble _tmp105_;
+ gdouble _tmp106_;
y2 = (gdouble) 0;
- x2 = y2;
- y1 = x2;
- x1 = y1;
+ _tmp104_ = y2;
+ x2 = _tmp104_;
+ _tmp105_ = x2;
+ y1 = _tmp105_;
+ _tmp106_ = y1;
+ x1 = _tmp106_;
break;
}
}
- cairo_move_to (context, x1, y1);
- cairo_line_to (context, x2, y2);
- cairo_set_source_rgb (context, 1.0, 0.0, 0.0);
- cairo_stroke (context);
+ _tmp107_ = context;
+ _tmp108_ = x1;
+ _tmp109_ = y1;
+ cairo_move_to (_tmp107_, _tmp108_, _tmp109_);
+ _tmp110_ = context;
+ _tmp111_ = x2;
+ _tmp112_ = y2;
+ cairo_line_to (_tmp110_, _tmp111_, _tmp112_);
+ _tmp113_ = context;
+ cairo_set_source_rgb (_tmp113_, 1.0, 0.0, 0.0);
+ _tmp114_ = context;
+ cairo_stroke (_tmp114_);
}
- _tmp20_ = page_has_crop (self->priv->page);
- if (_tmp20_) {
+ _tmp115_ = self->priv->page;
+ _tmp116_ = page_has_crop (_tmp115_);
+ if (_tmp116_) {
gint x = 0;
gint y = 0;
gint crop_width = 0;
gint crop_height = 0;
- gint _tmp21_;
- gint _tmp22_;
- gint _tmp23_;
- gint _tmp24_;
- gint _tmp25_;
+ Page* _tmp117_;
+ gint _tmp118_ = 0;
+ gint _tmp119_ = 0;
+ gint _tmp120_ = 0;
+ gint _tmp121_ = 0;
+ gint _tmp122_;
+ gint _tmp123_ = 0;
gint dx;
- gint _tmp26_;
+ gint _tmp124_;
+ gint _tmp125_ = 0;
gint dy;
- gint _tmp27_;
+ gint _tmp126_;
+ gint _tmp127_ = 0;
gint dw;
- gint _tmp28_;
+ gint _tmp128_;
+ gint _tmp129_ = 0;
gint dh;
- page_get_crop (self->priv->page, &_tmp21_, &_tmp22_, &_tmp23_, &_tmp24_);
- x = _tmp21_;
- y = _tmp22_;
- crop_width = _tmp23_;
- crop_height = _tmp24_;
- _tmp25_ = page_view_page_to_screen_x (self, x);
- dx = _tmp25_;
- _tmp26_ = page_view_page_to_screen_y (self, y);
- dy = _tmp26_;
- _tmp27_ = page_view_page_to_screen_x (self, crop_width);
- dw = _tmp27_;
- _tmp28_ = page_view_page_to_screen_y (self, crop_height);
- dh = _tmp28_;
- cairo_rectangle (context, (gdouble) 0, (gdouble) 0, (gdouble) w, (gdouble) h);
- cairo_new_sub_path (context);
- cairo_rectangle (context, (gdouble) dx, (gdouble) dy, (gdouble) dw, (gdouble) dh);
- cairo_set_fill_rule (context, CAIRO_FILL_RULE_EVEN_ODD);
- cairo_set_source_rgba (context, 0.25, 0.25, 0.25, 0.2);
- cairo_fill (context);
- cairo_rectangle (context, dx - 1.5, dy - 1.5, (gdouble) (dw + 3), (gdouble) (dh + 3));
- cairo_set_source_rgb (context, 1.0, 1.0, 1.0);
- cairo_stroke (context);
- cairo_rectangle (context, dx - 0.5, dy - 0.5, (gdouble) (dw + 1), (gdouble) (dh + 1));
- cairo_set_source_rgb (context, 0.0, 0.0, 0.0);
- cairo_stroke (context);
+ cairo_t* _tmp130_;
+ gint _tmp131_;
+ gint _tmp132_;
+ cairo_t* _tmp133_;
+ cairo_t* _tmp134_;
+ gint _tmp135_;
+ gint _tmp136_;
+ gint _tmp137_;
+ gint _tmp138_;
+ cairo_t* _tmp139_;
+ cairo_t* _tmp140_;
+ cairo_t* _tmp141_;
+ cairo_t* _tmp142_;
+ gint _tmp143_;
+ gint _tmp144_;
+ gint _tmp145_;
+ gint _tmp146_;
+ cairo_t* _tmp147_;
+ cairo_t* _tmp148_;
+ cairo_t* _tmp149_;
+ gint _tmp150_;
+ gint _tmp151_;
+ gint _tmp152_;
+ gint _tmp153_;
+ cairo_t* _tmp154_;
+ cairo_t* _tmp155_;
+ _tmp117_ = self->priv->page;
+ page_get_crop (_tmp117_, &_tmp118_, &_tmp119_, &_tmp120_, &_tmp121_);
+ x = _tmp118_;
+ y = _tmp119_;
+ crop_width = _tmp120_;
+ crop_height = _tmp121_;
+ _tmp122_ = x;
+ _tmp123_ = page_view_page_to_screen_x (self, _tmp122_);
+ dx = _tmp123_;
+ _tmp124_ = y;
+ _tmp125_ = page_view_page_to_screen_y (self, _tmp124_);
+ dy = _tmp125_;
+ _tmp126_ = crop_width;
+ _tmp127_ = page_view_page_to_screen_x (self, _tmp126_);
+ dw = _tmp127_;
+ _tmp128_ = crop_height;
+ _tmp129_ = page_view_page_to_screen_y (self, _tmp128_);
+ dh = _tmp129_;
+ _tmp130_ = context;
+ _tmp131_ = w;
+ _tmp132_ = h;
+ cairo_rectangle (_tmp130_, (gdouble) 0, (gdouble) 0, (gdouble) _tmp131_, (gdouble) _tmp132_);
+ _tmp133_ = context;
+ cairo_new_sub_path (_tmp133_);
+ _tmp134_ = context;
+ _tmp135_ = dx;
+ _tmp136_ = dy;
+ _tmp137_ = dw;
+ _tmp138_ = dh;
+ cairo_rectangle (_tmp134_, (gdouble) _tmp135_, (gdouble) _tmp136_, (gdouble) _tmp137_, (gdouble) _tmp138_);
+ _tmp139_ = context;
+ cairo_set_fill_rule (_tmp139_, CAIRO_FILL_RULE_EVEN_ODD);
+ _tmp140_ = context;
+ cairo_set_source_rgba (_tmp140_, 0.25, 0.25, 0.25, 0.2);
+ _tmp141_ = context;
+ cairo_fill (_tmp141_);
+ _tmp142_ = context;
+ _tmp143_ = dx;
+ _tmp144_ = dy;
+ _tmp145_ = dw;
+ _tmp146_ = dh;
+ cairo_rectangle (_tmp142_, _tmp143_ - 1.5, _tmp144_ - 1.5, (gdouble) (_tmp145_ + 3), (gdouble) (_tmp146_ + 3));
+ _tmp147_ = context;
+ cairo_set_source_rgb (_tmp147_, 1.0, 1.0, 1.0);
+ _tmp148_ = context;
+ cairo_stroke (_tmp148_);
+ _tmp149_ = context;
+ _tmp150_ = dx;
+ _tmp151_ = dy;
+ _tmp152_ = dw;
+ _tmp153_ = dh;
+ cairo_rectangle (_tmp149_, _tmp150_ - 0.5, _tmp151_ - 0.5, (gdouble) (_tmp152_ + 1), (gdouble) (_tmp153_ + 1));
+ _tmp154_ = context;
+ cairo_set_source_rgb (_tmp154_, 0.0, 0.0, 0.0);
+ _tmp155_ = context;
+ cairo_stroke (_tmp155_);
}
}
void page_view_set_width (PageView* self, gint width) {
gint _tmp0_;
- gint _tmp1_;
+ Page* _tmp1_;
+ gint _tmp2_ = 0;
+ Page* _tmp3_;
+ gint _tmp4_ = 0;
gint height;
- gboolean _tmp2_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+ gint _tmp6_;
+ gint _tmp7_;
+ gboolean _tmp10_;
+ gint _tmp11_;
+ gint _tmp12_;
g_return_if_fail (self != NULL);
- _tmp0_ = page_get_height (self->priv->page);
- _tmp1_ = page_get_width (self->priv->page);
- height = (gint) ((((gdouble) width) * _tmp0_) / _tmp1_);
- if (self->priv->width == width) {
- _tmp2_ = self->priv->height == height;
+ _tmp0_ = width;
+ _tmp1_ = self->priv->page;
+ _tmp2_ = page_get_height (_tmp1_);
+ _tmp3_ = self->priv->page;
+ _tmp4_ = page_get_width (_tmp3_);
+ height = (gint) ((((gdouble) _tmp0_) * _tmp2_) / _tmp4_);
+ _tmp6_ = self->priv->width;
+ _tmp7_ = width;
+ if (_tmp6_ == _tmp7_) {
+ gint _tmp8_;
+ gint _tmp9_;
+ _tmp8_ = self->priv->height;
+ _tmp9_ = height;
+ _tmp5_ = _tmp8_ == _tmp9_;
} else {
- _tmp2_ = FALSE;
+ _tmp5_ = FALSE;
}
- if (_tmp2_) {
+ _tmp10_ = _tmp5_;
+ if (_tmp10_) {
return;
}
- self->priv->width = width;
- self->priv->height = height;
+ _tmp11_ = width;
+ self->priv->width = _tmp11_;
+ _tmp12_ = height;
+ self->priv->height = _tmp12_;
self->priv->update_image = TRUE;
g_signal_emit_by_name (self, "size-changed");
g_signal_emit_by_name (self, "changed");
@@ -1846,23 +4012,43 @@ void page_view_set_width (PageView* self, gint width) {
void page_view_set_height (PageView* self, gint height) {
gint _tmp0_;
- gint _tmp1_;
+ Page* _tmp1_;
+ gint _tmp2_ = 0;
+ Page* _tmp3_;
+ gint _tmp4_ = 0;
gint width;
- gboolean _tmp2_ = FALSE;
+ gboolean _tmp5_ = FALSE;
+ gint _tmp6_;
+ gint _tmp7_;
+ gboolean _tmp10_;
+ gint _tmp11_;
+ gint _tmp12_;
g_return_if_fail (self != NULL);
- _tmp0_ = page_get_width (self->priv->page);
- _tmp1_ = page_get_height (self->priv->page);
- width = (gint) ((((gdouble) height) * _tmp0_) / _tmp1_);
- if (self->priv->width == width) {
- _tmp2_ = self->priv->height == height;
+ _tmp0_ = height;
+ _tmp1_ = self->priv->page;
+ _tmp2_ = page_get_width (_tmp1_);
+ _tmp3_ = self->priv->page;
+ _tmp4_ = page_get_height (_tmp3_);
+ width = (gint) ((((gdouble) _tmp0_) * _tmp2_) / _tmp4_);
+ _tmp6_ = self->priv->width;
+ _tmp7_ = width;
+ if (_tmp6_ == _tmp7_) {
+ gint _tmp8_;
+ gint _tmp9_;
+ _tmp8_ = self->priv->height;
+ _tmp9_ = height;
+ _tmp5_ = _tmp8_ == _tmp9_;
} else {
- _tmp2_ = FALSE;
+ _tmp5_ = FALSE;
}
- if (_tmp2_) {
+ _tmp10_ = _tmp5_;
+ if (_tmp10_) {
return;
}
- self->priv->width = width;
- self->priv->height = height;
+ _tmp11_ = width;
+ self->priv->width = _tmp11_;
+ _tmp12_ = height;
+ self->priv->height = _tmp12_;
self->priv->update_image = TRUE;
g_signal_emit_by_name (self, "size-changed");
g_signal_emit_by_name (self, "changed");
@@ -1871,16 +4057,20 @@ void page_view_set_height (PageView* self, gint height) {
gint page_view_get_width (PageView* self) {
gint result = 0;
+ gint _tmp0_;
g_return_val_if_fail (self != NULL, 0);
- result = self->priv->width;
+ _tmp0_ = self->priv->width;
+ result = _tmp0_;
return result;
}
gint page_view_get_height (PageView* self) {
gint result = 0;
+ gint _tmp0_;
g_return_val_if_fail (self != NULL, 0);
- result = self->priv->height;
+ _tmp0_ = self->priv->height;
+ result = _tmp0_;
return result;
}