## gimpdrawable gimpdrawable |

## Functions

GimpDrawable * | gimp_drawable_get ()
void | gimp_drawable_detach ()
void | gimp_drawable_flush ()
gboolean | gimp_drawable_delete ()
gboolean | gimp_drawable_is_valid ()
gchar * | gimp_drawable_get_name ()
gboolean | gimp_drawable_set_name ()
gboolean | gimp_drawable_get_visible ()
gboolean | gimp_drawable_set_visible ()
gboolean | gimp_drawable_get_linked ()
gboolean | gimp_drawable_set_linked ()
gint | gimp_drawable_get_tattoo ()
gboolean | gimp_drawable_set_tattoo ()
guint8 * | gimp_drawable_get_pixel ()
gboolean | gimp_drawable_set_pixel ()
GimpTile * | gimp_drawable_get_tile ()
GimpTile * | gimp_drawable_get_tile2 ()
guchar * | gimp_drawable_get_thumbnail_data ()
guchar * | gimp_drawable_get_sub_thumbnail_data ()
void | gimp_drawable_get_color_uchar ()
gboolean | gimp_drawable_merge_shadow ()
gboolean | gimp_drawable_free_shadow ()
gboolean | gimp_drawable_fill ()
gboolean | gimp_drawable_update ()
gboolean | gimp_drawable_mask_bounds ()
gboolean | gimp_drawable_mask_intersect ()
gint32 | gimp_drawable_get_image ()
gboolean | gimp_drawable_set_image ()
gboolean | gimp_drawable_has_alpha ()
GimpImageType | gimp_drawable_type_with_alpha ()
GimpImageType | gimp_drawable_type ()
gboolean | gimp_drawable_is_rgb ()
gboolean | gimp_drawable_is_gray ()
gboolean | gimp_drawable_is_indexed ()
gint | gimp_drawable_bpp ()
gint | gimp_drawable_width ()
gint | gimp_drawable_height ()
gboolean | gimp_drawable_offsets ()
gboolean | gimp_drawable_is_channel ()
gboolean | gimp_drawable_is_layer ()
gboolean | gimp_drawable_is_layer_mask ()
gboolean | gimp_drawable_is_text_layer ()
gboolean | gimp_drawable_offset ()
gboolean | gimp_drawable_foreground_extract ()
GimpParasite * | gimp_drawable_parasite_find ()
gboolean | gimp_drawable_parasite_list ()
gboolean | gimp_drawable_parasite_attach ()
gboolean | gimp_drawable_parasite_detach ()
gboolean | gimp_drawable_attach_new_parasite ()

## Types and Values

| GimpDrawable

## Description

## Functions

### gimp_drawable_get ()

    GimpDrawable *
    gimp_drawable_get (gint32 drawable_ID);

### gimp_drawable_detach ()

    void
    gimp_drawable_detach (GimpDrawable *drawable);

### gimp_drawable_flush ()

    void
    gimp_drawable_flush (GimpDrawable *drawable);

### gimp_drawable_delete ()

    gboolean
    gimp_drawable_delete (gint32 drawable_ID);

`gimp_drawable_delete` is deprecated and should not be used in newly-written code.

Use `gimp_item_delete()` instead.

### gimp_drawable_is_valid ()

    gboolean
    gimp_drawable_is_valid (gint32 drawable_ID);

`gimp_drawable_is_valid` is deprecated and should not be used in newly-written code.

Use `gimp_item_is_valid()` instead.

Since: GIMP 2.4

### gimp_drawable_get_name ()

    gchar *
    gimp_drawable_get_name (gint32 drawable_ID);

`gimp_drawable_get_name` is deprecated and should not be used in newly-written code.

Use `gimp_item_get_name()` instead.

### gimp_drawable_set_name ()

    gboolean
    gimp_drawable_set_name (gint32 drawable_ID,
                            const gchar *name);

`gimp_drawable_set_name` is deprecated and should not be used in newly-written code.

Use `gimp_item_set_name()` instead.

### gimp_drawable_get_visible ()

    gboolean
    gimp_drawable_get_visible (gint32 drawable_ID);

`gimp_drawable_get_visible` is deprecated and should not be used in newly-written code.

Use `gimp_item_get_visible()` instead.

### gimp_drawable_set_visible ()

    gboolean
    gimp_drawable_set_visible (gint32 drawable_ID,
                               gboolean visible);

`gimp_drawable_set_visible` is deprecated and should not be used in newly-written code.

Use `gimp_item_set_visible()` instead.

### gimp_drawable_get_linked ()

    gboolean
    gimp_drawable_get_linked (gint32 drawable_ID);

