1 #ifndef SP_ART_RGBA_RGBA_AFFINE_H
2 #define SP_ART_RGBA_RGBA_AFFINE_H
5 * Lauris Kaplinski <lauris@ariman.ee>
7 * A slightly modified version of art_rgb_rgba_affine to render into
11 /* Libart_LGPL - library of basic graphic primitives
12 * Copyright (C) 1998 Raph Levien
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.
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.
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.
31 #include <libart_lgpl/art_misc.h>
32 #include <libart_lgpl/art_filterlevel.h>
33 #include <libart_lgpl/art_alphagamma.h>
35 /* This module handles compositing of affine-transformed rgba images
36 over rgb pixel buffers. */
38 /* Composite the source image over the destination image, applying the
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.
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
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.
67 * The @level parameter specifies the speed/quality tradeoff of the
68 * image interpolation. Currently, only ART_FILTER_NEAREST is
72 gnome_print_art_rgba_rgba_affine (art_u8 *dst,
73 int x0, int y0, int x1, int y1, int dst_rowstride,
75 int src_width, int src_height, int src_rowstride,
76 const double affine[6],
78 ArtAlphaGamma *alphagamma);