gimppreviewutil

Name

gimppreviewutil -- Utility functions for the preview.

Synopsis



GimpDrawable* gimp_preview_get_temp_drawable
                                            (GimpDrawable *drawable,
                                             gint x,
                                             gint y,
                                             gint width,
                                             gint height);
GimpDrawable* gimp_preview_get_scaled_temp_drawable
                                            (GimpDrawable *drawable,
                                             gdouble scale,
                                             gint x,
                                             gint y,
                                             gint width,
                                             gint height);
void        gimp_preview_free_temp_drawable (GimpDrawable *drawable);

Description

This module contains some utility functions for working with the preview.

Details

gimp_preview_get_temp_drawable ()

GimpDrawable* gimp_preview_get_temp_drawable
                                            (GimpDrawable *drawable,
                                             gint x,
                                             gint y,
                                             gint width,
                                             gint height);

Make a new GimpDrawable as a copy of an area from another GimpDrawable. This function creates a new GimpImage to hold the result. This function also copies the selection and active components. If the drawable is a layer that has a layer mask it is copied too. When the result is no longer needed it must be freed with gimp_preview_free_temp_drawable(). For performance reasons undo's have been disabled on the image.

drawable : The original GimpDrawable.
x : Left coordinate of the area.
y : Top coordinate of the area.
width : Width of the area.
height : Height of the area.
Returns : The new GimpDrawable.


gimp_preview_get_scaled_temp_drawable ()

GimpDrawable* gimp_preview_get_scaled_temp_drawable
                                            (GimpDrawable *drawable,
                                             gdouble scale,
                                             gint x,
                                             gint y,
                                             gint width,
                                             gint height);

Make a new GimpDrawable as a scaled copy of an area from another GimpDrawable. This function creates a new GimpImage to hold the result. This function also copies the selection and active components. If the drawable is a layer that has a layer mask it is copied too. When the result is no longer needed it must be freed with gimp_preview_free_temp_drawable(). For performance reasons undo's have been disabled on the image.

drawable : The original GimpDrawable.
scale : Scaling factor.
x : Left coordinate of the area in preview-coordinates.
y : Top coordinate of the area in preview-coordinates.
width : Width of the area in preview-coordinates.
height : Height of the area in preview-coordinates.
Returns : The new GimpDrawable with a size of width x height.


gimp_preview_free_temp_drawable ()

void        gimp_preview_free_temp_drawable (GimpDrawable *drawable);

Free a drawable that has been created with gimp_preview_get_temp_drawable() or gimp_preview_get_scaled_temp_drawable().

drawable : A GimpDrawable that was created with gimp_preview_get_temp_drawable().