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

« back to all changes in this revision

Viewing changes to app/core/gimpimage-flip.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-10-06 13:30:41 UTC
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: james.westby@ubuntu.com-20081006133041-3panbkcanaymfsmp
Tags: upstream-2.6.0
ImportĀ upstreamĀ versionĀ 2.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
  switch (flip_type)
58
58
    {
59
59
    case GIMP_ORIENTATION_HORIZONTAL:
60
 
      axis = (gdouble) image->width / 2.0;
 
60
      axis = (gdouble) gimp_image_get_width (image) / 2.0;
61
61
      break;
62
62
 
63
63
    case GIMP_ORIENTATION_VERTICAL:
64
 
      axis = (gdouble) image->height / 2.0;
 
64
      axis = (gdouble) gimp_image_get_height (image) / 2.0;
65
65
      break;
66
66
 
67
67
    default:
123
123
    }
124
124
 
125
125
  /*  Flip all Guides  */
126
 
  for (list = image->guides; list; list = g_list_next (list))
 
126
  for (list = gimp_image_get_guides (image); list; list = g_list_next (list))
127
127
    {
128
128
      GimpGuide *guide    = list->data;
129
129
      gint       position = gimp_guide_get_position (guide);
133
133
        case GIMP_ORIENTATION_HORIZONTAL:
134
134
          if (flip_type == GIMP_ORIENTATION_VERTICAL)
135
135
            gimp_image_move_guide (image, guide,
136
 
                                   image->height - position, TRUE);
 
136
                                   gimp_image_get_height (image) - position,
 
137
                                   TRUE);
137
138
          break;
138
139
 
139
140
        case GIMP_ORIENTATION_VERTICAL:
140
141
          if (flip_type == GIMP_ORIENTATION_HORIZONTAL)
141
142
            gimp_image_move_guide (image, guide,
142
 
                                   image->width - position, TRUE);
 
143
                                   gimp_image_get_width (image) - position,
 
144
                                   TRUE);
143
145
          break;
144
146
 
145
147
        default:
148
150
    }
149
151
 
150
152
  /*  Flip all sample points  */
151
 
  for (list = image->sample_points; list; list = g_list_next (list))
 
153
  for (list = gimp_image_get_sample_points (image); list; list = g_list_next (list))
152
154
    {
153
155
      GimpSamplePoint *sample_point = list->data;
154
156
 
155
157
      if (flip_type == GIMP_ORIENTATION_VERTICAL)
156
158
        gimp_image_move_sample_point (image, sample_point,
157
159
                                      sample_point->x,
158
 
                                      image->height - sample_point->y,
 
160
                                      gimp_image_get_height (image) -
 
161
                                      sample_point->y,
159
162
                                      TRUE);
160
163
 
161
164
      if (flip_type == GIMP_ORIENTATION_HORIZONTAL)
162
165
        gimp_image_move_sample_point (image, sample_point,
163
 
                                      image->width - sample_point->x,
 
166
                                      gimp_image_get_width (image) -
 
167
                                      sample_point->x,
164
168
                                      sample_point->y,
165
169
                                      TRUE);
166
170
    }