fix some more y0, y1 complaints
[rrdtool.git] / src / art_rgba_rgba_affine.h
1 #ifndef SP_ART_RGBA_RGBA_AFFINE_H
2 #define SP_ART_RGBA_RGBA_AFFINE_H
3
4 /*
5  * Lauris Kaplinski <lauris@ariman.ee>
6  *
7  * A slightly modified version of art_rgb_rgba_affine to render into
8  * rgba buffer
9  */
10
11 /* Libart_LGPL - library of basic graphic primitives
12  * Copyright (C) 1998 Raph Levien
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library General Public
25  * License along with this library; if not, write to the
26  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27  * Boston, MA 02111-1307, USA.
28  */
29
30 #include <math.h>
31 #include <libart_lgpl/art_misc.h>
32 #include <libart_lgpl/art_filterlevel.h>
33 #include <libart_lgpl/art_alphagamma.h>
34
35 /* This module handles compositing of affine-transformed rgba images
36    over rgb pixel buffers. */
37
38 /* Composite the source image over the destination image, applying the
39    affine transform. */
40
41 /**
42  * gnome_print_art_rgba_rgba_affine: Affine transform source RGBA image and composite.
43  * @dst: Destination image RGBA buffer.
44  * @x0: Left coordinate of destination rectangle.
45  * @y0: Top coordinate of destination rectangle.
46  * @x1: Right coordinate of destination rectangle.
47  * @y1: Bottom coordinate of destination rectangle.
48  * @dst_rowstride: Rowstride of @dst buffer.
49  * @src: Source image RGBA buffer.
50  * @src_width: Width of source image.
51  * @src_height: Height of source image.
52  * @src_rowstride: Rowstride of @src buffer.
53  * @affine: Affine transform.
54  * @level: Filter level.
55  * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing.
56  *
57  * Affine transform the source image stored in @src, compositing over
58  * the area of destination image @dst specified by the rectangle
59  * (@x0, @y0) - (@x1, @y1). As usual in libart, the left and top edges
60  * of this rectangle are included, and the right and bottom edges are
61  * excluded.
62  *
63  * The @alphagamma parameter specifies that the alpha compositing be
64  * done in a gamma-corrected color space. In the current
65  * implementation, it is ignored.
66  *
67  * The @level parameter specifies the speed/quality tradeoff of the
68  * image interpolation. Currently, only ART_FILTER_NEAREST is
69  * implemented.
70  **/
71 void
72 gnome_print_art_rgba_rgba_affine (art_u8 *dst,
73                      int libart_x0, int libart_y0, int libart_x1, int libart_y1, int dst_rowstride,
74                      const art_u8 *src,
75                      int src_width, int src_height, int src_rowstride,
76                      const double affine[6],
77                      ArtFilterLevel level,
78                      ArtAlphaGamma *alphagamma);
79
80 #endif