Mercurial > geeqie.yaz
comparison src/print.c @ 442:4b2d7f9af171
Big whitespaces cleanup:
- drop whitespaces at end of lines
- convert eight spaces to tab at start of lines
- drop spurious spaces mixed with tabs
- remove empty lines at end of files
author | zas_ |
---|---|
date | Sun, 20 Apr 2008 13:04:57 +0000 |
parents | d1f74154463e |
children | ddabc4873a3f |
comparison
equal
deleted
inserted
replaced
441:08eb7137cd94 | 442:4b2d7f9af171 |
---|---|
1220 text[i*2+1] = hex_digits[pix[i] & 0xf]; | 1220 text[i*2+1] = hex_digits[pix[i] & 0xf]; |
1221 } | 1221 } |
1222 text[6] = '\0'; | 1222 text[6] = '\0'; |
1223 | 1223 |
1224 fprintf(f, text); | 1224 fprintf(f, text); |
1225 } | 1225 } |
1226 static gint print_job_ps_page_image(PrintWindow *pw, GdkPixbuf *pixbuf, | 1226 static gint print_job_ps_page_image(PrintWindow *pw, GdkPixbuf *pixbuf, |
1227 gdouble x, gdouble y, gdouble w, gdouble h, | 1227 gdouble x, gdouble y, gdouble w, gdouble h, |
1228 gdouble offx, gdouble offy) | 1228 gdouble offx, gdouble offy) |
1229 { | 1229 { |
1230 FILE *f; | 1230 FILE *f; |
1579 sh = (gdouble)gdk_pixbuf_get_height(pixbuf); | 1579 sh = (gdouble)gdk_pixbuf_get_height(pixbuf); |
1580 | 1580 |
1581 dw = (gdouble)gdk_pixbuf_get_width(pw->job_pixbuf); | 1581 dw = (gdouble)gdk_pixbuf_get_width(pw->job_pixbuf); |
1582 dh = (gdouble)gdk_pixbuf_get_height(pw->job_pixbuf); | 1582 dh = (gdouble)gdk_pixbuf_get_height(pw->job_pixbuf); |
1583 | 1583 |
1584 if (clip_region(x, y, w, h, | 1584 if (clip_region(x, y, w, h, |
1585 0.0, 0.0, dw, dh, | 1585 0.0, 0.0, dw, dh, |
1586 &rx, &ry, &rw, &rh)) | 1586 &rx, &ry, &rw, &rh)) |
1587 { | 1587 { |
1588 gdk_pixbuf_composite(pixbuf, pw->job_pixbuf, rx, ry, rw, rh, | 1588 gdk_pixbuf_composite(pixbuf, pw->job_pixbuf, rx, ry, rw, rh, |
1589 x + offx, y + offy, | 1589 x + offx, y + offy, |
1590 w / sw, h / sh, | 1590 w / sw, h / sh, |
1591 (w / sw < 0.01 || h / sh < 0.01) ? GDK_INTERP_NEAREST : GDK_INTERP_BILINEAR, 255); | 1591 (w / sw < 0.01 || h / sh < 0.01) ? GDK_INTERP_NEAREST : GDK_INTERP_BILINEAR, 255); |
1592 } | 1592 } |
1774 { | 1774 { |
1775 return TRUE; | 1775 return TRUE; |
1776 } | 1776 } |
1777 | 1777 |
1778 static gint print_job_preview_page_image(PrintWindow *pw, GdkPixbuf *pixbuf, | 1778 static gint print_job_preview_page_image(PrintWindow *pw, GdkPixbuf *pixbuf, |
1779 gdouble x, gdouble y, gdouble w, gdouble h, | 1779 gdouble x, gdouble y, gdouble w, gdouble h, |
1780 gdouble offx, gdouble offy) | 1780 gdouble offx, gdouble offy) |
1781 { | 1781 { |
1782 gdouble sw, sh; | 1782 gdouble sw, sh; |
1783 gdouble dw, dh; | 1783 gdouble dw, dh; |
1784 gdouble rx, ry, rw, rh; | 1784 gdouble rx, ry, rw, rh; |
1785 | 1785 |
2269 print_job_page_image(pw, pixbuf, x, y, icon_w, icon_h, 0, 0)); | 2269 print_job_page_image(pw, pixbuf, x, y, icon_w, icon_h, 0, 0)); |
2270 | 2270 |
2271 x = x + icon_w / 2; | 2271 x = x + icon_w / 2; |
2272 y = y + icon_h + (pw->proof_height - icon_h) / 2 + PRINT_TEXT_PADDING; | 2272 y = y + icon_h + (pw->proof_height - icon_h) / 2 + PRINT_TEXT_PADDING; |
2273 | 2273 |
2274 success = (success && | 2274 success = (success && |
2275 print_job_text_image(pw, pw->job_loader->fd->path, x, y, icon_w + PRINT_PROOF_MARGIN * 2, w, h, TRUE)); | 2275 print_job_text_image(pw, pw->job_loader->fd->path, x, y, icon_w + PRINT_PROOF_MARGIN * 2, w, h, TRUE)); |
2276 | 2276 |
2277 if (!success) | 2277 if (!success) |
2278 { | 2278 { |
2279 print_job_close(pw, TRUE); | 2279 print_job_close(pw, TRUE); |
3419 G_CALLBACK(print_image_scale_cb), pw); | 3419 G_CALLBACK(print_image_scale_cb), pw); |
3420 | 3420 |
3421 label = pref_table_label(table, 0, 1, _("Proof size:"), 1.0); | 3421 label = pref_table_label(table, 0, 1, _("Proof size:"), 1.0); |
3422 pw->proof_group = pref_table_box(table, 1, 1, GTK_ORIENTATION_HORIZONTAL, NULL); | 3422 pw->proof_group = pref_table_box(table, 1, 1, GTK_ORIENTATION_HORIZONTAL, NULL); |
3423 pref_link_sensitivity(label, pw->proof_group); | 3423 pref_link_sensitivity(label, pw->proof_group); |
3424 | 3424 |
3425 pw->proof_width_spin = pref_spin_new(pw->proof_group, NULL, NULL, | 3425 pw->proof_width_spin = pref_spin_new(pw->proof_group, NULL, NULL, |
3426 0.0, 50.0, 0.1, 3, 0.0, | 3426 0.0, 50.0, 0.1, 3, 0.0, |
3427 G_CALLBACK(print_proof_size_cb), pw); | 3427 G_CALLBACK(print_proof_size_cb), pw); |
3428 pw->proof_height_spin = pref_spin_new(pw->proof_group, "x", NULL, | 3428 pw->proof_height_spin = pref_spin_new(pw->proof_group, "x", NULL, |
3429 0.0, 50.0, 0.1, 3, 0.0, | 3429 0.0, 50.0, 0.1, 3, 0.0, |