mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 20:12:30 +00:00
11c51fa948
2001-04-07 Daniel Egger <egger@suse.de> * app/paint-funcs/paint-funcs-gray.c: * app/paint-funcs/paint-funcs-gray.h: * app/paint-funcs/paint-funcs-graya.c: * app/paint-funcs/paint-funcs-graya.h: * app/paint-funcs/paint-funcs-indexed.c: * app/paint-funcs/paint-funcs-indexed.h: * app/paint-funcs/paint-funcs-indexeda.c: * app/paint-funcs/paint-funcs-indexeda.h: * app/paint-funcs/paint-funcs-rgb.c: * app/paint-funcs/paint-funcs-rgb.h: * app/paint-funcs/paint-funcs-rgba.c: * app/paint-funcs/paint-funcs-rgba.h: Added new files seperated and specialised from paint_funcs.c. Not used so far.
235 lines
7.3 KiB
C
235 lines
7.3 KiB
C
/* The GIMP -- an image manipulation program
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program 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 General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
/*
|
|
* gaussian_blur_region no longer does combination; arguments changed
|
|
* -- scott@poverty.bloomington.in.us, 16Oct97
|
|
*/
|
|
|
|
#ifndef __PAINT_FUNCS_RGBA_H__
|
|
#define __PAINT_FUNCS_RGBA_H__
|
|
|
|
#include "paint_funcsP.h"
|
|
|
|
void update_tile_rowhints_rgba (Tile *tile,
|
|
gint ymin,
|
|
gint ymax);
|
|
|
|
|
|
/* Paint functions */
|
|
|
|
void color_pixels_rgba (guchar *dest, const guchar *color,
|
|
gint w);
|
|
|
|
void blend_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest,
|
|
gint blend, gint w);
|
|
|
|
void shade_pixels_rgba (const guchar *src, guchar *dest,
|
|
const guchar *color,
|
|
gint blend, gint w);
|
|
|
|
void extract_alpha_pixels_rgba (const guchar *src,
|
|
const guchar *mask,
|
|
guchar *dest,
|
|
gint w);
|
|
|
|
void darken_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, gint length,
|
|
gint bytes2, gint has_alpha1);
|
|
|
|
void lighten_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, gint length,
|
|
gint bytes2, gint has_alpha2);
|
|
|
|
void hsv_only_pixels_rgba_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, guint mode, guint length);
|
|
|
|
void color_only_pixels_rgba_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, guint mode, guint length);
|
|
|
|
void multiply_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, gint length,
|
|
gint bytes2, gint has_alpha2);
|
|
|
|
void divide_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, gint length,
|
|
gint bytes2, gint has_alpha2);
|
|
|
|
void screen_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, gint length,
|
|
gint bytes2, gint has_alpha2);
|
|
|
|
void overlay_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, gint length,
|
|
gint bytes2, gint has_alpha2);
|
|
|
|
void add_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, gint length,
|
|
gint bytes2, gint has_alpha2);
|
|
|
|
void subtract_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, gint length,
|
|
gint bytes2, gint has_alpha2);
|
|
|
|
void difference_pixels_rgba(const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest, gint length,
|
|
gint bytes2, gint has_alpha2);
|
|
|
|
void dissolve_pixels_rgba (const guchar *src,
|
|
guchar *dest, guint x, guint y,
|
|
guint opacity, guint length);
|
|
|
|
void flatten_pixels_rgba (const guchar *src, guchar *dest,
|
|
const guchar *bg, guint length);
|
|
|
|
|
|
/* apply the mask data to the alpha channel of the pixel data */
|
|
void apply_mask_to_alpha_channel_rgba (guchar *src,
|
|
const guchar *mask,
|
|
guint opacity, guint length);
|
|
|
|
/* combine the mask data with the alpha channel of the pixel data */
|
|
void combine_mask_and_alpha_channel_rgba (guchar *src,
|
|
const guchar *mask,
|
|
guint opacity, guint length);
|
|
|
|
|
|
/* lay down the initial pixels in the case of only one
|
|
* channel being visible and no layers...In this singular
|
|
* case, we want to display a grayscale image w/o transparency
|
|
*/
|
|
void initial_channel_pixels_rgba (const guchar *src,
|
|
guchar *dest,
|
|
guint length);
|
|
|
|
/* lay down the initial pixels for the base layer.
|
|
* This process obviously requires no composition.
|
|
*/
|
|
void initial_pixels_rgba (const guchar *src,
|
|
guchar *dest,
|
|
const guchar *mask,
|
|
guint opacity, const gboolean *affect,
|
|
guint length);
|
|
|
|
/* combine an RGB or GRAY image with an RGBA or GRAYA image
|
|
* destination is intensity-alpha...
|
|
*/
|
|
void combine_pixels_rgba_rgb (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest,
|
|
const guchar *mask,
|
|
gint opacity, const gint *affect,
|
|
gint mode_affect, gint length);
|
|
|
|
/* combine an RGBA or GRAYA image with an RGBA or GRAYA image
|
|
* destination is of course intensity-alpha...
|
|
*/
|
|
void combine_pixels_rgba_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest,
|
|
const guchar *mask,
|
|
gint opacity,
|
|
const gint *affect,
|
|
gint mode_affect,
|
|
gint length);
|
|
|
|
/* combine a channel with intensity-alpha pixels based
|
|
* on some opacity, and a channel color...
|
|
* destination is intensity-alpha
|
|
*/
|
|
|
|
void combine_rgba_and_indexeda_pixels (apply_combine_layer_info *info);
|
|
|
|
void combine_rgba_and_channel_mask_pixels (apply_combine_layer_info *info);
|
|
|
|
void combine_rgba_and_channel_selection_pixels (apply_combine_layer_info *info);
|
|
|
|
|
|
/* paint "behind" the existing pixel row.
|
|
* This is similar in appearance to painting on a layer below
|
|
* the existing pixels.
|
|
*/
|
|
void behind_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest,
|
|
const guchar *mask,
|
|
gint opacity,
|
|
const gint *affect,
|
|
gint length,
|
|
gint bytes2,
|
|
gint has_alpha2);
|
|
|
|
/* replace the contents of one pixel row with the other
|
|
* The operation is still bounded by mask/opacity constraints
|
|
*/
|
|
void replace_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest,
|
|
const guchar *mask,
|
|
guint length,
|
|
guint opacity,
|
|
gboolean *affect);
|
|
|
|
/* apply source 2 to source 1, but in a non-additive way,
|
|
* multiplying alpha channels (works for intensity)
|
|
*/
|
|
void erase_pixels_rgba (const guchar *src1,
|
|
const guchar *src2,
|
|
guchar *dest,
|
|
const guchar *mask,
|
|
gint opacity,
|
|
const gint *affect,
|
|
gint length);
|
|
|
|
/* extract information from intensity pixels based on
|
|
* a mask.
|
|
*/
|
|
void extract_from_pixels_rgba (guchar *src,
|
|
guchar *dest,
|
|
const guchar *mask,
|
|
const guchar *bg,
|
|
gboolean cut,
|
|
guint length);
|
|
|
|
void run_length_encode_rgba (const guchar *src,
|
|
guint *dest,
|
|
guint w);
|
|
|
|
void apply_layer_mode_rgba_rgb (apply_combine_layer_info *info);
|
|
|
|
void apply_layer_mode_rgba_rgba (apply_combine_layer_info *info);
|
|
|
|
/* Opacities */
|
|
#define TRANSPARENT_OPACITY 0
|
|
#define OPAQUE_OPACITY 255
|
|
|
|
#endif /* __PAINT_FUNCS_RGBA_H__ */
|