### Class

# Gimp Drawable

#### Description [src]

    abstract class Gimp.Drawable : Gimp.Item {
      parent_instance: GimpItem
    }

Functions to manipulate drawables.

#### Ancestors

- GimpItem
- GObject

#### Descendants

- GimpChannel
- GimpLayer

#### Functions

###### gimp_drawable_get_by_id

Returns a `GimpDrawable` representing `drawable_id`. This function calls `gimp_item_get_by_id()` and returns the item if it is drawable or `NULL` otherwise.

Available since: 3.0

#### Instance methods

###### gimp_drawable_brightness_contrast

Modify brightness/contrast in the specified drawable.

Available since: 2.10

###### gimp_drawable_color_balance

Modify the color balance of the specified drawable.

Available since: 2.10

###### gimp_drawable_colorize_hsl

Render the drawable as a grayscale image seen through a colored glass.

Available since: 2.10

###### gimp_drawable_curves_explicit

Modifies the intensity curve(s) for specified drawable.

Available since: 2.10

###### gimp_drawable_curves_spline

Modifies the intensity curve(s) for specified drawable.

Available since: 2.10

###### gimp_drawable_desaturate

Desaturate the contents of the specified drawable, with the specified formula.

Available since: 2.10

###### gimp_drawable_edit_bucket_fill

Fill the area by a seed fill starting at the specified coordinates.

Available since: 2.10

###### gimp_drawable_edit_clear

Clear selected area of drawable.

###### gimp_drawable_edit_fill

Fill selected area of drawable.

###### gimp_drawable_edit_gradient_fill

Draw a gradient between the starting and ending coordinates with the specified gradient type.

Available since: 2.10

###### gimp_drawable_edit_stroke_item

Stroke the specified item.

Available since: 2.10

###### gimp_drawable_edit_stroke_selection

Stroke the current selection.

###### gimp_drawable_equalize

Equalize the contents of the specified drawable.

Available since: 2.10

###### gimp_drawable_fill

Fill the drawable with the specified fill mode.

###### gimp_drawable_foreground_extract

Extract the foreground of a drawable using a given trimap.

Available since: 2.4

###### gimp_drawable_free_shadow

Free the specified drawable’s shadow data (if it exists).

Available since: 2.6

###### gimp_drawable_get_bpp

Returns the bytes per pixel.

###### gimp_drawable_get_buffer

Returns a `GeglBuffer` of a specified drawable. The buffer can be used like any other GEGL buffer. Its data will we synced back with the core drawable when the buffer gets destroyed, or when `gegl_buffer_flush()` is called.

Available since: 2.10

###### gimp_drawable_get_format

Returns the `Babl` format of the drawable.

Available since: 2.10

###### gimp_drawable_get_height

Returns the height of the drawable.

###### gimp_drawable_get_offsets

Returns the offsets for the drawable.

###### gimp_drawable_get_pixel

Gets the value of the pixel at the specified coordinates.

###### gimp_drawable_get_shadow_buffer

Returns a `GeglBuffer` of a specified drawable’s shadow tiles. The buffer can be used like any other GEGL buffer. Its data will we synced back with the core drawable’s shadow tiles when the buffer gets destroyed, or when `gegl_buffer_flush()` is called.

Available since: 2.10

###### gimp_drawable_get_sub_thumbnail

Retrieves a thumbnail pixbuf for the drawable identified by `drawable`. The thumbnail will be not larger than the requested size.

Available since: 2.2

###### gimp_drawable_get_sub_thumbnail_data

Retrieves thumbnail data for the drawable identified by `drawable`. The thumbnail will be not larger than the requested size.

###### gimp_drawable_get_thumbnail

Retrieves a thumbnail pixbuf for the drawable identified by `drawable`. The thumbnail will be not larger than the requested size.

Available since: 2.2

###### gimp_drawable_get_thumbnail_data

Retrieves thumbnail data for the drawable identified by `drawable`. The thumbnail will be not larger than the requested size.

###### gimp_drawable_get_thumbnail_format

Returns the `Babl` thumbnail format of the drawable.

Available since: 2.10.14

###### gimp_drawable_get_width

Returns the width of the drawable.

###### gimp_drawable_has_alpha

Returns TRUE if the drawable has an alpha channel.

###### gimp_drawable_histogram

Returns information on the intensity histogram for the specified drawable.

Available since: 2.10

###### gimp_drawable_hue_saturation

Modify hue, lightness, and saturation in the specified drawable.

Available since: 2.10

###### gimp_drawable_invert

Invert the contents of the specified drawable.

Available since: 2.10

###### gimp_drawable_is_gray

Returns whether the drawable is a grayscale type.

###### gimp_drawable_is_indexed

Returns whether the drawable is an indexed type.

###### gimp_drawable_is_rgb

Returns whether the drawable is an RGB type.

###### gimp_drawable_levels

Modifies intensity levels in the specified drawable.

Available since: 2.10

###### gimp_drawable_levels_stretch

Automatically modifies intensity levels in the specified drawable.

Available since: 2.10

###### gimp_drawable_mask_bounds

Find the bounding box of the current selection in relation to the specified drawable.

###### gimp_drawable_mask_intersect

Find the bounding box of the current selection in relation to the specified drawable.

Available since: 2.2

###### gimp_drawable_merge_shadow

Merge the shadow buffer with the specified drawable.

###### gimp_drawable_offset

Offset the drawable by the specified amounts in the X and Y directions.

###### gimp_drawable_posterize

Posterize the specified drawable.

Available since: 2.10

###### gimp_drawable_set_pixel

Sets the value of the pixel at the specified coordinates.

###### gimp_drawable_threshold

Threshold the specified drawable.

Available since: 2.10

###### gimp_drawable_type

Returns the drawable’s type.

###### gimp_drawable_type_with_alpha

Returns the drawable’s type with alpha.

###### gimp_drawable_update

Update the specified region of the drawable.

##### Methods inherited from GimpItem (45)

Please see GimpItem for a full list of methods.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

##### Properties inherited from GimpItem (1)

###### Gimp.Item:id

No description available.

#### Signals

##### Signals inherited from GObject (1)

###### GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GimpDrawableClass {
      GimpItemClass parent_class;
      void (* _gimp_reserved1) (
    void
      );
      void (* _gimp_reserved2) (
    void
      );
      void (* _gimp_reserved3) (
    void
      );
      void (* _gimp_reserved4) (
    void
      );
      void (* _gimp_reserved5) (
    void
      );
      void (* _gimp_reserved6) (
    void
      );
      void (* _gimp_reserved7) (
    void
      );
      void (* _gimp_reserved8) (
    void
      );
      void (* _gimp_reserved9) (
    void
      );

    }

###### Class members

`parent_class`

    GimpItemClass

| No description available.

`_gimp_reserved1`

    void (* _gimp_reserved1) (
    void
      )

| No description available.

`_gimp_reserved2`

    void (* _gimp_reserved2) (
    void
      )

| No description available.

`_gimp_reserved3`

    void (* _gimp_reserved3) (
    void
      )

| No description available.

`_gimp_reserved4`

    void (* _gimp_reserved4) (
    void
      )

| No description available.

`_gimp_reserved5`

    void (* _gimp_reserved5) (
    void
      )

| No description available.

`_gimp_reserved6`

    void (* _gimp_reserved6) (
    void
      )

| No description available.

`_gimp_reserved7`

    void (* _gimp_reserved7) (
    void
      )

| No description available.

`_gimp_reserved8`

    void (* _gimp_reserved8) (
    void
      )

| No description available.

`_gimp_reserved9`

    void (* _gimp_reserved9) (
    void
      )

| No description available.