GimpLayer

GimpLayer

Synopsis

                    GimpLayer;
GimpLayer *         gimp_layer_new                      (GimpImage *image,
                                                         gint width,
                                                         gint height,
                                                         GimpImageType type,
                                                         const gchar *name,
                                                         gdouble opacity,
                                                         GimpLayerModeEffects mode);
GimpLayer *         gimp_layer_new_from_pixbuf          (GdkPixbuf *pixbuf,
                                                         GimpImage *dest_image,
                                                         GimpImageType type,
                                                         const gchar *name,
                                                         gdouble opacity,
                                                         GimpLayerModeEffects mode);
GimpLayer *         gimp_layer_new_from_region          (PixelRegion *region,
                                                         GimpImage *dest_image,
                                                         GimpImageType type,
                                                         const gchar *name,
                                                         gdouble opacity,
                                                         GimpLayerModeEffects mode);
GimpLayer *         gimp_layer_new_from_tiles           (TileManager *tiles,
                                                         GimpImage *dest_image,
                                                         GimpImageType type,
                                                         const gchar *name,
                                                         gdouble opacity,
                                                         GimpLayerModeEffects mode);
GimpLayer *         gimp_layer_get_parent               (GimpLayer *layer);
GimpLayerMask *     gimp_layer_get_mask                 (const GimpLayer *layer);
GimpLayerMask *     gimp_layer_create_mask              (const GimpLayer *layer,
                                                         GimpAddMaskType mask_type,
                                                         GimpChannel *channel);
GimpLayerMask *     gimp_layer_add_mask                 (GimpLayer *layer,
                                                         GimpLayerMask *mask,
                                                         gboolean push_undo,
                                                         GError **error);
void                gimp_layer_apply_mask               (GimpLayer *layer,
                                                         GimpMaskApplyMode mode,
                                                         gboolean push_undo);
void                gimp_layer_add_alpha                (GimpLayer *layer);
void                gimp_layer_flatten                  (GimpLayer *layer,
                                                         GimpContext *context);
void                gimp_layer_resize_to_image          (GimpLayer *layer,
                                                         GimpContext *context);
GimpDrawable *      gimp_layer_get_floating_sel_drawable
                                                        (const GimpLayer *layer);
void                gimp_layer_set_floating_sel_drawable
                                                        (GimpLayer *layer,
                                                         GimpDrawable *drawable);
gboolean            gimp_layer_is_floating_sel          (const GimpLayer *layer);
void                gimp_layer_set_opacity              (GimpLayer *layer,
                                                         gdouble opacity,
                                                         gboolean push_undo);
gdouble             gimp_layer_get_opacity              (const GimpLayer *layer);
void                gimp_layer_set_mode                 (GimpLayer *layer,
                                                         GimpLayerModeEffects mode,
                                                         gboolean push_undo);
GimpLayerModeEffects gimp_layer_get_mode                (const GimpLayer *layer);
void                gimp_layer_set_lock_alpha           (GimpLayer *layer,
                                                         gboolean lock_alpha,
                                                         gboolean push_undo);
gboolean            gimp_layer_get_lock_alpha           (const GimpLayer *layer);
gboolean            gimp_layer_can_lock_alpha           (const GimpLayer *layer);

Object Hierarchy

  GObject
   +----GimpObject
         +----GimpViewable
               +----GimpItem
                     +----GimpDrawable
                           +----GimpLayer
                                 +----GimpGroupLayer
                                 +----GimpTextLayer

Implemented Interfaces

GimpLayer implements GimpConfigInterface and GimpPickableInterface.

Properties

  "floating-selection"       gboolean              : Read
  "lock-alpha"               gboolean              : Read
  "mask"                     GimpLayerMask*        : Read
  "mode"                     GimpLayerModeEffects  : Read
  "opacity"                  gdouble               : Read

Signals

  "lock-alpha-changed"                             : Run First
  "mask-changed"                                   : Run First
  "mode-changed"                                   : Run First
  "opacity-changed"                                : Run First

Description

Details

GimpLayer

typedef struct _GimpLayer GimpLayer;


gimp_layer_new ()

GimpLayer *         gimp_layer_new                      (GimpImage *image,
                                                         gint width,
                                                         gint height,
                                                         GimpImageType type,
                                                         const gchar *name,
                                                         gdouble opacity,
                                                         GimpLayerModeEffects mode);


gimp_layer_new_from_pixbuf ()

GimpLayer *         gimp_layer_new_from_pixbuf          (GdkPixbuf *pixbuf,
                                                         GimpImage *dest_image,
                                                         GimpImageType type,
                                                         const gchar *name,
                                                         gdouble opacity,
                                                         GimpLayerModeEffects mode);

Copies pixbuf to a layer taking into consideration the possibility of transforming the contents to meet the requirements of the target image type

pixbuf :

The pixbuf to make the new layer from.

dest_image :

The image the new layer will be added to.

type :

The GimpImageType of the new layer.

name :

The new layer's name.

opacity :

The new layer's opacity.

mode :

The new layer's mode.

Returns :

The new layer.

gimp_layer_new_from_region ()

