summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFelipe Corr??a da Silva Sanches <juca@members.fsf.org>2008-05-31 18:25:47 +0000
committerJucaBlues <JucaBlues@users.sourceforge.net>2008-05-31 18:25:47 +0000
commit458eb6419750669ffc4e239ebff54b9a96471b28 (patch)
treef5f26e41872a14b5f369f982fe31a3219f2a8bd1 /src
parentFix an error and remove some useless code (thanks to Peter Moulder for pointi... (diff)
downloadinkscape-458eb6419750669ffc4e239ebff54b9a96471b28.tar.gz
inkscape-458eb6419750669ffc4e239ebff54b9a96471b28.zip
2 new filters sent by Chrisdesign
(http://chrisdesign.wordpress.com/filter-effects/) (bzr r5775)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/filter/CMakeLists.txt2
-rw-r--r--src/extension/internal/filter/emboss.h47
-rw-r--r--src/extension/internal/filter/filter-all.cpp4
-rw-r--r--src/extension/internal/filter/melt.h46
4 files changed, 99 insertions, 0 deletions
diff --git a/src/extension/internal/filter/CMakeLists.txt b/src/extension/internal/filter/CMakeLists.txt
index f619dd5c7..ec76a902e 100644
--- a/src/extension/internal/filter/CMakeLists.txt
+++ b/src/extension/internal/filter/CMakeLists.txt
@@ -5,6 +5,7 @@ clouds.h
crystal.h
cutout.h
drop-shadow.h
+emboss.h
etched-glass.h
filter-all.cpp
filter.cpp
@@ -16,6 +17,7 @@ ink-bleed.h
jelly-bean.h
jigsaw-piece.h
leopard-fur.h
+melt.h
metal.h
motion-blur.h
oil-slick.h
diff --git a/src/extension/internal/filter/emboss.h b/src/extension/internal/filter/emboss.h
new file mode 100644
index 000000000..ec4722449
--- /dev/null
+++ b/src/extension/internal/filter/emboss.h
@@ -0,0 +1,47 @@
+#ifndef __INKSCAPE_EXTENSION_INTERNAL_FILTER_EMBOSS_H__
+#define __INKSCAPE_EXTENSION_INTERNAL_FILTER_EMBOSS_H__
+/*
+ * Copyright (C) 2008 Authors:
+ * Ted Gould <ted@gould.cx>
+ * Filter designed by Chrisdesign (http://chrisdesign.wordpress.com/filter-effects/)
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+#include "filter.h"
+
+namespace Inkscape {
+namespace Extension {
+namespace Internal {
+namespace Filter {
+
+class Emboss : public Inkscape::Extension::Internal::Filter::Filter {
+public:
+ static void init (void) {
+ filter_init("emboss", /* ID -- should be unique */
+ N_("Emboss"), /* Name in the menus, should have a N_() around it for translation */
+ N_("Emboss effect"),
+ /* Menu tooltip to help users understand the name. Should also have a N_() */
+ "<filter>\n"
+ "<feGaussianBlur result=\"result0\" in=\"SourceAlpha\" stdDeviation=\"1.01\" />\n"
+ "<feOffset stdDeviation=\"0.40000000000000002\" result=\"result3\" in=\"result0\" dy=\"2\" dx=\"2\" />\n"
+ "<feSpecularLighting specularExponent=\"35\" specularConstant=\"1.05\" surfaceScale=\"0.75\" lighting-color=\"rgb(217,217,217)\" result=\"result1\" in=\"result0\">\n"
+ "<fePointLight z=\"20000\" y=\"-10000\" x=\"-5000\" />\n"
+ "</feSpecularLighting>\n"
+ "<feComposite operator=\"in\" result=\"result2\" in=\"result1\" in2=\"SourceAlpha\" />\n"
+ "<feComposite k3=\"0.99999999999999989\" k2=\"0.99999999999999989\" operator=\"arithmetic\" result=\"result4\" in=\"SourceGraphic\" />\n"
+ "<feMerge><feMergeNode in=\"result3\" />\n"
+ "<feMergeNode in=\"result4\" />\n"
+ "</feMerge>\n"
+ "</filter>\n");
+ /* The XML of the filter that should be added. There
+ * should be a <svg:filter> surrounding what you'd like
+ * to be added with this effect. */
+ };
+};
+
+}; /* namespace Filter */
+}; /* namespace Internal */
+}; /* namespace Extension */
+}; /* namespace Inkscape */
+
+#endif /* __INKSCAPE_EXTENSION_INTERNAL_FILTER_EMBOSS_H__ */
diff --git a/src/extension/internal/filter/filter-all.cpp b/src/extension/internal/filter/filter-all.cpp
index 08bef9f74..6f0208a0b 100644
--- a/src/extension/internal/filter/filter-all.cpp
+++ b/src/extension/internal/filter/filter-all.cpp
@@ -14,6 +14,7 @@
#include "crystal.h"
#include "cutout.h"
#include "drop-shadow.h"
+#include "emboss.h"
#include "etched-glass.h"
#include "fire.h"
#include "frost.h"
@@ -21,6 +22,7 @@
#include "jelly-bean.h"
#include "jigsaw-piece.h"
#include "leopard-fur.h"
+#include "melt.h"
#include "metal.h"
#include "motion-blur.h"
#include "oil-slick.h"
@@ -50,6 +52,7 @@ Filter::filters_all (void )
Crystal::init();
Cutout::init();
DropShadow::init();
+ Emboss::init();
EtchedGlass::init();
Fire::init();
Frost::init();
@@ -57,6 +60,7 @@ Filter::filters_all (void )
JellyBean::init();
JigsawPiece::init();
LeopardFur::init();
+ Melt::init();
Metal::init();
MotionBlur::init();
OilSlick::init();
diff --git a/src/extension/internal/filter/melt.h b/src/extension/internal/filter/melt.h
new file mode 100644
index 000000000..d6372c13f
--- /dev/null
+++ b/src/extension/internal/filter/melt.h
@@ -0,0 +1,46 @@
+#ifndef __INKSCAPE_EXTENSION_INTERNAL_FILTER_MELT_H__
+#define __INKSCAPE_EXTENSION_INTERNAL_FILTER_MELT_H__
+/*
+ * Copyright (C) 2008 Authors:
+ * Ted Gould <ted@gould.cx>
+ * Filter designed by Chrisdesign (http://chrisdesign.wordpress.com/filter-effects/)
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include "filter.h"
+
+namespace Inkscape {
+namespace Extension {
+namespace Internal {
+namespace Filter {
+
+class Melt : public Inkscape::Extension::Internal::Filter::Filter {
+public:
+ static void init (void) {
+ filter_init("melt", /* ID -- should be unique */
+ N_("Melt"), /* Name in the menus, should have a N_() around it for translation */
+ N_("Melt effect"),
+ /* Menu tooltip to help users understand the name. Should also have a N_() */
+ "<filter>\n"
+ "<feGaussianBlur stdDeviation=\"10\" in=\"SourceGraphic\" result=\"result0\" />\n"
+ "<feTurbulence result=\"result1\" numOctaves=\"8\" seed=\"488\" baseFrequency=\"0.012000000000000004\" />\n"
+ "<feComposite in=\"result0\" in2=\"result1\" operator=\"in\" result=\"result2\" />\n"
+ "<feSpecularLighting in=\"result2\" specularExponent=\"100.40000000000001\" specularConstant=\"3.9400000000000004\" result=\"result4\">\n"
+ "<feDistantLight azimuth=\"225\" elevation=\"62\" />\n"
+ "</feSpecularLighting>\n"
+ "<feComposite operator=\"atop\" in=\"result4\" in2=\"result2\" />\n"
+ "<feConvolveMatrix order=\"5 5\" kernelMatrix=\"0 0 0 0 0 0 0 -1 0 0 0 -1 5 -1 0 0 0 -1 0 0 0 0 0 0 1\" />\n"
+ "</filter>\n");
+ /* The XML of the filter that should be added. There
+ * should be a <svg:filter> surrounding what you'd like
+ * to be added with this effect. */
+ };
+};
+
+}; /* namespace Filter */
+}; /* namespace Internal */
+}; /* namespace Extension */
+}; /* namespace Inkscape */
+
+#endif /* __INKSCAPE_EXTENSION_INTERNAL_FILTER_MELT_H__ */