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

  1. /* LIBGIMP - The GIMP Library
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
  3.  *
  4.  * gimpchannel.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.  * Library 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. /**
  26.  * gimp_channel_new:
  27.  * @image_ID: The image to which to add the channel.
  28.  * @name: The channel name.
  29.  * @width: The channel width.
  30.  * @height: The channel height.
  31.  * @opacity: The channel opacity.
  32.  * @color: The channel compositing color.
  33.  *
  34.  * Create a new channel.
  35.  *
  36.  * This procedure creates a new channel with the specified width and
  37.  * height. Name, opacity, and color are also supplied parameters. The
  38.  * new channel still needs to be added to the image, as this is not
  39.  * automatic. Add the new channel with the 'gimp_image_add_channel'
  40.  * command. Other attributes such as channel show masked, should be set
  41.  * with explicit procedure calls. The channel's contents are undefined
  42.  * initially.
  43.  *
  44.  * Returns: The newly created channel.
  45.  */
  46. gint32
  47. gimp_channel_new (gint32   image_ID,
  48.           gchar   *name,
  49.           guint    width,
  50.           guint    height,
  51.           gdouble  opacity,
  52.           guchar  *color)
  53. {
  54.   return _gimp_channel_new (image_ID,
  55.                 width,
  56.                 height,
  57.                 name,
  58.                 opacity,
  59.                 color[0],
  60.                 color[1],
  61.                 color[2]);
  62. }
  63.