`gimp_drawable_get_linked` is deprecated and should not be used in newly-written code.

Use `gimp_item_get_linked()` instead.

### gimp_drawable_set_linked ()

    gboolean
    gimp_drawable_set_linked (gint32 drawable_ID,
                              gboolean linked);

`gimp_drawable_set_linked` is deprecated and should not be used in newly-written code.

Use `gimp_item_set_linked()` instead.

### gimp_drawable_get_tattoo ()

    gint
    gimp_drawable_get_tattoo (gint32 drawable_ID);

`gimp_drawable_get_tattoo` is deprecated and should not be used in newly-written code.

Use `gimp_item_get_tattoo()` instead.

### gimp_drawable_set_tattoo ()

    gboolean
    gimp_drawable_set_tattoo (gint32 drawable_ID,
                              gint tattoo);

`gimp_drawable_set_tattoo` is deprecated and should not be used in newly-written code.

Use `gimp_item_set_tattoo()` instead.

### gimp_drawable_get_pixel ()

    guint8 *
    gimp_drawable_get_pixel (gint32 drawable_ID,
                             gint x_coord,
                             gint y_coord,
                             gint *num_channels);

### gimp_drawable_set_pixel ()

    gboolean
    gimp_drawable_set_pixel (gint32 drawable_ID,
                             gint x_coord,
                             gint y_coord,
                             gint num_channels,
                             const guint8 *pixel);

### gimp_drawable_get_tile ()

    GimpTile *
    gimp_drawable_get_tile (GimpDrawable *drawable,
                            gboolean shadow,
                            gint row,
                            gint col);

### gimp_drawable_get_tile2 ()

    GimpTile *
    gimp_drawable_get_tile2 (GimpDrawable *drawable,
                             gboolean shadow,
                             gint x,
                             gint y);

### gimp_drawable_get_thumbnail_data ()

    guchar *
    gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
                                      gint *width,
                                      gint *height,
                                      gint *bpp);

### gimp_drawable_get_sub_thumbnail_data ()

    guchar *
    gimp_drawable_get_sub_thumbnail_data (gint32 drawable_ID,
                                          gint src_x,
                                          gint src_y,
                                          gint src_width,
                                          gint src_height,
                                          gint *dest_width,
                                          gint *dest_height,
                                          gint *bpp);

### gimp_drawable_get_color_uchar ()

    void
    gimp_drawable_get_color_uchar (gint32 drawable_ID,
                                   const GimpRGB *color,
                                   guchar *color_uchar);

### gimp_drawable_merge_shadow ()

    gboolean
    gimp_drawable_merge_shadow (gint32 drawable_ID,
                                gboolean undo);

### gimp_drawable_free_shadow ()

    gboolean
    gimp_drawable_free_shadow (gint32 drawable_ID);

Since: GIMP 2.6

### gimp_drawable_fill ()

    gboolean
    gimp_drawable_fill (gint32 drawable_ID,
                        GimpFillType fill_type);

### gimp_drawable_update ()

    gboolean
    gimp_drawable_update (gint32 drawable_ID,
                          gint x,
                          gint y,
                          gint width,
                          gint height);

### gimp_drawable_mask_bounds ()

    gboolean
    gimp_drawable_mask_bounds (gint32 drawable_ID,
                               gint *x1,
                               gint *y1,
                               gint *x2,
                               gint *y2);

`gimp_drawable_mask_bounds` is deprecated and should not be used in newly-written code.

### gimp_drawable_mask_intersect ()

    gboolean
    gimp_drawable_mask_intersect (gint32 drawable_ID,
                                  gint *x,
                                  gint *y,
                                  gint *width,
                                  gint *height);

Since: GIMP 2.2

### gimp_drawable_get_image ()

    gint32
    gimp_drawable_get_image (gint32 drawable_ID);

`gimp_drawable_get_image` is deprecated and should not be used in newly-written code.

Use `gimp_item_get_image()` instead.

### gimp_drawable_set_image ()

    gboolean
    gimp_drawable_set_image (gint32 drawable_ID,
                             gint32 image_ID);

`gimp_drawable_set_image` is deprecated and should not be used in newly-written code.

There is no replacement for this procedure.

### gimp_drawable_has_alpha ()

    gboolean
    gimp_drawable_has_alpha (gint32 drawable_ID);

### gimp_drawable_type_with_alpha ()

    GimpImageType
    gimp_drawable_type_with_alpha (gint32 drawable_ID);

### gimp_drawable_type ()

    GimpImageType
    gimp_drawable_type (gint32 drawable_ID);

