gradient.h

Go to the documentation of this file.
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
00002 
00003 /* Metacity gradient rendering */
00004 
00005 /* 
00006  * Copyright (C) 2001 Havoc Pennington, 99% copied from wrlib in
00007  * WindowMaker, Copyright (C) 1997-2000 Dan Pascu and Alfredo Kojima
00008  * 
00009  * This program is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License as
00011  * published by the Free Software Foundation; either version 2 of the
00012  * License, or (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful, but
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * General Public License for more details.
00018  * 
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00022  * 02111-1307, USA.  */
00023 
00024 #ifndef META_GRADIENT_H
00025 #define META_GRADIENT_H
00026 
00027 #include <gdk-pixbuf/gdk-pixbuf.h>
00028 #include <gdk/gdkcolor.h>
00029 
00030 typedef enum
00031 {
00032   META_GRADIENT_VERTICAL,
00033   META_GRADIENT_HORIZONTAL,
00034   META_GRADIENT_DIAGONAL,
00035   META_GRADIENT_LAST
00036 } MetaGradientType;
00037 
00038 GdkPixbuf* meta_gradient_create_simple     (int               width,
00039                                             int               height,
00040                                             const GdkColor   *from,
00041                                             const GdkColor   *to,
00042                                             MetaGradientType  style);
00043 GdkPixbuf* meta_gradient_create_multi      (int               width,
00044                                             int               height,
00045                                             const GdkColor   *colors,
00046                                             int               n_colors,
00047                                             MetaGradientType  style);
00048 GdkPixbuf* meta_gradient_create_interwoven (int               width,
00049                                             int               height,
00050                                             const GdkColor    colors1[2],
00051                                             int               thickness1,
00052                                             const GdkColor    colors2[2],
00053                                             int               thickness2);
00054 
00055 
00056 /* Generate an alpha gradient and multiply it with the existing alpha
00057  * channel of the given pixbuf
00058  */
00059 void meta_gradient_add_alpha (GdkPixbuf       *pixbuf,
00060                               const guchar    *alphas,
00061                               int              n_alphas,
00062                               MetaGradientType type);
00063 
00064 
00065 #endif

Generated on Sat Aug 23 22:04:18 2008 for metacity by  doxygen 1.5.5