## gimpcontext

gimpcontext — Functions to manipulate a plug-in's context.

## Synopsis

    gboolean            gimp_context_push                   (void);
    gboolean            gimp_context_pop                    (void);
    gboolean            gimp_context_set_defaults           (void);
    gboolean            gimp_context_get_foreground         (GimpRGB *foreground);
    gboolean            gimp_context_set_foreground         (const GimpRGB *foreground);
    gboolean            gimp_context_get_background         (GimpRGB *background);
    gboolean            gimp_context_set_background         (const GimpRGB *background);
    gboolean            gimp_context_set_default_colors     (void);
    gboolean            gimp_context_swap_colors            (void);
    gdouble             gimp_context_get_opacity            (void);
    gboolean            gimp_context_set_opacity            (gdouble opacity);
    GimpLayerModeEffects gimp_context_get_paint_mode        (void);
    gboolean            gimp_context_set_paint_mode         (GimpLayerModeEffects paint_mode);
    gchar *             gimp_context_get_brush              (void);
    gboolean            gimp_context_set_brush              (const gchar *name);
    gdouble             gimp_context_get_brush_angle        (void);
    gboolean            gimp_context_set_brush_angle        (gdouble angle);
    gdouble             gimp_context_get_brush_aspect_ratio (void);
    gboolean            gimp_context_set_brush_aspect_ratio (gdouble aspect);
    gdouble             gimp_context_get_brush_size         (void);
    gboolean            gimp_context_set_brush_size         (gdouble size);
    gboolean            gimp_context_set_brush_default_size (void);
    gchar *             gimp_context_get_dynamics           (void);
    gboolean            gimp_context_set_dynamics           (const gchar *name);
    gchar *             gimp_context_get_pattern            (void);
    gboolean            gimp_context_set_pattern            (const gchar *name);
    gchar *             gimp_context_get_gradient           (void);
    gboolean            gimp_context_set_gradient           (const gchar *name);
    gchar *             gimp_context_get_palette            (void);
    gboolean            gimp_context_set_palette            (const gchar *name);
    gchar *             gimp_context_get_font               (void);
    gboolean            gimp_context_set_font               (const gchar *name);
    gchar *             gimp_context_get_paint_method       (void);
    gboolean            gimp_context_set_paint_method       (const gchar *name);
    gboolean            gimp_context_list_paint_methods     (gint *num_paint_methods,
                                                             gchar ***paint_methods);
    gboolean            gimp_context_get_antialias          (void);
    gboolean            gimp_context_set_antialias          (gboolean antialias);
    gboolean            gimp_context_get_feather            (void);
    gboolean            gimp_context_set_feather            (gboolean feather);
    gboolean            gimp_context_get_feather_radius     (gdouble *feather_radius_x,
                                                             gdouble *feather_radius_y);
    gboolean            gimp_context_set_feather_radius     (gdouble feather_radius_x,
                                                             gdouble feather_radius_y);
    gboolean            gimp_context_get_sample_merged      (void);
    gboolean            gimp_context_set_sample_merged      (gboolean sample_merged);
    GimpSelectCriterion gimp_context_get_sample_criterion   (void);
    gboolean            gimp_context_set_sample_criterion   (GimpSelectCriterion sample_criterion);
    gdouble             gimp_context_get_sample_threshold   (void);
    gboolean            gimp_context_set_sample_threshold   (gdouble sample_threshold);
    gint                gimp_context_get_sample_threshold_int
                                                            (void);
    gboolean            gimp_context_set_sample_threshold_int
                                                            (gint sample_threshold);
    gboolean            gimp_context_get_sample_transparent (void);
    gboolean            gimp_context_set_sample_transparent (gboolean sample_transparent);
    GimpInterpolationType gimp_context_get_interpolation    (void);
    gboolean            gimp_context_set_interpolation      (GimpInterpolationType interpolation);
    GimpTransformDirection gimp_context_get_transform_direction
                                                            (void);
    gboolean            gimp_context_set_transform_direction
                                                            (GimpTransformDirection transform_direction);
    GimpTransformResize gimp_context_get_transform_resize   (void);
    gboolean            gimp_context_set_transform_resize   (GimpTransformResize transform_resize);
    gint                gimp_context_get_transform_recursion
                                                            (void);
    gboolean            gimp_context_set_transform_recursion
                                                            (gint transform_recursion);
    gdouble             gimp_context_get_ink_angle          (void);
    gboolean            gimp_context_set_ink_angle          (gdouble angle);
    gdouble             gimp_context_get_ink_blob_angle     (void);
    gboolean            gimp_context_set_ink_blob_angle     (gdouble angle);
    gdouble             gimp_context_get_ink_blob_aspect_ratio
                                                            (void);
    gboolean            gimp_context_set_ink_blob_aspect_ratio
                                                            (gdouble aspect);
    GimpInkBlobType     gimp_context_get_ink_blob_type      (void);
    gboolean            gimp_context_set_ink_blob_type      (GimpInkBlobType type);
    gdouble             gimp_context_get_ink_size           (void);
    gboolean            gimp_context_set_ink_size           (gdouble size);
    gdouble             gimp_context_get_ink_size_sensitivity
                                                            (void);
    gboolean            gimp_context_set_ink_size_sensitivity
                                                            (gdouble size);
    gdouble             gimp_context_get_ink_speed_sensitivity
                                                            (void);
    gboolean            gimp_context_set_ink_speed_sensitivity
                                                            (gdouble speed);
    gdouble             gimp_context_get_ink_tilt_sensitivity
                                                            (void);
    gboolean            gimp_context_set_ink_tilt_sensitivity
                                                            (gdouble tilt);