### gimp_drawable_is_rgb ()

    gboolean
    gimp_drawable_is_rgb (gint32 drawable_ID);

### gimp_drawable_is_gray ()

    gboolean
    gimp_drawable_is_gray (gint32 drawable_ID);

### gimp_drawable_is_indexed ()

    gboolean
    gimp_drawable_is_indexed (gint32 drawable_ID);

### gimp_drawable_bpp ()

    gint
    gimp_drawable_bpp (gint32 drawable_ID);

### gimp_drawable_width ()

    gint
    gimp_drawable_width (gint32 drawable_ID);

### gimp_drawable_height ()

    gint
    gimp_drawable_height (gint32 drawable_ID);

### gimp_drawable_offsets ()

    gboolean
    gimp_drawable_offsets (gint32 drawable_ID,
                           gint *offset_x,
                           gint *offset_y);

### gimp_drawable_is_channel ()

    gboolean
    gimp_drawable_is_channel (gint32 drawable_ID);

`gimp_drawable_is_channel` is deprecated and should not be used in newly-written code.

Use `gimp_item_is_channel()` instead.

### gimp_drawable_is_layer ()

    gboolean
    gimp_drawable_is_layer (gint32 drawable_ID);

`gimp_drawable_is_layer` is deprecated and should not be used in newly-written code.

Use `gimp_item_is_layer()` instead.

### gimp_drawable_is_layer_mask ()

    gboolean
    gimp_drawable_is_layer_mask (gint32 drawable_ID);

`gimp_drawable_is_layer_mask` is deprecated and should not be used in newly-written code.

Use `gimp_item_is_layer_mask()` instead.

### gimp_drawable_is_text_layer ()

    gboolean
    gimp_drawable_is_text_layer (gint32 drawable_ID);

`gimp_drawable_is_text_layer` is deprecated and should not be used in newly-written code.

Use `gimp_item_is_text_layer()` instead.

Since: GIMP 2.6

### gimp_drawable_offset ()

    gboolean
    gimp_drawable_offset (gint32 drawable_ID,
                          gboolean wrap_around,
                          GimpOffsetType fill_type,
                          gint offset_x,
                          gint offset_y);

### gimp_drawable_foreground_extract ()

    gboolean
    gimp_drawable_foreground_extract (gint32 drawable_ID,
                                      GimpForegroundExtractMode mode,
                                      gint32 mask_ID);

Since: GIMP 2.4

### gimp_drawable_parasite_find ()

    GimpParasite *
    gimp_drawable_parasite_find (gint32 drawable_ID,
                                 const gchar *name);

`gimp_drawable_parasite_find` is deprecated and should not be used in newly-written code.

Use `gimp_item_get_parasite()` instead.

### gimp_drawable_parasite_list ()

    gboolean
    gimp_drawable_parasite_list (gint32 drawable_ID,
                                 gint *num_parasites,
                                 gchar ***parasites);

`gimp_drawable_parasite_list` is deprecated and should not be used in newly-written code.

Use `gimp_item_get_parasite_list()` instead.

### gimp_drawable_parasite_attach ()

    gboolean
    gimp_drawable_parasite_attach (gint32 drawable_ID,
                                   const GimpParasite *parasite);

`gimp_drawable_parasite_attach` is deprecated and should not be used in newly-written code.

Use `gimp_item_attach_parasite()` instead.

### gimp_drawable_parasite_detach ()

    gboolean
    gimp_drawable_parasite_detach (gint32 drawable_ID,
                                   const gchar *name);

`gimp_drawable_parasite_detach` is deprecated and should not be used in newly-written code.

Use `gimp_item_detach_parasite()` instead.

### gimp_drawable_attach_new_parasite ()

    gboolean
    gimp_drawable_attach_new_parasite (gint32 drawable_ID,
                                       const gchar *name,
                                       gint flags,
                                       gint size,
                                       gconstpointer data);

`gimp_drawable_attach_new_parasite` is deprecated and should not be used in newly-written code.

use `gimp_item_attach_parasite()` instead.

## Types and Values

### GimpDrawable

    typedef struct {
      gint32    drawable_id;   /* drawable ID */
      guint     width;         /* width of drawble */
      guint     height;        /* height of drawble */
      guint     bpp;           /* bytes per pixel of drawable */
      guint     ntile_rows;    /* # of tile rows */
      guint     ntile_cols;    /* # of tile columns */
      GimpTile *tiles;         /* the normal tiles */
      GimpTile *shadow_tiles;  /* the shadow tiles */
    } GimpDrawable;