]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/gdk-pixbuf-transform.h
[quartz] Delete the typedef of GdkDevicePrivate
[~andy/gtk] / gdk-pixbuf / gdk-pixbuf-transform.h
1 /* GdkPixbuf library - transformations
2  *
3  * Copyright (C) 2003 The Free Software Foundation
4  *
5  * Authors: Mark Crichton <crichton@gimp.org>
6  *          Miguel de Icaza <miguel@gnu.org>
7  *          Federico Mena-Quintero <federico@gimp.org>
8  *          Havoc Pennington <hp@redhat.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the
22  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23  * Boston, MA 02111-1307, USA.
24  */
25
26 #if !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
27 #error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
28 #endif
29
30 #ifndef GDK_PIXBUF_TRANSFORM_H
31 #define GDK_PIXBUF_TRANSFORM_H
32
33 #include <glib.h>
34 #include <gdk-pixbuf/gdk-pixbuf-core.h>
35
36
37 G_BEGIN_DECLS
38
39 /* Scaling */
40
41 /* Interpolation modes */
42 typedef enum {
43         GDK_INTERP_NEAREST,
44         GDK_INTERP_TILES,
45         GDK_INTERP_BILINEAR,
46         GDK_INTERP_HYPER
47 } GdkInterpType;
48
49 typedef enum {
50         GDK_PIXBUF_ROTATE_NONE             =   0,
51         GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE =  90,
52         GDK_PIXBUF_ROTATE_UPSIDEDOWN       = 180,
53         GDK_PIXBUF_ROTATE_CLOCKWISE        = 270
54 } GdkPixbufRotation;
55
56 void gdk_pixbuf_scale           (const GdkPixbuf *src,
57                                  GdkPixbuf       *dest,
58                                  int              dest_x,
59                                  int              dest_y,
60                                  int              dest_width,
61                                  int              dest_height,
62                                  double           offset_x,
63                                  double           offset_y,
64                                  double           scale_x,
65                                  double           scale_y,
66                                  GdkInterpType    interp_type);
67 void gdk_pixbuf_composite       (const GdkPixbuf *src,
68                                  GdkPixbuf       *dest,
69                                  int              dest_x,
70                                  int              dest_y,
71                                  int              dest_width,
72                                  int              dest_height,
73                                  double           offset_x,
74                                  double           offset_y,
75                                  double           scale_x,
76                                  double           scale_y,
77                                  GdkInterpType    interp_type,
78                                  int              overall_alpha);
79 void gdk_pixbuf_composite_color (const GdkPixbuf *src,
80                                  GdkPixbuf       *dest,
81                                  int              dest_x,
82                                  int              dest_y,
83                                  int              dest_width,
84                                  int              dest_height,
85                                  double           offset_x,
86                                  double           offset_y,
87                                  double           scale_x,
88                                  double           scale_y,
89                                  GdkInterpType    interp_type,
90                                  int              overall_alpha,
91                                  int              check_x,
92                                  int              check_y,
93                                  int              check_size,
94                                  guint32          color1,
95                                  guint32          color2);
96
97 GdkPixbuf *gdk_pixbuf_scale_simple           (const GdkPixbuf *src,
98                                               int              dest_width,
99                                               int              dest_height,
100                                               GdkInterpType    interp_type);
101
102 GdkPixbuf *gdk_pixbuf_composite_color_simple (const GdkPixbuf *src,
103                                               int              dest_width,
104                                               int              dest_height,
105                                               GdkInterpType    interp_type,
106                                               int              overall_alpha,
107                                               int              check_size,
108                                               guint32          color1,
109                                               guint32          color2);
110
111 GdkPixbuf *gdk_pixbuf_rotate_simple          (const GdkPixbuf   *src,
112                                               GdkPixbufRotation  angle);
113 GdkPixbuf *gdk_pixbuf_flip                   (const GdkPixbuf   *src,
114                                               gboolean           horizontal);
115                                      
116 G_END_DECLS
117
118
119 #endif  /* GDK_PIXBUF_TRANSFORM_H */