## Description

Functions to manipulate a plug-in's context.

## Details

### gimp_context_push ()

    gboolean            gimp_context_push                   (void);

Pushes a context to the top of the plug-in's context stack.

This procedure creates a new context by copying the current context. This copy becomes the new current context for the calling plug-in until it is popped again using `gimp_context_pop()`.

Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_pop ()

    gboolean            gimp_context_pop                    (void);

Pops the topmost context from the plug-in's context stack.

This procedure removes the topmost context from the plug-in's context stack. The context that was active before the corresponding call to `gimp_context_push()` becomes the new current context of the plug-in.

Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_set_defaults ()

    gboolean            gimp_context_set_defaults           (void);

Reset context settings to their default values.

This procedure resets context settings used by various procedures to their default value. This procedure will usually be called after a context push so that a script which calls procedures affected by context settings will not be affected by changes in the global context.

Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_foreground ()

    gboolean            gimp_context_get_foreground         (GimpRGB *foreground);

Get the current GIMP foreground color.

This procedure returns the current GIMP foreground color. The foreground color is used in a variety of tools such as paint tools, blending, and bucket fill.

`foreground` : | The foreground color.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_set_foreground ()

    gboolean            gimp_context_set_foreground         (const GimpRGB *foreground);

Set the current GIMP foreground color.

This procedure sets the current GIMP foreground color. After this is set, operations which use foreground such as paint tools, blending, and bucket fill will use the new value.

`foreground` : | The foreground color.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_get_background ()

    gboolean            gimp_context_get_background         (GimpRGB *background);

Get the current GIMP background color.

This procedure returns the current GIMP background color. The background color is used in a variety of tools such as blending, erasing (with non-alpha images), and image filling.

`background` : | The background color.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_set_background ()

    gboolean            gimp_context_set_background         (const GimpRGB *background);

Set the current GIMP background color.

This procedure sets the current GIMP background color. After this is set, operations which use background such as blending, filling images, clearing, and erasing (in non-alpha images) will use the new value.

`background` : | The background color.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_set_default_colors ()

    gboolean            gimp_context_set_default_colors     (void);

Set the current GIMP foreground and background colors to black and white.

This procedure sets the current GIMP foreground and background colors to their initial default values, black and white.

Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_swap_colors ()

    gboolean            gimp_context_swap_colors            (void);

Swap the current GIMP foreground and background colors.

This procedure swaps the current GIMP foreground and background colors, so that the new foreground color becomes the old background color and vice versa.

Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_get_opacity ()

    gdouble             gimp_context_get_opacity            (void);

Get the opacity.

This procedure returns the opacity setting. The return value is a floating point number between 0 and 100.

Returns : | The opacity.

Since GIMP 2.2

### gimp_context_set_opacity ()

    gboolean            gimp_context_set_opacity            (gdouble opacity);

