diff options
author | gregory guy <gregory-tde@laposte.net> | 2020-10-02 12:42:44 +0200 |
---|---|---|
committer | gregory guy <gregory-tde@laposte.net> | 2020-10-05 13:50:52 +0200 |
commit | 8349a964c20f96504886ece0f2c8ba0c7489fff3 (patch) | |
tree | 465e998f662f5b54e93e31501ab38156664f75d1 /art_rgb_pixbuf_affine.c | |
parent | 31363763ec32d7d1edd53b55d7321f001f031fe9 (diff) | |
download | libart-lgpl-8349a964c20f96504886ece0f2c8ba0c7489fff3.tar.gz libart-lgpl-8349a964c20f96504886ece0f2c8ba0c7489fff3.zip |
Libart-lgpl moved into a 'src' folder for consistency sake with the other
modules.
Add basic cmake build instructions.
Rework of the README file.
Some cosmetics.
Signed-off-by: gregory guy <gregory-tde@laposte.net>
Diffstat (limited to 'art_rgb_pixbuf_affine.c')
-rw-r--r-- | art_rgb_pixbuf_affine.c | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/art_rgb_pixbuf_affine.c b/art_rgb_pixbuf_affine.c deleted file mode 100644 index 0a25b57..0000000 --- a/art_rgb_pixbuf_affine.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Libart_LGPL - library of basic graphic primitives - * Copyright (C) 1998 Raph Levien - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" -#include "art_rgb_pixbuf_affine.h" - -#include <math.h> -#include "art_misc.h" -#include "art_point.h" -#include "art_affine.h" -#include "art_pixbuf.h" -#include "art_rgb_affine.h" -#include "art_rgb_affine.h" -#include "art_rgb_rgba_affine.h" - -/* This module handles compositing of affine-transformed generic - pixbuf images over rgb pixel buffers. */ - -/* Composite the source image over the destination image, applying the - affine transform. */ -/** - * art_rgb_pixbuf_affine: Affine transform source RGB pixbuf and composite. - * @dst: Destination image RGB buffer. - * @x0: Left coordinate of destination rectangle. - * @y0: Top coordinate of destination rectangle. - * @x1: Right coordinate of destination rectangle. - * @y1: Bottom coordinate of destination rectangle. - * @dst_rowstride: Rowstride of @dst buffer. - * @pixbuf: source image pixbuf. - * @affine: Affine transform. - * @level: Filter level. - * @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing. - * - * Affine transform the source image stored in @src, compositing over - * the area of destination image @dst specified by the rectangle - * (@x0, @y0) - (@x1, @y1). As usual in libart, the left and top edges - * of this rectangle are included, and the right and bottom edges are - * excluded. - * - * The @alphagamma parameter specifies that the alpha compositing be - * done in a gamma-corrected color space. In the current - * implementation, it is ignored. - * - * The @level parameter specifies the speed/quality tradeoff of the - * image interpolation. Currently, only ART_FILTER_NEAREST is - * implemented. - **/ -void -art_rgb_pixbuf_affine (art_u8 *dst, - int x0, int y0, int x1, int y1, int dst_rowstride, - const ArtPixBuf *pixbuf, - const double affine[6], - ArtFilterLevel level, - ArtAlphaGamma *alphagamma) -{ - if (pixbuf->format != ART_PIX_RGB) - { - art_warn ("art_rgb_pixbuf_affine: need RGB format image\n"); - return; - } - - if (pixbuf->bits_per_sample != 8) - { - art_warn ("art_rgb_pixbuf_affine: need 8-bit sample data\n"); - return; - } - - if (pixbuf->n_channels != 3 + (pixbuf->has_alpha != 0)) - { - art_warn ("art_rgb_pixbuf_affine: need 8-bit sample data\n"); - return; - } - - if (pixbuf->has_alpha) - art_rgb_rgba_affine (dst, x0, y0, x1, y1, dst_rowstride, - pixbuf->pixels, - pixbuf->width, pixbuf->height, pixbuf->rowstride, - affine, - level, - alphagamma); - else - art_rgb_affine (dst, x0, y0, x1, y1, dst_rowstride, - pixbuf->pixels, - pixbuf->width, pixbuf->height, pixbuf->rowstride, - affine, - level, - alphagamma); -} |