See also: Main Index; Alphabetic; Misc; By Author; By Module; By Menu External Links: The Gimp; Gimp User Manual
The Gimp drawable functions
gimp_drawable_bpp
Input:
| DRAWABLE | drawable | The drawable |
Returns:
This procedure returns the number of bytes per pixel (or the number of channels) for the specified drawable.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_bytes
Input:
| DRAWABLE | drawable | The drawable |
Returns:
This procedure is deprecated! Use 'gimp_drawable_bpp' instead.
;
gimp_drawable_delete
Input:
| DRAWABLE | drawable | The drawable to delete |
Returns: nothing
This procedure deletes the specified drawable. This must not be done if the gimage containing this drawable was already deleted or if the drawable was already removed from the image. The only case in which this procedure is useful is if you want to get rid of a drawable which has not yet been added to an image.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_fill
Input:
| DRAWABLE | drawable | The drawable |
| INT32 | fill_type | The type of fill: GIMP_FOREGROUND_FILL (0), GIMP_BACKGROUND_FILL (1), GIMP_WHITE_FILL (2), GIMP_TRANSPARENT_FILL (3), GIMP_PATTERN_FILL (4) |
Returns: nothing
This procedure fills the drawable with the fill mode. If the fill mode is foreground the current foreground color is used. If the fill mode is background, the current background color is used. If the fill type is white, then white is used. Transparent fill only affects layers with an alpha channel, in which case the alpha channel is set to transparent. If the drawable has no alpha channel, it is filled to white. No fill leaves the drawable's contents undefined. This procedure is unlike the bucket fill tool because it fills regardless of a selection
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_foreground_extract
Input:
| DRAWABLE | drawable | The drawable |
| DRAWABLE | mask | Tri-Map |
Returns: nothing
Image Segmentation by Uniform Color Clustering, see http://www.inf.fu-berlin.de/inst/pubs/tr-b-05-07.pdf
Gerald Friedland; 2005
gimp_drawable_get_image
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| IMAGE | image | The drawable's image |
This procedure returns the drawable's image.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_get_linked
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | linked | The drawable linked state (for moves) |
This procedure returns the specified drawable's linked state.
Wolfgang Hofer; 1998
gimp_drawable_get_name
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| STRING | name | The drawable name |
This procedure returns the specified drawable's name.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_get_pixel
Input:
| DRAWABLE | drawable | The drawable |
| INT32 | x_coord | The x coordinate |
| INT32 | y_coord | The y coordinate |
Returns:
| INT32 | num_channels | The number of channels for the pixel |
| INT8ARRAY | pixel | The pixel value |
This procedure gets the pixel value at the specified coordinates. The 'num_channels' argument must always be equal to the bytes-per-pixel value for the specified drawable.
Spencer Kimball & Peter Mattis; 1997
gimp_drawable_get_tattoo
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | tattoo | The drawable tattoo |
This procedure returns the specified drawable's tattoo. A tattoo is a unique and permanent identifier attached to a drawable that can be used to uniquely identify a drawable within an image even between sessions
Jay Cox; 1998
gimp_drawable_get_visible
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | visible | The drawable visibility |
This procedure returns the specified drawable's visibility.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_has_alpha
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | has_alpha | Does the drawable have an alpha channel? |
This procedure returns whether the specified drawable has an alpha channel. This can only be true for layers, and the associated type will be one of: { RGBA , GRAYA, INDEXEDA }.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_height
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | height | Height of drawable |
This procedure returns the specified drawable's height in pixels.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_image
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| IMAGE | image | The drawable's image |
This procedure is deprecated! Use 'gimp_drawable_get_image' instead.
;
gimp_drawable_is_channel
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | channel | Non-zero if the drawable is a channel |
This procedure returns non-zero if the specified drawable is a channel.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_is_gray
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | is_gray | non-zero if the drawable is a grayscale type |
This procedure returns non-zero if the specified drawable is of type { Gray, GrayA }.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_is_indexed
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | is_indexed | non-zero if the drawable is an indexed type |
This procedure returns non-zero if the specified drawable is of type { Indexed, IndexedA }.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_is_layer
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | layer | Non-zero if the drawable is a layer |
This procedure returns non-zero if the specified drawable is a layer.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_is_layer_mask
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | layer_mask | Non-zero if the drawable is a layer mask |
This procedure returns non-zero if the specified drawable is a layer mask.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_is_rgb
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | is_rgb | non-zero if the drawable is an RGB type |
This procedure returns non-zero if the specified drawable is of type { RGB, RGBA }.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_mask_bounds
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | non_empty | TRUE if there is a selection |
| INT32 | x1 | x coordinate of the upper left corner of selection bounds |
| INT32 | y1 | y coordinate of the upper left corner of selection bounds |
| INT32 | x2 | x coordinate of the lower right corner of selection bounds |
| INT32 | y2 | y coordinate of the lower right corner of selection bounds |
This procedure returns whether there is a selection. If there is one, the upper left and lower righthand corners of its bounding box are returned. These coordinates are specified relative to the drawable's origin, and bounded by the drawable's extents. Please note that the pixel specified by the lower righthand coordinate of the bounding box is not part of the selection. The selection ends at the upper left corner of this pixel. This means the width of the selection can be calculated as (x2 - x1), its height as (y2 - y1). Note that the returned boolean does NOT correspond with the returned region being empty or not, it always returns whether the selection is non_empty. See gimp_drawable_mask_intersect() for a boolean return value which is more useful in most cases.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_mask_intersect
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | non_empty | TRUE if the returned area is not empty |
| INT32 | x | x coordinate of the upper left corner of the intersection |
| INT32 | y | y coordinate of the upper left corner of the intersection |
| INT32 | width | width of the intersection |
| INT32 | height | height of the intersection |
This procedure returns whether there is an intersection between the drawable and the selection. Unlike gimp_drawable_mask_bounds(), the intersection's bounds are returned as x, y, width, height. If there is no selection this function returns TRUE and the returned bounds are the extents of the whole drawable.
Michael Natterer; 2004
gimp_drawable_merge_shadow
Input:
| DRAWABLE | drawable | The drawable |
| INT32 | undo | Push merge to undo stack? |
Returns: nothing
This procedure combines the contents of the image's shadow buffer (for temporary processing) with the specified drawable. The "undo" parameter specifies whether to add an undo step for the operation. Requesting no undo is useful for such applications as 'auto-apply'.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_offset
Input:
| DRAWABLE | drawable | The drawable to offset |
| INT32 | wrap_around | wrap image around or fill vacated regions |
| INT32 | fill_type | fill vacated regions of drawable with background or transparent: GIMP_OFFSET_BACKGROUND (0) or GIMP_OFFSET_TRANSPARENT (1) |
| INT32 | offset_x | offset by this amount in X direction |
| INT32 | offset_y | offset by this amount in Y direction |
Returns: nothing
This procedure offsets the specified drawable by the amounts specified by 'offset_x' and 'offset_y'. If 'wrap_around' is set to TRUE, then portions of the drawable which are offset out of bounds are wrapped around. Alternatively, the undefined regions of the drawable can be filled with transparency or the background color, as specified by the 'fill_type' parameter.
Spencer Kimball & Peter Mattis; 1997
gimp_drawable_offsets
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | offset_x | x offset of drawable |
| INT32 | offset_y | y offset of drawable |
This procedure returns the specified drawable's offsets. This only makes sense if the drawable is a layer since channels are anchored. The offsets of a channel will be returned as 0.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_set_image
Input:
| DRAWABLE | drawable | The drawable |
| IMAGE | image | The image |
Returns: nothing
This procedure is deprecated!
;
gimp_drawable_set_linked
Input:
| DRAWABLE | drawable | The drawable |
| INT32 | linked | The new drawable linked state |
Returns: nothing
This procedure sets the specified drawable's linked state.
Wolfgang Hofer; 1998
gimp_drawable_set_name
Input:
| DRAWABLE | drawable | The drawable |
| STRING | name | The new drawable name |
Returns: nothing
This procedure sets the specified drawable's name.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_set_pixel
Input:
| DRAWABLE | drawable | The drawable |
| INT32 | x_coord | The x coordinate |
| INT32 | y_coord | The y coordinate |
| INT32 | num_channels | The number of channels for the pixel |
| INT8ARRAY | pixel | The pixel value |
Returns: nothing
This procedure sets the pixel value at the specified coordinates. The 'num_channels' argument must always be equal to the bytes-per-pixel value for the specified drawable. Note that this function is not undoable, you should use it only on drawables you just created yourself.
Spencer Kimball & Peter Mattis; 1997
gimp_drawable_set_tattoo
Input:
| DRAWABLE | drawable | The drawable |
| INT32 | tattoo | The new drawable tattoo |
Returns: nothing
This procedure sets the specified drawable's tattoo. A tattoo is a unique and permanent identifier attached to a drawable that can be used to uniquely identify a drawable within an image even between sessions
Jay Cox; 1998
gimp_drawable_set_visible
Input:
| DRAWABLE | drawable | The drawable |
| INT32 | visible | The new drawable visibility |
Returns: nothing
This procedure sets the specified drawable's visibility.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_sub_thumbnail
Input:
| DRAWABLE | drawable | The drawable |
| INT32 | src_x | The x coordinate of the area |
| INT32 | src_y | The y coordinate of the area |
| INT32 | src_width | The width of the area |
| INT32 | src_height | The height of the area |
| INT32 | dest_width | The thumbnail width |
| INT32 | dest_height | The thumbnail height |
Returns:
| INT32 | width | The previews width |
| INT32 | height | The previews height |
| INT32 | bpp | The previews bpp |
| INT32 | thumbnail_data_count | The number of bytes in thumbnail data |
| INT8ARRAY | thumbnail_data | The thumbnail data |
This function gets data from which a thumbnail of a drawable preview can be created. Maximum x or y dimension is 512 pixels. The pixels are returned in RGB[A] or GRAY[A] format. The bpp return value gives the number of bytes in the image.
Michael Natterer <mitch@gimp.org>; 2004
gimp_drawable_thumbnail
Input:
| DRAWABLE | drawable | The drawable |
| INT32 | width | The thumbnail width |
| INT32 | height | The thumbnail height |
Returns:
| INT32 | width | The previews width |
| INT32 | height | The previews height |
| INT32 | bpp | The previews bpp |
| INT32 | thumbnail_data_count | The number of bytes in thumbnail data |
| INT8ARRAY | thumbnail_data | The thumbnail data |
This function gets data from which a thumbnail of a drawable preview can be created. Maximum x or y dimension is 512 pixels. The pixels are returned in RGB[A] or GRAY[A] format. The bpp return value gives the number of bytes in the image.
Andy Thomas; 1999
gimp_drawable_transform_2d
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | source_x | X coordinate of the transformation center |
| SUCCESS | source_y | Y coordinate of the transformation center |
| SUCCESS | scale_x | Amount to scale in x direction |
| SUCCESS | scale_y | Amount to scale in y direction |
| SUCCESS | angle | The angle of rotation (radians) |
| SUCCESS | dest_x | X coordinate of where the center goes |
| SUCCESS | dest_y | Y coordinate of where the center goes |
| INT32 | transform_direction | Direction of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) } |
| INT32 | interpolation | Type of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) } |
| INT32 | supersample | Whether to perform supersample |
| INT32 | recursion_level | Level of recursion (3 is a nice default) |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The transformed drawable |
This procedure transforms the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then transformed. The transformation is done by scaling the image by the x and y scale factors about the point (source_x, source_y), then rotating around the same point, then translating that point to the new position (dest_x, dest_y). The return value is the ID of the rotated drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and transformed drawable.
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_2d_default
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | source_x | X coordinate of the transformation center |
| SUCCESS | source_y | Y coordinate of the transformation center |
| SUCCESS | scale_x | Amount to scale in x direction |
| SUCCESS | scale_y | Amount to scale in y direction |
| SUCCESS | angle | The angle of rotation (radians) |
| SUCCESS | dest_x | X coordinate of where the center goes |
| SUCCESS | dest_y | Y coordinate of where the center goes |
| INT32 | interpolate | Whether to use interpolation and supersampling |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The transformed drawable |
This procedure is a variant of gimp_drawable_transform_2d() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_flip
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | x0 | horz. coord. of one end of axis |
| SUCCESS | y0 | vert. coord. of one end of axis |
| SUCCESS | x1 | horz. coord. of other end of axis |
| SUCCESS | y1 | vert. coord. of other end of axis |
| INT32 | transform_direction | Direction of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) } |
| INT32 | interpolation | Type of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) } |
| INT32 | supersample | Whether to perform supersample |
| INT32 | recursion_level | Level of recursion (3 is a nice default) |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The flipped drawable |
This procedure flips the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then flipped. The axis to flip around is specified by specifying two points from that line. The return value is the ID of the flipped drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and flipped drawable. The clip results parameter specifies wheter current selection will affect the transform.
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_flip_default
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | x0 | horz. coord. of one end of axis |
| SUCCESS | y0 | vert. coord. of one end of axis |
| SUCCESS | x1 | horz. coord. of other end of axis |
| SUCCESS | y1 | vert. coord. of other end of axis |
| INT32 | interpolate | Whether to use interpolation and supersampling |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The flipped drawable |
This procedure is a variant of gimp_drawable_transform_flip() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_flip_simple
Input:
| DRAWABLE | drawable | The affected drawable |
| INT32 | flip_type | Type of flip: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1) |
| INT32 | auto_center | Whether to automatically position the axis in the selection center |
| SUCCESS | axis | coord. of flip axis |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The flipped drawable |
This procedure flips the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then flipped. If auto_center is set to true, the flip is around the selection's center. Otherwise, the coordinate of the axis needs to be specified. The return value is the ID of the flipped drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and flipped drawable.
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_matrix
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | coeff_0_0 | coefficient (0,0) of the transformation matrix |
| SUCCESS | coeff_0_1 | coefficient (0,1) of the transformation matrix |
| SUCCESS | coeff_0_2 | coefficient (0,2) of the transformation matrix |
| SUCCESS | coeff_1_0 | coefficient (1,0) of the transformation matrix |
| SUCCESS | coeff_1_1 | coefficient (1,1) of the transformation matrix |
| SUCCESS | coeff_1_2 | coefficient (1,2) of the transformation matrix |
| SUCCESS | coeff_2_0 | coefficient (2,0) of the transformation matrix |
| SUCCESS | coeff_2_1 | coefficient (2,1) of the transformation matrix |
| SUCCESS | coeff_2_2 | coefficient (2,2) of the transformation matrix |
| INT32 | transform_direction | Direction of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) } |
| INT32 | interpolation | Type of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) } |
| INT32 | supersample | Whether to perform supersample |
| INT32 | recursion_level | Level of recursion (3 is a nice default) |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The transformed drawable |
This procedure transforms the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then transformed. The transformation is done by assembling a 3x3 matrix from the coefficients passed. The return value is the ID of the rotated drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and transformed drawable.
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_matrix_default
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | coeff_0_0 | coefficient (0,0) of the transformation matrix |
| SUCCESS | coeff_0_1 | coefficient (0,1) of the transformation matrix |
| SUCCESS | coeff_0_2 | coefficient (0,2) of the transformation matrix |
| SUCCESS | coeff_1_0 | coefficient (1,0) of the transformation matrix |
| SUCCESS | coeff_1_1 | coefficient (1,1) of the transformation matrix |
| SUCCESS | coeff_1_2 | coefficient (1,2) of the transformation matrix |
| SUCCESS | coeff_2_0 | coefficient (2,0) of the transformation matrix |
| SUCCESS | coeff_2_1 | coefficient (2,1) of the transformation matrix |
| SUCCESS | coeff_2_2 | coefficient (2,2) of the transformation matrix |
| INT32 | interpolate | Whether to use interpolation and supersampling |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The transformed drawable |
This procedure is a variant of gimp_drawable_transform_matrix() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_perspective
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | x0 | The new x coordinate of upper-left corner of original bounding box |
| SUCCESS | y0 | The new y coordinate of upper-left corner of original bounding box |
| SUCCESS | x1 | The new x coordinate of upper-right corner of original bounding box |
| SUCCESS | y1 | The new y coordinate of upper-right corner of original bounding box |
| SUCCESS | x2 | The new x coordinate of lower-left corner of original bounding box |
| SUCCESS | y2 | The new y coordinate of lower-left corner of original bounding box |
| SUCCESS | x3 | The new x coordinate of lower-right corner of original bounding box |
| SUCCESS | y3 | The new y coordinate of lower-right corner of original bounding box |
| INT32 | transform_direction | Direction of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) } |
| INT32 | interpolation | Type of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) } |
| INT32 | supersample | Whether to perform supersample |
| INT32 | recursion_level | Level of recursion (3 is a nice default) |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The newly mapped drawable |
This procedure performs a possibly non-affine transformation on the specified drawable by allowing the corners of the original bounding box to be arbitrarily remapped to any values. The specified drawable is remapped if no selection exists. However, if a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then remapped as specified. The return value is the ID of the remapped drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and remapped drawable. The 4 coordinates specify the new locations of each corner of the original bounding box. By specifying these values, any affine transformation (rotation, scaling, translation) can be affected. Additionally, these values can be specified such that the resulting transformed drawable will appear to have been projected via a perspective transform.
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_perspective_default
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | x0 | The new x coordinate of upper-left corner of original bounding box |
| SUCCESS | y0 | The new y coordinate of upper-left corner of original bounding box |
| SUCCESS | x1 | The new x coordinate of upper-right corner of original bounding box |
| SUCCESS | y1 | The new y coordinate of upper-right corner of original bounding box |
| SUCCESS | x2 | The new x coordinate of lower-left corner of original bounding box |
| SUCCESS | y2 | The new y coordinate of lower-left corner of original bounding box |
| SUCCESS | x3 | The new x coordinate of lower-right corner of original bounding box |
| SUCCESS | y3 | The new y coordinate of lower-right corner of original bounding box |
| INT32 | interpolate | Whether to use interpolation and supersampling |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The newly mapped drawable |
This procedure is a variant of gimp_drawable_transform_perspective() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_rotate
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | angle | The angle of rotation (radians) |
| INT32 | auto_center | Whether to automatically rotate around the selection center |
| INT32 | center_x | The hor. coordinate of the center of rotation |
| INT32 | center_y | The vert. coordinate of the center of rotation |
| INT32 | transform_direction | Direction of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) } |
| INT32 | interpolation | Type of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) } |
| INT32 | supersample | Whether to perform supersample |
| INT32 | recursion_level | Level of recursion (3 is a nice default) |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The rotated drawable |
This function rotates the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then rotated by the specified amount. The return value is the ID of the rotated drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and rotated drawable.
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_rotate_default
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | angle | The angle of rotation (radians) |
| INT32 | auto_center | Whether to automatically rotate around the selection center |
| INT32 | center_x | The hor. coordinate of the center of rotation |
| INT32 | center_y | The vert. coordinate of the center of rotation |
| INT32 | interpolate | Whether to use interpolation and supersampling |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The rotated drawable |
This procedure is a variant of gimp_drawable_transform_rotate() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_rotate_simple
Input:
| DRAWABLE | drawable | The affected drawable |
| INT32 | rotate_type | Type of rotation: GIMP_ROTATE_90 (0), GIMP_ROTATE_180 (1), GIMP_ROTATE_270 (2) |
| INT32 | auto_center | Whether to automatically rotate around the selection center |
| INT32 | center_x | The hor. coordinate of the center of rotation |
| INT32 | center_y | The vert. coordinate of the center of rotation |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The rotated drawable |
This function rotates the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then rotated by the specified amount. The return value is the ID of the rotated drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and rotated drawable.
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_scale
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | x0 | The new x coordinate of upper-left corner of newly scaled region |
| SUCCESS | y0 | The new y coordinate of upper-left corner of newly scaled region |
| SUCCESS | x1 | The new x coordinate of lower-right corner of newly scaled region |
| SUCCESS | y1 | The new y coordinate of lower-right corner of newly scaled region |
| INT32 | transform_direction | Direction of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) } |
| INT32 | interpolation | Type of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) } |
| INT32 | supersample | Whether to perform supersample |
| INT32 | recursion_level | Level of recursion (3 is a nice default) |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The scaled drawable |
This procedure scales the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then scaled by the specified amount. The return value is the ID of the scaled drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and scaled drawable.
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_scale_default
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | x0 | The new x coordinate of upper-left corner of newly scaled region |
| SUCCESS | y0 | The new y coordinate of upper-left corner of newly scaled region |
| SUCCESS | x1 | The new x coordinate of lower-right corner of newly scaled region |
| SUCCESS | y1 | The new y coordinate of lower-right corner of newly scaled region |
| INT32 | interpolate | Whether to use interpolation and supersampling |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The scaled drawable |
This procedure is a variant of gimp_drawable_transform_scale() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_shear
Input:
| DRAWABLE | drawable | The affected drawable |
| INT32 | shear_type | Type of shear: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1) |
| SUCCESS | magnitude | The magnitude of the shear |
| INT32 | transform_direction | Direction of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) } |
| INT32 | interpolation | Type of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) } |
| INT32 | supersample | Whether to perform supersample |
| INT32 | recursion_level | Level of recursion (3 is a nice default) |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The sheared drawable |
This procedure shears the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then sheard by the specified amount. The return value is the ID of the sheard drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and sheard drawable. The shear type parameter indicates whether the shear will be applied horizontally or vertically. The magnitude can be either positive or negative and indicates the extent (in pixels) to shear by.
João S. O. Bueno Calligaris; 2004
gimp_drawable_transform_shear_default
Input:
| DRAWABLE | drawable | The affected drawable |
| INT32 | shear_type | Type of shear: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1) |
| SUCCESS | magnitude | The magnitude of the shear |
| INT32 | interpolate | Whether to use interpolation and supersampling |
| INT32 | clip_result | Whether to clip results |
Returns:
| DRAWABLE | drawable | The sheared drawable |
This procedure is a variant of gimp_drawable_transform_shear() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004
gimp_drawable_type
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | type | The drawable's type: { GIMP_RGB_IMAGE (0), GIMP_RGBA_IMAGE (1), GIMP_GRAY_IMAGE (2), GIMP_GRAYA_IMAGE (3), GIMP_INDEXED_IMAGE (4), GIMP_INDEXEDA_IMAGE (5) } |
This procedure returns the drawable's type.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_type_with_alpha
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | type_with_alpha | The drawable's type with alpha: { GIMP_RGB_IMAGE (0), GIMP_RGBA_IMAGE (1), GIMP_GRAY_IMAGE (2), GIMP_GRAYA_IMAGE (3), GIMP_INDEXED_IMAGE (4), GIMP_INDEXEDA_IMAGE (5) } |
This procedure returns the drawable's type as if had an alpha channel. If the type is currently Gray, for instance, the returned type would be GrayA. If the drawable already has an alpha channel, the drawable's type is simply returned.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_update
Input:
| DRAWABLE | drawable | The drawable |
| INT32 | x | x coordinate of upper left corner of update region |
| INT32 | y | y coordinate of upper left corner of update region |
| INT32 | width | Width of update region |
| INT32 | height | Height of update region |
Returns: nothing
This procedure updates the specified region of the drawable. The (x, y) coordinate pair is relative to the drawable's origin, not to the image origin. Therefore, the entire drawable can be updated using (0, 0, width, height).
Spencer Kimball & Peter Mattis; 1995-1996
gimp_drawable_width
Input:
| DRAWABLE | drawable | The drawable |
Returns:
| INT32 | width | Width of drawable |
This procedure returns the specified drawable's width in pixels.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_image_active_drawable
Input:
Returns:
| DRAWABLE | drawable | The active drawable |
This procedure is deprecated! Use 'gimp_image_get_active_drawable' instead.
;
gimp_image_get_active_drawable
Input:
Returns:
| DRAWABLE | drawable | The active drawable |
This procedure returns the ID of the image's active drawable. This can be either a layer, a channel, or a layer mask. The active drawable is specified by the active image channel. If that is -1, then by the active image layer. If the active image layer has a layer mask and the layer mask is in edit mode, then the layer mask is the active drawable.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_layer_new_from_drawable
Input:
| DRAWABLE | drawable | The source drawable from where the new layer is copied |
| IMAGE | dest_image | The destination image to which to add the layer |
Returns:
| LAYER | layer_copy | The newly copied layer |
This procedure creates a new layer as a copy of the specified drawable. The new layer still needs to be added to the image, as this is not automatic. Add the new layer with the 'gimp_image_add_layer' command. Other attributes such as layer mask modes, and offsets should be set with explicit procedure calls.
Spencer Kimball & Peter Mattis; 1995-1996
plug_in_drawable_compose
Input:
| INT32 | run_mode | Interactive, non-interactive |
| IMAGE | image1 | First input image (not used) |
| DRAWABLE | drawable1 | First input drawable |
| DRAWABLE | drawable2 | Second input drawable |
| DRAWABLE | drawable3 | Third input drawable |
| DRAWABLE | drawable4 | Fourth input drawable |
| STRING | compose_type | What to compose: RGB, RGBA, HSV, CMY, CMYK |
Returns:
| IMAGE | new_image | Output image |
This function creates a new image from multiple drawables of gray images
Peter Kirchgessner (peter@kirchgessner.net); 1998
| The Gimp 2.3.2 (win32) | Documentation fresh from PDB | 22:53:15 Fr 22.07.2005 |
| Generated by pdb2doc.py written by Hans Breuer <Hans@Breuer.org> |