Set the opacity.

This procedure modifies the opacity setting. The value should be a floating point number between 0 and 100.

`opacity` : | The opacity.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_get_paint_mode ()

    GimpLayerModeEffects gimp_context_get_paint_mode        (void);

Get the paint mode.

This procedure returns the paint-mode setting. The return value is an integer which corresponds to the values listed in the argument description.

Returns : | The paint mode.

Since GIMP 2.2

### gimp_context_set_paint_mode ()

    gboolean            gimp_context_set_paint_mode         (GimpLayerModeEffects paint_mode);

Set the paint mode.

This procedure modifies the paint_mode setting.

`paint_mode` : | The paint mode.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_get_brush ()

    gchar *             gimp_context_get_brush              (void);

Retrieve the currently active brush.

This procedure returns the name of the currently active brush. All paint operations and stroke operations use this brush to control the application of paint to the image.

Returns : | The name of the active brush.

Since GIMP 2.2

### gimp_context_set_brush ()

    gboolean            gimp_context_set_brush              (const gchar *name);

Set the specified brush as the active brush.

This procedure allows the active brush to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed brushes. If there is no matching brush found, this procedure will return an error. Otherwise, the specified brush becomes active and will be used in all subsequent paint operations.

`name` : | The name of the brush.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_get_brush_angle ()

    gdouble             gimp_context_get_brush_angle        (void);

Get brush angle in degrees.

Set the angle in degrees for brush based paint tools.

Returns : | angle in degrees.

Since GIMP 2.8

### gimp_context_set_brush_angle ()

    gboolean            gimp_context_set_brush_angle        (gdouble angle);

Set brush angle in degrees.

Set the angle in degrees for brush based paint tools.

`angle` : | angle in degrees.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_brush_aspect_ratio ()

    gdouble             gimp_context_get_brush_aspect_ratio (void);

Get brush aspect ratio.

Set the aspect ratio for brush based paint tools.

Returns : | aspect ratio.

Since GIMP 2.8

### gimp_context_set_brush_aspect_ratio ()

    gboolean            gimp_context_set_brush_aspect_ratio (gdouble aspect);

Set brush aspect ratio.

Set the aspect ratio for brush based paint tools.

`aspect` : | aspect ratio.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_brush_size ()

    gdouble             gimp_context_get_brush_size         (void);

Get brush size in pixels.

Get the brush size in pixels for brush based paint tools.

Returns : | brush size in pixels.

Since GIMP 2.8

### gimp_context_set_brush_size ()

    gboolean            gimp_context_set_brush_size         (gdouble size);

Set brush size in pixels.

Set the brush size in pixels for brush based paint tools.

`size` : | brush size in pixels.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_set_brush_default_size ()

    gboolean            gimp_context_set_brush_default_size (void);

Set brush size to its default.

Set the brush size to the default (max of width and height) for paintbrush, airbrush, or pencil tools.

Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_dynamics ()

    gchar *             gimp_context_get_dynamics           (void);

Retrieve the currently active paint dynamics.

This procedure returns the name of the currently active paint dynamics. All paint operations and stroke operations use this paint dynamics to control the application of paint to the image.

Returns : | The name of the active paint dynamics.

Since GIMP 2.8

### gimp_context_set_dynamics ()

    gboolean            gimp_context_set_dynamics           (const gchar *name);

Set the specified paint dynamics as the active paint dynamics.

This procedure allows the active paint dynamics to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed paint dynamics. If there is no matching paint dynamics found, this procedure will return an error. Otherwise, the specified paint dynamics becomes active and will be used in all subsequent paint operations.

`name` : | The name of the paint dynamics.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_pattern ()

    gchar *             gimp_context_get_pattern            (void);

Retrieve the currently active pattern.

This procedure returns name of the the currently active pattern. All clone and bucket-fill operations with patterns will use this pattern to control the application of paint to the image.

Returns : | The name of the active pattern.

Since GIMP 2.2

### gimp_context_set_pattern ()

    gboolean            gimp_context_set_pattern            (const gchar *name);

Set the specified pattern as the active pattern.

This procedure allows the active pattern to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed patterns. If there is no matching pattern found, this procedure will return an error. Otherwise, the specified pattern becomes active and will be used in all subsequent paint operations.

