Inkscape
Vector Graphics Editor
|
Cairo software blending templates. More...
Go to the source code of this file.
Classes | |
struct | surface_accessor< T > |
struct | SurfaceSynth |
Functions | |
template<typename AccOut , typename Acc1 , typename Acc2 , typename Blend > | |
void | ink_cairo_surface_blend_internal (cairo_surface_t *out, cairo_surface_t *in1, cairo_surface_t *in2, int w, int h, Blend &blend) |
template<typename AccOut , typename AccIn , typename Filter > | |
void | ink_cairo_surface_filter_internal (cairo_surface_t *out, cairo_surface_t *in, int w, int h, Filter &filter) |
template<typename AccOut , typename Synth > | |
void | ink_cairo_surface_synthesize_internal (cairo_surface_t *out, int x0, int y0, int x1, int y1, Synth &synth) |
template<typename Blend > | |
void | ink_cairo_surface_blend (cairo_surface_t *in1, cairo_surface_t *in2, cairo_surface_t *out, Blend &&blend) |
Blend two surfaces using the supplied functor. | |
template<typename Filter > | |
void | ink_cairo_surface_filter (cairo_surface_t *in, cairo_surface_t *out, Filter &&filter) |
template<typename Synth > | |
void | ink_cairo_surface_synthesize (cairo_surface_t *out, cairo_rectangle_t const &out_area, Synth &&synth) |
Synthesize surface pixels based on their position. | |
template<typename Synth > | |
void | ink_cairo_surface_synthesize (cairo_surface_t *out, Synth synth) |
G_GNUC_CONST gint32 | pxclamp (gint32 v, gint32 low, gint32 high) |
Variables | |
static const int | POOL_THRESHOLD = 2048 |
Cairo software blending templates.
Definition in file cairo-templates.h.
void ink_cairo_surface_blend | ( | cairo_surface_t * | in1, |
cairo_surface_t * | in2, | ||
cairo_surface_t * | out, | ||
Blend && | blend | ||
) |
Blend two surfaces using the supplied functor.
This template blends two Cairo image surfaces using a blending functor that takes two 32-bit ARGB pixel values and returns a modified 32-bit pixel value. Differences in input surface formats are handled transparently. In future, this template will also handle software fallback for GL surfaces.
Definition at line 122 of file cairo-templates.h.
References w.
Referenced by Inkscape::Filters::FilterComposite::render_cairo().
void ink_cairo_surface_blend_internal | ( | cairo_surface_t * | out, |
cairo_surface_t * | in1, | ||
cairo_surface_t * | in2, | ||
int | w, | ||
int | h, | ||
Blend & | blend | ||
) |
Definition at line 61 of file cairo-templates.h.
References surface_accessor< T >::get(), POOL_THRESHOLD, surface_accessor< T >::set(), and w.
void ink_cairo_surface_filter | ( | cairo_surface_t * | in, |
cairo_surface_t * | out, | ||
Filter && | filter | ||
) |
Definition at line 152 of file cairo-templates.h.
References w.
Referenced by Inkscape::DrawingImage::_renderItem(), ink_cairo_surface_linear_to_srgb(), ink_cairo_surface_srgb_to_linear(), Inkscape::DrawingItem::render(), Inkscape::Filters::FilterColorMatrix::render_cairo(), and Inkscape::Filters::FilterComponentTransfer::render_cairo().
void ink_cairo_surface_filter_internal | ( | cairo_surface_t * | out, |
cairo_surface_t * | in, | ||
int | w, | ||
int | h, | ||
Filter & | filter | ||
) |
Definition at line 79 of file cairo-templates.h.
References surface_accessor< T >::get(), POOL_THRESHOLD, surface_accessor< T >::set(), and w.
void ink_cairo_surface_synthesize | ( | cairo_surface_t * | out, |
cairo_rectangle_t const & | out_area, | ||
Synth && | synth | ||
) |
Synthesize surface pixels based on their position.
This template accepts a functor that gets called with the x and y coordinates of the pixels, given as integers.
out | Output surface |
out_area | The region of the output surface that should be synthesized |
synth | Synthesis functor |
Definition at line 190 of file cairo-templates.h.
Referenced by ink_cairo_surface_synthesize(), Inkscape::Filters::FilterConvolveMatrix::render_cairo(), Inkscape::Filters::FilterDiffuseLighting::render_cairo(), Inkscape::Filters::FilterDisplacementMap::render_cairo(), Inkscape::Filters::FilterSpecularLighting::render_cairo(), and Inkscape::Filters::FilterTurbulence::render_cairo().
void ink_cairo_surface_synthesize | ( | cairo_surface_t * | out, |
Synth | synth | ||
) |
Definition at line 210 of file cairo-templates.h.
References ink_cairo_surface_synthesize(), and w.
void ink_cairo_surface_synthesize_internal | ( | cairo_surface_t * | out, |
int | x0, | ||
int | y0, | ||
int | x1, | ||
int | y1, | ||
Synth & | synth | ||
) |
Definition at line 96 of file cairo-templates.h.
References limit, POOL_THRESHOLD, and surface_accessor< T >::set().
Definition at line 466 of file cairo-templates.h.
Referenced by Inkscape::Filters::FilterColorMatrix::ColorMatrixMatrix::operator()().
|
static |
Definition at line 19 of file cairo-templates.h.
Referenced by ink_cairo_surface_blend_internal(), ink_cairo_surface_filter_internal(), and ink_cairo_surface_synthesize_internal().