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

« back to all changes in this revision

Viewing changes to libgimp/gimpdrawable.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:
145
145
 
146
146
GimpTile *
147
147
gimp_drawable_get_tile (GimpDrawable *drawable,
148
 
                        gboolean      shadow,
149
 
                        gint          row,
150
 
                        gint          col)
 
148
                        gboolean      shadow,
 
149
                        gint          row,
 
150
                        gint          col)
151
151
{
152
152
  GimpTile *tiles;
153
153
  guint     right_tile;
210
210
 
211
211
GimpTile *
212
212
gimp_drawable_get_tile2 (GimpDrawable *drawable,
213
 
                         gboolean      shadow,
214
 
                         gint          x,
215
 
                         gint          y)
 
213
                         gboolean      shadow,
 
214
                         gint          x,
 
215
                         gint          y)
216
216
{
217
217
  gint row;
218
218
  gint col;
248
248
      break;
249
249
 
250
250
    case GIMP_GRAY_IMAGE:
251
 
      color_uchar[0] = gimp_rgb_intensity_uchar (color);
 
251
      color_uchar[0] = gimp_rgb_luminance_uchar (color);
252
252
      color_uchar[1] = 255;
253
253
      break;
254
254
 
255
255
    case GIMP_GRAYA_IMAGE:
256
 
      color_uchar[0] = gimp_rgb_intensity_uchar (color);
 
256
      color_uchar[0] = gimp_rgb_luminance_uchar (color);
257
257
      gimp_rgba_get_uchar (color, NULL, NULL, NULL, &color_uchar[1]);
258
258
      break;
259
259
 
264
264
 
265
265
guchar *
266
266
gimp_drawable_get_thumbnail_data (gint32  drawable_ID,
267
 
                                  gint   *width,
268
 
                                  gint   *height,
269
 
                                  gint   *bpp)
 
267
                                  gint   *width,
 
268
                                  gint   *height,
 
269
                                  gint   *bpp)
270
270
{
271
271
  gint    ret_width;
272
272
  gint    ret_height;
274
274
  gint    data_size;
275
275
 
276
276
  _gimp_drawable_thumbnail (drawable_ID,
277
 
                            *width,
278
 
                            *height,
279
 
                            &ret_width,
280
 
                            &ret_height,
281
 
                            bpp,
282
 
                            &data_size,
283
 
                            &image_data);
 
277
                            *width,
 
278
                            *height,
 
279
                            &ret_width,
 
280
                            &ret_height,
 
281
                            bpp,
 
282
                            &data_size,
 
283
                            &image_data);
284
284
 
285
285
  *width  = ret_width;
286
286
  *height = ret_height;
331
331
 * Convenience function that creates a parasite and attaches it
332
332
 * to the GIMP.
333
333
 *
 
334
 * Return value: TRUE on successful creation and attachment of
 
335
 * the new parasite.
 
336
 *
334
337
 * See Also: gimp_drawable_parasite_attach()
335
338
 */
336
 
void
 
339
gboolean
337
340
gimp_drawable_attach_new_parasite (gint32          drawable_ID,
338
 
                                   const gchar    *name,
339
 
                                   gint            flags,
340
 
                                   gint            size,
341
 
                                   gconstpointer   data)
 
341
                                   const gchar    *name,
 
342
                                   gint            flags,
 
343
                                   gint            size,
 
344
                                   gconstpointer   data)
342
345
{
343
346
  GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
 
347
  gboolean      success;
344
348
 
345
 
  gimp_drawable_parasite_attach (drawable_ID, parasite);
 
349
  success = gimp_drawable_parasite_attach (drawable_ID, parasite);
346
350
 
347
351
  gimp_parasite_free (parasite);
 
352
 
 
353
  return success;
348
354
}