`name` : | The name of the pattern.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_get_gradient ()

    gchar *             gimp_context_get_gradient           (void);

Retrieve the currently active gradient.

This procedure returns the name of the currently active gradient.

Returns : | The name of the active gradient.

Since GIMP 2.2

### gimp_context_set_gradient ()

    gboolean            gimp_context_set_gradient           (const gchar *name);

Sets the specified gradient as the active gradient.

This procedure lets you set the specified gradient as the active or \"current\" one. The name is simply a string which corresponds to one of the loaded gradients. If no matching gradient is found, this procedure will return an error. Otherwise, the specified gradient will become active and will be used for subsequent custom gradient operations.

`name` : | The name of the gradient.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_get_palette ()

    gchar *             gimp_context_get_palette            (void);

Retrieve the currently active palette.

This procedure returns the name of the the currently active palette.

Returns : | The name of the active palette.

Since GIMP 2.2

### gimp_context_set_palette ()

    gboolean            gimp_context_set_palette            (const gchar *name);

Set the specified palette as the active palette.

This procedure allows the active palette to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed palettes. If no matching palette is found, this procedure will return an error. Otherwise, the specified palette becomes active and will be used in all subsequent palette operations.

`name` : | The name of the palette.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_get_font ()

    gchar *             gimp_context_get_font               (void);

Retrieve the currently active font.

This procedure returns the name of the currently active font.

Returns : | The name of the active font.

Since GIMP 2.2

### gimp_context_set_font ()

    gboolean            gimp_context_set_font               (const gchar *name);

Set the specified font as the active font.

This procedure allows the active font to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed fonts. If no matching font is found, this procedure will return an error. Otherwise, the specified font becomes active and will be used in all subsequent font operations.

`name` : | The name of the font.
Returns : | TRUE on success.

Since GIMP 2.2

### gimp_context_get_paint_method ()

    gchar *             gimp_context_get_paint_method       (void);

Retrieve the currently active paint method.

This procedure returns the name of the currently active paint method.

Returns : | The name of the active paint method.

Since GIMP 2.4

### gimp_context_set_paint_method ()

    gboolean            gimp_context_set_paint_method       (const gchar *name);

Set the specified paint method as the active paint method.

This procedure allows the active paint method to be set by specifying its name. The name is simply a string which corresponds to one of the names of the available paint methods. If there is no matching method found, this procedure will return an error. Otherwise, the specified method becomes active and will be used in all subsequent paint operations.

`name` : | The name of the paint method.
Returns : | TRUE on success.

Since GIMP 2.4

### gimp_context_list_paint_methods ()

    gboolean            gimp_context_list_paint_methods     (gint *num_paint_methods,
                                                             gchar ***paint_methods);

Lists the available paint methods.

This procedure lists the names of the available paint methods. Any of the results can be used for `gimp_context_set_paint_method()`.

`num_paint_methods` : | The number of the available paint methods.
`paint_methods` : | The names of the available paint methods.
Returns : | TRUE on success.

Since GIMP 2.4

### gimp_context_get_antialias ()

    gboolean            gimp_context_get_antialias          (void);

Get the antialias setting.

This procedure returns the antialias setting.

Returns : | The antialias setting.

Since GIMP 2.8

### gimp_context_set_antialias ()

    gboolean            gimp_context_set_antialias          (gboolean antialias);

Set the antialias setting.

This procedure modifies the antialias setting. If antialiasing is turned on, the edges of selected region will contain intermediate values which give the appearance of a sharper, less pixelized edge. This should be set as TRUE most of the time unless a binary-only selection is wanted. This settings affects the following procedures: `gimp_image_select_color()`, `gimp_image_select_contiguous_color()`, `gimp_image_select_round_rectangle()`, `gimp_image_select_ellipse()`, `gimp_image_select_polygon()`, `gimp_image_select_item()`.

`antialias` : | The antialias setting.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_feather ()

    gboolean            gimp_context_get_feather            (void);

Get the feather setting.

This procedure returns the feather setting.

Returns : | The feather setting.

Since GIMP 2.8

### gimp_context_set_feather ()

    gboolean            gimp_context_set_feather            (gboolean feather);

Set the feather setting.

