[gthumb: 27/129] Merge branch 'cairo-surface' into rotate
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 27/129] Merge branch 'cairo-surface' into rotate
- Date: Wed, 27 Apr 2011 20:52:39 +0000 (UTC)
commit f3d591302cb3008f44700fc98bb7d6cf2d72ba46
Merge: 26af358 b43d144
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri Apr 15 19:59:27 2011 +0200
Merge branch 'cairo-surface' into rotate
.../contact_sheet/gth-contact-sheet-creator.c | 2 +-
extensions/contact_sheet/gth-contact-sheet-theme.c | 2 +-
extensions/desktop_background/actions.c | 2 +-
.../file_tools/gth-file-tool-adjust-colors.c | 5 +-
extensions/file_tools/gth-file-tool-crop.c | 2 -
extensions/file_tools/gth-file-tool-desaturate.c | 1 +
extensions/file_tools/gth-file-tool-enhance.c | 3 +-
extensions/file_tools/gth-file-tool-equalize.c | 3 +-
extensions/file_tools/gth-file-tool-flip.c | 3 +-
extensions/file_tools/gth-file-tool-mirror.c | 1 +
extensions/file_tools/gth-file-tool-negative.c | 1 +
extensions/file_tools/gth-file-tool-resize.c | 2 -
extensions/file_tools/gth-file-tool-rotate-left.c | 1 +
extensions/file_tools/gth-file-tool-rotate-right.c | 1 +
extensions/file_tools/gth-file-tool-rotate.c | 43 +-
extensions/file_tools/gth-file-tool-sharpen.c | 1 -
extensions/file_tools/gth-image-rotator.c | 51 +-
extensions/file_tools/gth-image-rotator.h | 2 +-
extensions/image_print/actions.c | 4 +-
extensions/image_viewer/gth-image-histogram.c | 10 +-
extensions/image_viewer/gth-image-viewer-page.c | 63 ++-
extensions/image_viewer/gth-image-viewer-page.h | 4 +
extensions/red_eye_removal/gth-file-tool-red-eye.c | 4 +-
gthumb/cairo-utils.c | 221 +++++---
gthumb/cairo-utils.h | 152 ++++--
gthumb/gth-histogram.c | 88 +++-
gthumb/gth-histogram.h | 37 +-
gthumb/gth-image-dragger.c | 16 +-
gthumb/gth-image-history.c | 28 +-
gthumb/gth-image-history.h | 13 +-
gthumb/gth-image-navigator.c | 65 ++-
gthumb/gth-image-selector.c | 178 +++---
gthumb/gth-image-viewer.c | 616 ++++++++++----------
gthumb/gth-image-viewer.h | 17 +-
gthumb/pixbuf-utils.c | 70 +--
gthumb/pixbuf-utils.h | 3 +-
36 files changed, 950 insertions(+), 765 deletions(-)
---
diff --cc extensions/file_tools/gth-file-tool-rotate.c
index 8b6a88e,d2f7a89..20ed0d8
--- a/extensions/file_tools/gth-file-tool-rotate.c
+++ b/extensions/file_tools/gth-file-tool-rotate.c
@@@ -522,9 -522,8 +504,8 @@@ static voi
gth_file_tool_rotate_instance_init (GthFileToolRotate *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTH_TYPE_FILE_TOOL_ROTATE, GthFileToolRotatePrivate);
- self->priv->tmp_pixbuf = NULL;
- self->priv->step = 0.0; /* FIXME */
- self->priv->use_grid = TRUE;
+ self->priv->angle_step = 0.0;
+ self->priv->use_grid = FALSE;
gth_file_tool_construct (GTH_FILE_TOOL (self), "tool-rotate", _("Rotate..."), _("Rotate"), TRUE);
}
diff --cc extensions/file_tools/gth-image-rotator.c
index 4cab5e1,57fcc7f..fe83ce9
--- a/extensions/file_tools/gth-image-rotator.c
+++ b/extensions/file_tools/gth-image-rotator.c
@@@ -126,21 -126,18 +126,18 @@@ update_image_surface (GthImageRotator *
gtk_widget_get_allocation (GTK_WIDGET (self->priv->viewer), &allocation);
max_size = MIN (allocation.width, allocation.height) / 1.2;
if (scale_keeping_ratio (&width, &height, max_size, max_size, FALSE))
- tmp_pixbuf = _gdk_pixbuf_scale_simple_safe (src_pixbuf, width, height, GDK_INTERP_BILINEAR);
+ preview_image = _cairo_image_surface_scale_to (image, width, height, CAIRO_FILTER_BILINEAR);
else
- tmp_pixbuf = gdk_pixbuf_copy (src_pixbuf);
+ preview_image = cairo_surface_reference (image);
self->priv->preview_zoom = (double) width / self->priv->original_width;
-
- self->priv->preview_image = _cairo_image_surface_create_from_pixbuf (tmp_pixbuf);
+ self->priv->preview_image = preview_image;
self->priv->preview_image_area.width = width;
self->priv->preview_image_area.height = height;
- self->priv->preview_image_area.x = MAX ((allocation.width - self->priv->preview_image_area.width) / 2, 0);
- self->priv->preview_image_area.y = MAX ((allocation.height - self->priv->preview_image_area.height) / 2, 0);
+ self->priv->preview_image_area.x = MAX ((allocation.width - self->priv->preview_image_area.width) / 2 - 0.5, 0);
+ self->priv->preview_image_area.y = MAX ((allocation.height - self->priv->preview_image_area.height) / 2 - 0.5, 0);
_gth_image_rotator_update_tranformation_matrix (self);
-
- g_object_unref (tmp_pixbuf);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]