]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/pixops/pixops.h
Most of this patch is based on a patch by Havoc Pennington (hp@redhat.com)
[~andy/gtk] / gdk-pixbuf / pixops / pixops.h
1 #ifndef PIXOPS_H
2 #define PIXOPS_H
3
4 #include <glib.h>
5 #include "gdk-pixbuf.h"
6
7 \f
8
9 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
10  * and composite the portion corresponding to
11  * render_x, render_y, render_width, render_height in the new
12  * coordinate system into dest_buf starting at 0, 0
13  */
14 void pixops_composite (guchar         *dest_buf,
15                        int             render_x0,
16                        int             render_y0,
17                        int             render_x1,
18                        int             render_y1,
19                        int             dest_rowstride,
20                        int             dest_channels,
21                        int             dest_has_alpha,
22                        const guchar   *src_buf,
23                        int             src_width,
24                        int             src_height,
25                        int             src_rowstride,
26                        int             src_channels,
27                        int             src_has_alpha,
28                        double          scale_x,
29                        double          scale_y,
30                        GdkInterpType   interp_type,
31                        int             overall_alpha);
32
33 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
34  * and composite the portion corresponding to
35  * render_x, render_y, render_width, render_height in the new
36  * coordinate system against a checkboard with checks of size check_size
37  * of the colors color1 and color2 into dest_buf starting at 0, 0
38  */
39 void pixops_composite_color (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                              GdkInterpType   interp_type,
56                              int             overall_alpha,
57                              int             check_x,
58                              int             check_y,
59                              int             check_size,
60                              guint32         color1,
61                              guint32         color2);
62
63 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
64  * and composite the portion corresponding to
65  * render_x, render_y, render_width, render_height in the new
66  * coordinate system into dest_buf starting at 0, 0
67  */
68 void pixops_scale     (guchar         *dest_buf,
69                        int             render_x0,
70                        int             render_y0,
71                        int             render_x1,
72                        int             render_y1,
73                        int             dest_rowstride,
74                        int             dest_channels,
75                        int             dest_has_alpha,
76                        const guchar   *src_buf,
77                        int             src_width,
78                        int             src_height,
79                        int             src_rowstride,
80                        int             src_channels,
81                        int             src_has_alpha,
82                        double          scale_x,
83                        double          scale_y,
84                        GdkInterpType   interp_type);
85
86 \f
87
88 #endif