~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to app/core/gimpitem-preview.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* The GIMP -- an image manipulation program
 
1
/* GIMP - The GNU Image Manipulation Program
2
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
45
45
                            gint         *height)
46
46
{
47
47
  GimpItem  *item;
48
 
  GimpImage *gimage;
 
48
  GimpImage *image;
49
49
 
50
50
  item   = GIMP_ITEM (viewable);
51
 
  gimage = gimp_item_get_image (item);
 
51
  image = gimp_item_get_image (item);
52
52
 
53
 
  if (gimage && ! gimage->gimp->config->layer_previews && ! is_popup)
 
53
  if (image && ! image->gimp->config->layer_previews && ! is_popup)
54
54
    {
55
55
      *width  = size;
56
56
      *height = size;
57
57
      return;
58
58
    }
59
59
 
60
 
  if (gimage && ! is_popup)
 
60
  if (image && ! is_popup)
61
61
    {
62
 
      gimp_viewable_calc_preview_size (gimage->width,
63
 
                                       gimage->height,
 
62
      gimp_viewable_calc_preview_size (image->width,
 
63
                                       image->height,
64
64
                                       size,
65
65
                                       size,
66
66
                                       dot_for_dot,
67
 
                                       gimage->xresolution,
68
 
                                       gimage->yresolution,
 
67
                                       image->xresolution,
 
68
                                       image->yresolution,
69
69
                                       width,
70
70
                                       height,
71
71
                                       NULL);
92
92
                          gint         *popup_height)
93
93
{
94
94
  GimpItem  *item;
95
 
  GimpImage *gimage;
 
95
  GimpImage *image;
96
96
 
97
97
  item   = GIMP_ITEM (viewable);
98
 
  gimage = gimp_item_get_image (item);
 
98
  image = gimp_item_get_image (item);
99
99
 
100
 
  if (gimage && ! gimage->gimp->config->layer_previews)
 
100
  if (image && ! image->gimp->config->layer_previews)
101
101
    return FALSE;
102
102
 
103
103
  if (item->width > width || item->height > height)
109
109
                                       width  * 2,
110
110
                                       height * 2,
111
111
                                       dot_for_dot,
112
 
                                       gimage ? gimage->xresolution : 1.0,
113
 
                                       gimage ? gimage->yresolution : 1.0,
 
112
                                       image ? image->xresolution : 1.0,
 
113
                                       image ? image->yresolution : 1.0,
114
114
                                       popup_width,
115
115
                                       popup_height,
116
116
                                       &scaling_up);