2#ifndef SEEN_INKSCAPE_EXTENSION_INTERNAL_FILTER_TEXTURES_H__
3#define SEEN_INKSCAPE_EXTENSION_INTERNAL_FILTER_TEXTURES_H__
63 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI
"\">\n"
64 "<name>" N_(
"Ink Blot")
"</name>\n"
65 "<id>org.inkscape.effect.filter.InkBlot</id>\n"
66 "<param name=\"type\" gui-text=\"" N_(
"Turbulence type:")
"\" type=\"optiongroup\" appearance=\"combo\">\n"
67 "<option value=\"fractalNoise\">Fractal noise</option>\n"
68 "<option value=\"turbulence\">Turbulence</option>\n"
70 "<param name=\"freq\" gui-text=\"" N_(
"Frequency:")
"\" type=\"float\" appearance=\"full\" precision=\"2\" min=\"0.01\" max=\"100.00\">4</param>\n"
71 "<param name=\"complexity\" gui-text=\"" N_(
"Complexity:")
"\" type=\"int\" appearance=\"full\" min=\"1\" max=\"5\">3</param>\n"
72 "<param name=\"variation\" gui-text=\"" N_(
"Variation:")
"\" type=\"int\" appearance=\"full\" min=\"0\" max=\"100\">0</param>\n"
73 "<param name=\"hblur\" gui-text=\"" N_(
"Horizontal inlay:")
"\" type=\"float\" appearance=\"full\" precision=\"2\" min=\"0.01\" max=\"30.00\">10</param>\n"
74 "<param name=\"vblur\" gui-text=\"" N_(
"Vertical inlay:")
"\" type=\"float\" appearance=\"full\" precision=\"2\" min=\"0.01\" max=\"30.00\">10</param>\n"
75 "<param name=\"displacement\" gui-text=\"" N_(
"Displacement:")
"\" type=\"float\" appearance=\"full\" precision=\"2\" min=\"0.\" max=\"100.00\">50</param>\n"
76 "<param name=\"blend\" gui-text=\"" N_(
"Blend:")
"\" type=\"float\" appearance=\"full\" precision=\"2\" min=\"0.01\" max=\"30.00\">5</param>\n"
77 "<param name=\"stroke\" gui-text=\"" N_(
"Stroke:")
"\" type=\"optiongroup\" appearance=\"combo\">\n"
78 "<option value=\"over\">" N_(
"Wide")
"</option>\n"
79 "<option value=\"atop\">" N_(
"Normal")
"</option>\n"
80 "<option value=\"in\">" N_(
"Narrow")
"</option>\n"
81 "<option value=\"xor\">" N_(
"Overlapping")
"</option>\n"
82 "<option value=\"out\">" N_(
"External")
"</option>\n"
83 "<option value=\"arithmetic\">" N_(
"Custom")
"</option>\n"
85 "<label appearance=\"header\">" N_(
"Custom stroke options")
"</label>\n"
86 "<param name=\"k1\" gui-text=\"" N_(
"k1:")
"\" type=\"float\" indent=\"1\" appearance=\"full\" precision=\"2\" min=\"-10.\" max=\"10.\">1.5</param>\n"
87 "<param name=\"k2\" gui-text=\"" N_(
"k2:")
"\" type=\"float\" indent=\"1\" appearance=\"full\" precision=\"2\" min=\"-10.\" max=\"10.\">-0.25</param>\n"
88 "<param name=\"k3\" gui-text=\"" N_(
"k3:")
"\" type=\"float\" indent=\"1\" appearance=\"full\" precision=\"2\" min=\"-10.\" max=\"10.\">0.5</param>\n"
90 "<object-type>all</object-type>\n"
92 "<submenu name=\"" N_(
"Filters")
"\">\n"
93 "<submenu name=\"Textures\"/>\n"
96 "<menu-tip>" N_(
"Inkblot on tissue or rough paper")
"</menu-tip>\n"
98 "</inkscape-extension>\n", std::make_unique<InkBlot>());
109 std::ostringstream type;
110 std::ostringstream freq;
111 std::ostringstream complexity;
112 std::ostringstream variation;
113 std::ostringstream hblur;
114 std::ostringstream vblur;
115 std::ostringstream displacement;
116 std::ostringstream blend;
117 std::ostringstream
stroke;
118 std::ostringstream
custom;
130 if (g_ascii_strcasecmp(
"arithmetic", ope) == 0) {
140 "<filter xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" style=\"color-interpolation-filters:sRGB;\" x=\"-0.15\" width=\"1.3\" y=\"-0.15\" height=\"1.3\" inkscape:label=\"Ink Blot\" >\n"
141 "<feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"%s %s\" result=\"blur1\" />\n"
142 "<feTurbulence type=\"%s\" baseFrequency=\"%s\" numOctaves=\"%s\" seed=\"%s\" result=\"turbulence\" />\n"
143 "<feDisplacementMap in=\"blur1\" in2=\"turbulence\" xChannelSelector=\"R\" yChannelSelector=\"G\" scale=\"%s\" result=\"map\" />\n"
144 "<feGaussianBlur in=\"map\" stdDeviation=\"%s\" result=\"blur2\" />\n"
145 "<feComposite in=\"blur2\" in2=\"map\" %s operator=\"%s\" result=\"composite\" />\n"
146 "</filter>\n", hblur.str().c_str(), vblur.str().c_str(), type.str().c_str(),
147 freq.str().c_str(), complexity.str().c_str(), variation.str().c_str(),
148 displacement.str().c_str(), blend.str().c_str(),
The object that is the basis for the Extension system.
char const * get_param_optiongroup(char const *name, char const *alt) const
Like get_param_optiongroup but with a default on param_not_exist error.
int get_param_int(char const *name) const
Gets a parameter identified by name with the integer placed in value.
double get_param_float(char const *name) const
Gets a float parameter identified by name with the double placed in value.
virtual unsigned stroke(Inkscape::Extension::Print *, Geom::PathVector const &, Geom::Affine const &, SPStyle const *, Geom::OptRect const &, Geom::OptRect const &, Geom::OptRect const &)
Custom predefined Ink Blot filter.
gchar const * get_filter_text(Inkscape::Extension::Extension *ext) override
A way to clear the N_ macro, which is defined as an inline function.
Inkscape::Extension::Extension: Frontend to certain, possibly pluggable, actions.
void build_from_mem(gchar const *buffer, std::unique_ptr< Implementation::Implementation > in_imp)
Create a module from a buffer holding an XML description.
Helper class to stream background task notifications as a series of messages.