]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/pixops/pixops.h
Correct copyright information
[~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 \f
25
26 /* Interpolation modes; must match GdkInterpType */ 
27 typedef enum {
28         PIXOPS_INTERP_NEAREST,
29         PIXOPS_INTERP_TILES,
30         PIXOPS_INTERP_BILINEAR,
31         PIXOPS_INTERP_HYPER
32 } PixopsInterpType;
33
34 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
35  * and composite the portion corresponding to
36  * render_x, render_y, render_width, render_height in the new
37  * coordinate system into dest_buf starting at 0, 0
38  */
39 void _pixops_composite (guchar         *dest_buf,
40                         int             render_x0,
41                         int             render_y0,
42                         int             render_x1,
43                         int             render_y1,
44                         int             dest_rowstride,
45                         int             dest_channels,
46                         int             dest_has_alpha,
47                         const guchar   *src_buf,
48                         int             src_width,
49                         int             src_height,
50                         int             src_rowstride,
51                         int             src_channels,
52                         int             src_has_alpha,
53                         double          scale_x,
54                         double          scale_y,
55                         PixopsInterpType   interp_type,
56                         int             overall_alpha);
57
58 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
59  * and composite the portion corresponding to
60  * render_x, render_y, render_width, render_height in the new
61  * coordinate system against a checkboard with checks of size check_size
62  * of the colors color1 and color2 into dest_buf starting at 0, 0
63  */
64 void _pixops_composite_color (guchar         *dest_buf,
65                               int             render_x0,
66                               int             render_y0,
67                               int             render_x1,
68                               int             render_y1,
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                               double          scale_x,
79                               double          scale_y,
80                               PixopsInterpType   interp_type,
81                               int             overall_alpha,
82                               int             check_x,
83                               int             check_y,
84                               int             check_size,
85                               guint32         color1,
86                               guint32         color2);
87
88 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
89  * and composite the portion corresponding to
90  * render_x, render_y, render_width, render_height in the new
91  * coordinate system into dest_buf starting at 0, 0
92  */
93 void _pixops_scale    (guchar         *dest_buf,
94                        int             render_x0,
95                        int             render_y0,
96                        int             render_x1,
97                        int             render_y1,
98                        int             dest_rowstride,
99                        int             dest_channels,
100                        int             dest_has_alpha,
101                        const guchar   *src_buf,
102                        int             src_width,
103                        int             src_height,
104                        int             src_rowstride,
105                        int             src_channels,
106                        int             src_has_alpha,
107                        double          scale_x,
108                        double          scale_y,
109                        PixopsInterpType   interp_type);
110
111 \f
112
113 #endif