This procedure modifies the feather setting. If the feather option is enabled, selections will be blurred before combining. The blur is a gaussian blur; its radii can be controlled using `gimp_context_set_feather_radius()`. This setting affects the following procedures: `gimp_image_select_color()`, `gimp_image_select_contiguous_color()`, `gimp_image_select_rectangle()`, `gimp_image_select_round_rectangle()`, `gimp_image_select_ellipse()`, `gimp_image_select_polygon()`, `gimp_image_select_item()`.

`feather` : | The feather setting.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_feather_radius ()

    gboolean            gimp_context_get_feather_radius     (gdouble *feather_radius_x,
                                                             gdouble *feather_radius_y);

Get the feather radius setting.

This procedure returns the feather radius setting.

`feather_radius_x` : | The horizontal feather radius.
`feather_radius_y` : | The vertical feather radius.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_set_feather_radius ()

    gboolean            gimp_context_set_feather_radius     (gdouble feather_radius_x,
                                                             gdouble feather_radius_y);

Set the feather radius setting.

This procedure modifies the feather radius setting. This setting affects all procedures that are affected by `gimp_context_set_feather()`.

`feather_radius_x` : | The horizontal feather radius.
`feather_radius_y` : | The vertical feather radius.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_sample_merged ()

    gboolean            gimp_context_get_sample_merged      (void);

Get the sample merged setting.

This procedure returns the sample merged setting.

Returns : | The sample merged setting.

Since GIMP 2.8

### gimp_context_set_sample_merged ()

    gboolean            gimp_context_set_sample_merged      (gboolean sample_merged);

Set the sample merged setting.

This procedure modifies the sample merged setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls whether the pixel data from the specified drawable is used ('sample-merged' is FALSE), or the pixel data from the composite image ('sample-merged' is TRUE. This is equivalent to sampling for colors after merging all visible layers). This setting affects the following procedures: `gimp_image_select_color()`, `gimp_image_select_contiguous_color()`.

`sample_merged` : | The sample merged setting.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_sample_criterion ()

    GimpSelectCriterion gimp_context_get_sample_criterion   (void);

Get the sample criterion setting.

This procedure returns the sample criterion setting.

Returns : | The sample criterion setting.

Since GIMP 2.8

### gimp_context_set_sample_criterion ()

    gboolean            gimp_context_set_sample_criterion   (GimpSelectCriterion sample_criterion);

Set the sample criterion setting.

This procedure modifies the sample criterion setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls how color similarity is determined. SELECT_CRITERION_COMPOSITE is the default value. This setting affects the following procedures: `gimp_image_select_color()`, `gimp_image_select_contiguous_color()`.

`sample_criterion` : | The sample criterion setting.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_sample_threshold ()

    gdouble             gimp_context_get_sample_threshold   (void);

Get the sample threshold setting.

This procedure returns the sample threshold setting.

Returns : | The sample threshold setting.

Since GIMP 2.8

### gimp_context_set_sample_threshold ()

    gboolean            gimp_context_set_sample_threshold   (gdouble sample_threshold);

Set the sample threshold setting.

This procedure modifies the sample threshold setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls what is \"sufficiently close\" to be considered a similar color. If the sample threshold has not been set explicitly, the default threshold set in gimprc will be used. This setting affects the following procedures: `gimp_image_select_color()`, `gimp_image_select_contiguous_color()`.

`sample_threshold` : | The sample threshold setting.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_sample_threshold_int ()

    gint                gimp_context_get_sample_threshold_int
                                                            (void);

Get the sample threshold setting as an integer value.

This procedure returns the sample threshold setting as an integer value. See `gimp_context_get_sample_threshold()`.

Returns : | The sample threshold setting.

Since GIMP 2.8

### gimp_context_set_sample_threshold_int ()

    gboolean            gimp_context_set_sample_threshold_int
                                                            (gint sample_threshold);

Set the sample threshold setting as an integer value.

This procedure modifies the sample threshold setting as an integer value. See `gimp_context_set_sample_threshold()`.

`sample_threshold` : | The sample threshold setting.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_sample_transparent ()

    gboolean            gimp_context_get_sample_transparent (void);

Get the sample transparent setting.

This procedure returns the sample transparent setting.

Returns : | The sample transparent setting.

Since GIMP 2.8