GimpLayer *         gimp_layer_new_from_region          (PixelRegion *region,
                                                         GimpImage *dest_image,
                                                         GimpImageType type,
                                                         const gchar *name,
                                                         gdouble opacity,
                                                         GimpLayerModeEffects mode);

Copies region to a layer taking into consideration the possibility of transforming the contents to meet the requirements of the target image type

region :

A readable pixel region.

dest_image :

The image the new layer will be added to.

type :

The GimpImageType of the new layer.

name :

The new layer's name.

opacity :

The new layer's opacity.

mode :

The new layer's mode.

Returns :

The new layer.

gimp_layer_new_from_tiles ()

GimpLayer *         gimp_layer_new_from_tiles           (TileManager *tiles,
                                                         GimpImage *dest_image,
                                                         GimpImageType type,
                                                         const gchar *name,
                                                         gdouble opacity,
                                                         GimpLayerModeEffects mode);

Copies tiles to a layer taking into consideration the possibility of transforming the contents to meet the requirements of the target image type

tiles :

The buffer to make the new layer from.

dest_image :

The image the new layer will be added to.

type :

The GimpImageType of the new layer.

name :

The new layer's name.

opacity :

The new layer's opacity.

mode :

The new layer's mode.

Returns :

The new layer.

gimp_layer_get_parent ()

GimpLayer *         gimp_layer_get_parent               (GimpLayer *layer);


gimp_layer_get_mask ()

GimpLayerMask *     gimp_layer_get_mask                 (const GimpLayer *layer);


gimp_layer_create_mask ()

GimpLayerMask *     gimp_layer_create_mask              (const GimpLayer *layer,
                                                         GimpAddMaskType mask_type,
                                                         GimpChannel *channel);


gimp_layer_add_mask ()

GimpLayerMask *     gimp_layer_add_mask                 (GimpLayer *layer,
                                                         GimpLayerMask *mask,
                                                         gboolean push_undo,
                                                         GError **error);


gimp_layer_apply_mask ()

void                gimp_layer_apply_mask               (GimpLayer *layer,
                                                         GimpMaskApplyMode mode,
                                                         gboolean push_undo);


gimp_layer_add_alpha ()

void                gimp_layer_add_alpha                (GimpLayer *layer);


gimp_layer_flatten ()

void                gimp_layer_flatten                  (GimpLayer *layer,
                                                         GimpContext *context);


gimp_layer_resize_to_image ()

void                gimp_layer_resize_to_image          (GimpLayer *layer,
                                                         GimpContext *context);


gimp_layer_get_floating_sel_drawable ()

GimpDrawable *      gimp_layer_get_floating_sel_drawable
                                                        (const GimpLayer *layer);


gimp_layer_set_floating_sel_drawable ()

void                gimp_layer_set_floating_sel_drawable
                                                        (GimpLayer *layer,
                                                         GimpDrawable *drawable);


gimp_layer_is_floating_sel ()

gboolean            gimp_layer_is_floating_sel          (const GimpLayer *layer);


gimp_layer_set_opacity ()

void                gimp_layer_set_opacity              (GimpLayer *layer,
                                                         gdouble opacity,
                                                         gboolean push_undo);


gimp_layer_get_opacity ()

gdouble             gimp_layer_get_opacity              (const GimpLayer *layer);


gimp_layer_set_mode ()

void                gimp_layer_set_mode                 (GimpLayer *layer,
                                                         GimpLayerModeEffects mode,
                                                         gboolean push_undo);


gimp_layer_get_mode ()

GimpLayerModeEffects gimp_layer_get_mode                (const GimpLayer *layer);


gimp_layer_set_lock_alpha ()

void                gimp_layer_set_lock_alpha           (GimpLayer *layer,
                                                         gboolean lock_alpha,
                                                         gboolean push_undo);


gimp_layer_get_lock_alpha ()

gboolean            gimp_layer_get_lock_alpha           (const GimpLayer *layer);


gimp_layer_can_lock_alpha ()

gboolean            gimp_layer_can_lock_alpha           (const GimpLayer *layer);

Property Details

The "floating-selection" property

  "floating-selection"       gboolean              : Read

Default value: FALSE


The "lock-alpha" property

  "lock-alpha"               gboolean              : Read

Default value: FALSE


The "mask" property

  "mask"                     GimpLayerMask*        : Read


The "mode" property

  "mode"                     GimpLayerModeEffects  : Read

Default value: GIMP_NORMAL_MODE


The "opacity" property

  "opacity"                  gdouble               : Read

Allowed values: [0,1]

Default value: 1

Signal Details

The "lock-alpha-changed" signal

void                user_function                      (GimpLayer *gimplayer,
                                                        gpointer   user_data)      : Run First

gimplayer :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "mask-changed" signal

void                user_function                      (GimpLayer *gimplayer,
                                                        gpointer   user_data)      : Run First

gimplayer :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "mode-changed" signal

void                user_function                      (GimpLayer *gimplayer,
                                                        gpointer   user_data)      : Run First

gimplayer :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "opacity-changed" signal

void                user_function                      (GimpLayer *gimplayer,
                                                        gpointer   user_data)      : Run First

gimplayer :

the object which received the signal.

user_data :

user data set when the signal handler was connected.