]> Pileus Git - ~andy/gtk/blob - gdk-pixbuf/pixops/pixops.h
Directory full of pixel data scaling code that will eventually migrate
[~andy/gtk] / gdk-pixbuf / pixops / pixops.h
1 #include <libart_lgpl/art_misc.h>
2 #include <libart_lgpl/art_filterlevel.h>
3
4 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
5  * and composite the portion corresponding to
6  * render_x, render_y, render_width, render_height in the new
7  * coordinate system into dest_buf starting at 0, 0
8  */
9 void pixops_composite (art_u8         *dest_buf,
10                        int             render_x0,
11                        int             render_y0,
12                        int             render_x1,
13                        int             render_y1,
14                        int             dest_rowstride,
15                        int             dest_channels,
16                        int             dest_has_alpha,
17                        art_u8         *src_buf,
18                        int             src_width,
19                        int             src_height,
20                        int             src_rowstride,
21                        int             src_channels,
22                        int             src_has_alpha,
23                        double          scale_x,
24                        double          scale_y,
25                        ArtFilterLevel  filter_level,
26                        int             overall_alpha);
27
28 /* Scale src_buf from src_width / src_height by factors scale_x, scale_y
29  * and composite the portion corresponding to
30  * render_x, render_y, render_width, render_height in the new
31  * coordinate system against a checkboard with checks of size check_size
32  * of the colors color1 and color2 into dest_buf starting at 0, 0
33  */
34 void pixops_composite_color (art_u8         *dest_buf,
35                              int             render_x0,
36                              int             render_y0,
37                              int             render_x1,
38                              int             render_y1,
39                              int             dest_rowstride,
40                              int             dest_channels,
41                              int             dest_has_alpha,
42                              art_u8         *src_buf,
43                              int             src_width,
44                              int             src_height,
45                              int             src_rowstride,
46                              int             src_channels,
47                              int             src_has_alpha,
48                              double          scale_x,
49                              double          scale_y,
50                              ArtFilterLevel  filter_level,
51                              int             overall_alpha,
52                              int             check_x,
53                              int             check_y,
54                              int             check_size,
55                              art_u32         color1,
56                              art_u32         color2);
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 into dest_buf starting at 0, 0
62  */
63 void pixops_scale     (art_u8         *dest_buf,
64                        int             render_x0,
65                        int             render_y0,
66                        int             render_x1,
67                        int             render_y1,
68                        int             dest_rowstride,
69                        int             dest_channels,
70                        int             dest_has_alpha,
71                        art_u8         *src_buf,
72                        int             src_width,
73                        int             src_height,
74                        int             src_rowstride,
75                        int             src_channels,
76                        int             src_has_alpha,
77                        double          scale_x,
78                        double          scale_y,
79                        ArtFilterLevel  filter_level);
80