### gimp_context_set_sample_transparent ()

    gboolean            gimp_context_set_sample_transparent (gboolean sample_transparent);

Set the sample transparent setting.

This procedure modifies the sample transparent setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls whether transparency is considered to be a unique selectable color. When this setting is TRUE, transparent areas can be selected or filled. This setting affects the following procedures: `gimp_image_select_color()`, `gimp_image_select_contiguous_color()`.

`sample_transparent` : | The sample transparent setting.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_interpolation ()

    GimpInterpolationType gimp_context_get_interpolation    (void);

Get the interpolation type.

This procedure returns the interpolation setting. The return value is an integer which corresponds to the values listed in the argument description. If the interpolation has not been set explicitly by `gimp_context_set_interpolation()`, the default interpolation set in gimprc will be used.

Returns : | The interpolation type.

Since GIMP 2.8

### gimp_context_set_interpolation ()

    gboolean            gimp_context_set_interpolation      (GimpInterpolationType interpolation);

Set the interpolation type.

This procedure modifies the interpolation setting. This setting affects affects the following procedures: `gimp_item_transform_flip()`, `gimp_item_transform_perspective()`, `gimp_item_transform_rotate()`, `gimp_item_transform_scale()`, `gimp_item_transform_shear()`, `gimp_item_transform_2d()`, `gimp_item_transform_matrix()`, `gimp_image_scale()`, `gimp_layer_scale()`.

`interpolation` : | The interpolation type.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_transform_direction ()

    GimpTransformDirection gimp_context_get_transform_direction
                                                            (void);

Get the transform direction.

This procedure returns the transform direction. The return value is an integer which corresponds to the values listed in the argument description.

Returns : | The transform direction.

Since GIMP 2.8

### gimp_context_set_transform_direction ()

    gboolean            gimp_context_set_transform_direction
                                                            (GimpTransformDirection transform_direction);

Set the transform direction.

This procedure modifies the transform direction setting. This setting affects affects the following procedures: `gimp_item_transform_flip()`, `gimp_item_transform_perspective()`, `gimp_item_transform_rotate()`, `gimp_item_transform_scale()`, `gimp_item_transform_shear()`, `gimp_item_transform_2d()`, `gimp_item_transform_matrix()`.

`transform_direction` : | The transform direction.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_transform_resize ()

    GimpTransformResize gimp_context_get_transform_resize   (void);

Get the transform resize type.

This procedure returns the transform resize setting. The return value is an integer which corresponds to the values listed in the argument description.

Returns : | The transform resize type.

Since GIMP 2.8

### gimp_context_set_transform_resize ()

    gboolean            gimp_context_set_transform_resize   (GimpTransformResize transform_resize);

Set the transform resize type.

This procedure modifies the transform resize setting. When transforming pixels, if the result of a transform operation has a different size than the original area, this setting determines how the resulting area is sized. This setting affects affects the following procedures: `gimp_item_transform_flip()`, `gimp_item_transform_flip_simple()`, `gimp_item_transform_perspective()`, `gimp_item_transform_rotate()`, `gimp_item_transform_rotate_simple()`, `gimp_item_transform_scale()`, `gimp_item_transform_shear()`, `gimp_item_transform_2d()`, `gimp_item_transform_matrix()`.

`transform_resize` : | The transform resize type.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_transform_recursion ()

    gint                gimp_context_get_transform_recursion
                                                            (void);

Get the transform supersampling recursion.

This procedure returns the transform supersampling recursion level.

Returns : | The transform recursion level.

Since GIMP 2.8

### gimp_context_set_transform_recursion ()

    gboolean            gimp_context_set_transform_recursion
                                                            (gint transform_recursion);

Set the transform supersampling recursion.

This procedure modifies the transform supersampling recursion level setting. Whether or not a transformation does supersampling is determined by the interplolation type. The recursion level defaults to 3, which is a nice default value. This setting affects affects the following procedures: `gimp_item_transform_flip()`, `gimp_item_transform_perspective()`, `gimp_item_transform_rotate()`, `gimp_item_transform_scale()`, `gimp_item_transform_shear()`, `gimp_item_transform_2d()`, `gimp_item_transform_matrix()`.

`transform_recursion` : | The transform recursion level.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_ink_angle ()

    gdouble             gimp_context_get_ink_angle          (void);

