home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / libgimp / gimplayer.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-25  |  2.5 KB  |  82 lines

  1. /* LIBGIMP - The GIMP Library
  2.  * Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
  3.  *
  4.  * gimplayer.c
  5.  *
  6.  * This library is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU Lesser General Public
  8.  * License as published by the Free Software Foundation; either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * This library is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  * Lesser General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU Lesser General Public
  17.  * License along with this library; if not, write to the
  18.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.  * Boston, MA 02111-1307, USA.
  20.  */
  21.  
  22. #include "gimp.h"
  23.  
  24. /**
  25.  * gimp_layer_new:
  26.  * @image_ID: The image to which to add the layer.
  27.  * @name: The layer name.
  28.  * @width: The layer width.
  29.  * @height: The layer height.
  30.  * @type: The layer type.
  31.  * @opacity: The layer opacity.
  32.  * @mode: The layer combination mode.
  33.  *
  34.  * Create a new layer.
  35.  *
  36.  * This procedure creates a new layer with the specified width, height,
  37.  * and type. Name, opacity, and mode are also supplied parameters. The
  38.  * new layer still needs to be added to the image, as this is not
  39.  * automatic. Add the new layer with the 'gimp_image_add_layer'
  40.  * command. Other attributes such as layer mask modes, and offsets
  41.  * should be set with explicit procedure calls.
  42.  *
  43.  * Returns: The newly created layer.
  44.  */
  45. gint32
  46. gimp_layer_new (gint32                image_ID,
  47.         gchar                *name,
  48.         gint                  width,
  49.         gint                  height,
  50.         GimpImageType         type,
  51.         gdouble               opacity,
  52.         GimpLayerModeEffects  mode)
  53. {
  54.   return _gimp_layer_new (image_ID,
  55.               width,
  56.               height,
  57.               type,
  58.               name,
  59.               opacity,
  60.               mode);
  61. }
  62.  
  63. /**
  64.  * gimp_layer_copy:
  65.  * @layer_ID: The layer to copy.
  66.  *
  67.  * Copy a layer.
  68.  *
  69.  * This procedure copies the specified layer and returns the copy. The
  70.  * newly copied layer is for use within the original layer's image. It
  71.  * should not be subsequently added to any other image. If you create
  72.  * a copy of the background layer, remember to add an alpha channel
  73.  * before you add the new layer to the image.
  74.  *
  75.  * Returns: The newly copied layer.
  76.  */
  77. gint32
  78. gimp_layer_copy (gint32  layer_ID)
  79. {
  80.   return _gimp_layer_copy (layer_ID, FALSE);
  81. }
  82.