Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
nr-filter-turbulence.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SEEN_NR_FILTER_TURBULENCE_H
3#define SEEN_NR_FILTER_TURBULENCE_H
4
5/*
6 * feTurbulence filter primitive renderer
7 *
8 * Authors:
9 * World Wide Web Consortium <http://www.w3.org/>
10 * Felipe Corrêa da Silva Sanches <juca@members.fsf.org>
11 * Niko Kiirala <niko@kiirala.com>
12 *
13 * This file has a considerable amount of code adapted from
14 * the W3C SVG filter specs, available at:
15 * http://www.w3.org/TR/SVG11/filters.html#feTurbulence
16 *
17 * W3C original code is licensed under the terms of
18 * the (GPL compatible) W3C® SOFTWARE NOTICE AND LICENSE:
19 * http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
20 *
21 * Copyright (C) 2007 authors
22 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
23 */
24
25#include <memory>
26#include <2geom/point.h>
27
31
32namespace Inkscape {
33namespace Filters {
34
41
42class TurbulenceGenerator;
43
45{
46public:
49
50 void render_cairo(FilterSlot &slot) const override;
51 double complexity(Geom::Affine const &ctm) const override;
52 bool uses_background() const override { return false; }
53
54 void set_baseFrequency(int axis, double freq);
55 void set_numOctaves(int num);
56 void set_seed(double s);
57 void set_stitchTiles(bool st);
59 void set_updated(bool u);
60
61 Glib::ustring name() const override { return Glib::ustring("Turbulence"); }
62
63private:
64 std::unique_ptr<TurbulenceGenerator> gen;
65
66 void turbulenceInit(long seed);
67
70 double seed;
73 bool updated;
74
75 double fTileWidth;
77
78 double fTileX;
79 double fTileY;
80};
81
82} // namespace Filters
83} // namespace Inkscape
84
85#endif // SEEN_NR_FILTER_TURBULENCE_H
86/*
87 Local Variables:
88 mode:c++
89 c-file-style:"stroustrup"
90 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
91 indent-tabs-mode:nil
92 fill-column:99
93 End:
94*/
95// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
Cartesian point / 2D vector and related operations.
3x3 matrix representing an affine transformation.
Definition affine.h:70
Glib::ustring name() const override
void set_baseFrequency(int axis, double freq)
void render_cairo(FilterSlot &slot) const override
double complexity(Geom::Affine const &ctm) const override
std::unique_ptr< TurbulenceGenerator > gen
Helper class to stream background task notifications as a series of messages.
int num
Definition scribble.cpp:47