Get ink angle in degrees.

Get the ink angle in degrees for ink tool.

Returns : | ink angle in degrees.

Since GIMP 2.8

### gimp_context_set_ink_angle ()

    gboolean            gimp_context_set_ink_angle          (gdouble angle);

Set ink angle in degrees.

Set the ink angle in degrees for ink tool.

`angle` : | ink angle in degrees.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_ink_blob_angle ()

    gdouble             gimp_context_get_ink_blob_angle     (void);

Get ink blob angle in degrees.

Get the ink blob angle in degrees for ink tool.

Returns : | ink blob angle in degrees.

Since GIMP 2.8

### gimp_context_set_ink_blob_angle ()

    gboolean            gimp_context_set_ink_blob_angle     (gdouble angle);

Set ink blob angle in degrees.

Set the ink blob angle in degrees for ink tool.

`angle` : | ink blob angle in degrees.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_ink_blob_aspect_ratio ()

    gdouble             gimp_context_get_ink_blob_aspect_ratio
                                                            (void);

Get ink blob aspect ratio.

Get the ink blob aspect ratio for ink tool.

Returns : | ink blob aspect ratio.

Since GIMP 2.8

### gimp_context_set_ink_blob_aspect_ratio ()

    gboolean            gimp_context_set_ink_blob_aspect_ratio
                                                            (gdouble aspect);

Set ink blob aspect ratio.

Set the ink blob aspect ratio for ink tool.

`aspect` : | ink blob aspect ratio.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_ink_blob_type ()

    GimpInkBlobType     gimp_context_get_ink_blob_type      (void);

Get ink blob type.

Get the ink blob type for ink tool.

Returns : | Ink blob type.

Since GIMP 2.8

### gimp_context_set_ink_blob_type ()

    gboolean            gimp_context_set_ink_blob_type      (GimpInkBlobType type);

Set ink blob type.

Set the ink blob type for ink tool.

`type` : | Ink blob type.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_ink_size ()

    gdouble             gimp_context_get_ink_size           (void);

Get ink blob size in pixels.

Get the ink blob size in pixels for ink tool.

Returns : | ink blob size in pixels.

Since GIMP 2.8

### gimp_context_set_ink_size ()

    gboolean            gimp_context_set_ink_size           (gdouble size);

Set ink blob size in pixels.

Set the ink blob size in pixels for ink tool.

`size` : | ink blob size in pixels.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_ink_size_sensitivity ()

    gdouble             gimp_context_get_ink_size_sensitivity
                                                            (void);

Get ink size sensitivity.

Get the ink size sensitivity for ink tool.

Returns : | ink size sensitivity.

Since GIMP 2.8

### gimp_context_set_ink_size_sensitivity ()

    gboolean            gimp_context_set_ink_size_sensitivity
                                                            (gdouble size);

Set ink size sensitivity.

Set the ink size sensitivity for ink tool.

`size` : | ink size sensitivity.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_ink_speed_sensitivity ()

    gdouble             gimp_context_get_ink_speed_sensitivity
                                                            (void);

Get ink speed sensitivity.

Get the ink speed sensitivity for ink tool.

Returns : | ink speed sensitivity.

Since GIMP 2.8

### gimp_context_set_ink_speed_sensitivity ()

    gboolean            gimp_context_set_ink_speed_sensitivity
                                                            (gdouble speed);

Set ink speed sensitivity.

Set the ink speed sensitivity for ink tool.

`speed` : | ink speed sensitivity.
Returns : | TRUE on success.

Since GIMP 2.8

### gimp_context_get_ink_tilt_sensitivity ()

    gdouble             gimp_context_get_ink_tilt_sensitivity
                                                            (void);

Get ink tilt sensitivity.

Get the ink tilt sensitivity for ink tool.

Returns : | ink tilt sensitivity.

Since GIMP 2.8

### gimp_context_set_ink_tilt_sensitivity ()

    gboolean            gimp_context_set_ink_tilt_sensitivity
                                                            (gdouble tilt);

Set ink tilt sensitivity.

Set the ink tilt sensitivity for ink tool.

`tilt` : | ink tilt sensitivity.
Returns : | TRUE on success.

Since GIMP 2.8