/*
5 *
"This filter composites two objects together using commonly used
6 * imaging software blending modes. It performs a pixel-wise combination
7 * of two input images."
11 * Niko Kiirala <niko@kiirala.com>
12 * Jasper van de Gronde <th.v.d.gronde@hccnet.nl>
13 * Krzysztof KosiĆski <tweenk.pl@gmail.com>
15 * Copyright (C) 2007-2008 authors
17 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
54 switch (_blend_mode) {
56 return CAIRO_OPERATOR_MULTIPLY;
58 return CAIRO_OPERATOR_SCREEN;
60 return CAIRO_OPERATOR_DARKEN;
62 return CAIRO_OPERATOR_LIGHTEN;
65 return CAIRO_OPERATOR_OVERLAY;
67 return CAIRO_OPERATOR_COLOR_DODGE;
69 return CAIRO_OPERATOR_COLOR_BURN;
71 return CAIRO_OPERATOR_HARD_LIGHT;
73 return CAIRO_OPERATOR_SOFT_LIGHT;
75 return CAIRO_OPERATOR_DIFFERENCE;
77 return CAIRO_OPERATOR_EXCLUSION;
79 return CAIRO_OPERATOR_HSL_HUE;
81 return CAIRO_OPERATOR_HSL_SATURATION;
83 return CAIRO_OPERATOR_HSL_COLOR;
85 return CAIRO_OPERATOR_HSL_LUMINOSITY;
89 return CAIRO_OPERATOR_OVER;
110 cairo_t *out_ct = cairo_create(out);
111 cairo_set_source_surface(out_ct, input1, 0, 0);
119 cairo_destroy(out_ct);
122 cairo_surface_destroy(out);
149 if (input == 0)
_input = slot;
150 if (input == 1)
_input2 = slot;
Cairo software blending templates.
void ink_cairo_surface_blit(cairo_surface_t *src, cairo_surface_t *dest)
cairo_surface_t * ink_cairo_surface_create_output(cairo_surface_t *image, cairo_surface_t *bg)
void set_cairo_surface_ci(cairo_surface_t *surface, SPColorInterpolation ci)
Set the color_interpolation_value for a Cairo surface.
Cairo integration helpers.
3x3 matrix representing an affine transformation.
void set_mode(SPBlendMode mode)
double complexity(Geom::Affine const &ctm) const override
bool uses_background() const override
void set_input(int slot) override
Sets the input slot number 'slot' to be used as input in rendering filter primitive 'primitive' For f...
bool can_handle_affine(Geom::Affine const &) const override
Indicate whether the filter primitive can handle the given affine.
static const std::set< SPBlendMode > _valid_modes
void render_cairo(FilterSlot &slot) const override
SPColorInterpolation color_interpolation
cairo_surface_t * getcairo(int slot)
Returns the pixblock in specified slot.
void set(int slot, cairo_surface_t *s)
Sets or re-sets the pixblock associated with given slot.
struct _cairo_surface cairo_surface_t
@ NR_FILTER_BACKGROUNDALPHA
@ NR_FILTER_BACKGROUNDIMAGE
static cairo_operator_t get_cairo_op(SPBlendMode _blend_mode)
Helper class to stream background task notifications as a series of messages.
TODO: insert short description here.
@ SP_CSS_BLEND_LUMINOSITY
@ SP_CSS_BLEND_DIFFERENCE
@ SP_CSS_BLEND_COLORDODGE
@ SP_CSS_BLEND_SATURATION