]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/pixops/pixops.h
[quartz] Delete the typedef of GdkDevicePrivate
[~andy/gtk] / gdk-pixbuf / pixops / pixops.h
1 /*
2  * Copyright (C) 2000 Red Hat, Inc
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 #ifndef PIXOPS_H
20 #define PIXOPS_H
21
22 #include <glib.h>
23
24 /* Interpolation modes; must match GdkInterpType */ 
25 typedef enum {
26         PIXOPS_INTERP_NEAREST,
27         PIXOPS_INTERP_TILES,
28         PIXOPS_INTERP_BILINEAR,
29         PIXOPS_INTERP_HYPER
30 } PixopsInterpType;
31
32 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
33  * and composite the portion corresponding to
34  * render_x, render_y, render_width, render_height in the new
35  * coordinate system into dest_buf starting at 0, 0
36  */
37 void _pixops_composite (guchar          *dest_buf,
38                         int              dest_width,
39                         int              dest_height,
40                         int              dest_rowstride,
41                         int              dest_channels,
42                         int              dest_has_alpha,
43                         const guchar    *src_buf,
44                         int              src_width,
45                         int              src_height,
46                         int              src_rowstride,
47                         int              src_channels,
48                         int              src_has_alpha,
49                         int              dest_x,
50                         int              dest_y,
51                         int              dest_region_width,
52                         int              dest_region_height,
53                         double           offset_x,
54                         double           offset_y,
55                         double           scale_x,
56                         double           scale_y,
57                         PixopsInterpType interp_type,
58                         int              overall_alpha);
59
60 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
61  * and composite the portion corresponding to
62  * render_x, render_y, render_width, render_height in the new
63  * coordinate system against a checkboard with checks of size check_size
64  * of the colors color1 and color2 into dest_buf starting at 0, 0
65  */
66 void _pixops_composite_color (guchar          *dest_buf,
67                               int              dest_width,
68                               int              dest_height,
69                               int              dest_rowstride,
70                               int              dest_channels,
71                               int              dest_has_alpha,
72                               const guchar    *src_buf,
73                               int              src_width,
74                               int              src_height,
75                               int              src_rowstride,
76                               int              src_channels,
77                               int              src_has_alpha,
78                               int              dest_x,
79                               int              dest_y,
80                               int              dest_region_width,
81                               int              dest_region_height,
82                               double           offset_x,
83                               double           offset_y,
84                               double           scale_x,
85                               double           scale_y,
86                               PixopsInterpType interp_type,
87                               int              overall_alpha,
88                               int              check_x,
89                               int              check_y,
90                               int              check_size,
91                               guint32          color1,
92                               guint32          color2);
93
94 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
95  * and composite the portion corresponding to
96  * render_x, render_y, render_width, render_height in the new
97  * coordinate system into dest_buf starting at 0, 0
98  */
99 void _pixops_scale    (guchar          *dest_buf,
100                        int              dest_width,
101                        int              dest_height,
102                        int              dest_rowstride,
103                        int              dest_channels,
104                        int              dest_has_alpha,
105                        const guchar    *src_buf,
106                        int              src_width,
107                        int              src_height,
108                        int              src_rowstride,
109                        int              src_channels,
110                        int              src_has_alpha,
111                        int              dest_x,
112                        int              dest_y,
113                        int              dest_region_width,
114                        int              dest_region_height,
115                        double           offset_x,
116                        double           offset_y,
117                        double           scale_x,
118                        double           scale_y,
119                        PixopsInterpType interp_type);
120 #endif