diff --git a/.gitignore b/.gitignore
index 3ea645b5..64320d12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,154 +1,160 @@
-/nbproject/private/
-/lib.netutil/build/
-/lib.tinkerforge/build/
-/build/
-/lib.miglayout/build/
-/praxis.core/build/
-/praxis.audio.loader/build/
-/praxis.laf/build/
-/praxis.nb.lookup/build/
-/praxis.meta/build/
-/praxis.settings/build/
-/praxis.swing/build/
-/praxis.util/build/
-/praxis.impl/build/
-/praxis.tinkerforge/build/
-/praxis.hub/build/
-/praxis.osc/build/
-/praxis.script/build/
-/praxis.gui/build/
-/praxis.components/build/
-/praxis.midi/build/
-/praxis.video/build/
-/praxis.video.render/build/
-/praxis.video.pipes/build/
-/praxis.video.software/build/
-/lib.janino/build/
-/praxis.java/build/
-/praxis.video.java/build/
-/lib.rsyntaxtextarea/build/
-/praxis.texteditor/build/
-/audio.ops/build/
-/praxis.terminal/build/
-/praxis.player/build/
-/audio.ops.impl/build/
-/lib.lwjgl/build/
-/audio.ops.gpl/build/
-/audio.pipes/build/
-/audio.servers/build/
-/audio.servers.javasound/build/
-/praxis.video.opengl/build/
-/lib.jna/build/
-/audio.servers.jack/build/
-/praxis.audio/build/
-/audio.jnajack/build/
-/lib.gstreamer-java/build/
-/praxis.video.gstreamer/build/
-/praxis.video.gstreamer-osx/build/
-/praxis.video.gstreamer-win/build/
-/praxis.laf/nbproject/private/
-/praxis.hub/nbproject/private/
-/lib.tinkerforge/nbproject/private/
-/praxis.video/nbproject/private/
-/praxis.midi/nbproject/private/
-/audio.servers.javasound/nbproject/private/
-/lib.rsyntaxtextarea/nbproject/private/
-/praxis.gui/nbproject/private/
-/praxis.audio/nbproject/private/
-/praxis.video.pipes/nbproject/private/
-/praxis.video.render/nbproject/private/
-/praxis.java/nbproject/private/
-/lib.janino/nbproject/private/
-/praxis.util/nbproject/private/
-/praxis.video.opengl/nbproject/private/
-/praxis.impl/nbproject/private/
-/audio.pipes/nbproject/private/
-/lib.lwjgl/nbproject/private/
-/audio.servers.jack/nbproject/private/
-/praxis.audio.loader/nbproject/private/
-/praxis.osc/nbproject/private/
-/audio.ops.gpl/nbproject/private/
-/lib.gstreamer-java/nbproject/private/
-/audio.jnajack/nbproject/private/
-/praxis.player/nbproject/private/
-/praxis.video.gstreamer/nbproject/private/
-/praxis.video.java/nbproject/private/
-/audio.ops/nbproject/private/
-/praxis.script/nbproject/private/
-/praxis.video.gstreamer-win/nbproject/private/
-/praxis.video.software/nbproject/private/
-/lib.miglayout/nbproject/private/
-/praxis.texteditor/nbproject/private/
-/lib.jna/nbproject/private/
-/audio.ops.impl/nbproject/private/
-/praxis.tinkerforge/nbproject/private/
-/lib.netutil/nbproject/private/
-/praxis.settings/nbproject/private/
-/praxis.components/nbproject/private/
-/praxis.nb.lookup/nbproject/private/
-/praxis.terminal/nbproject/private/
-/audio.servers/nbproject/private/
-/praxis.core/nbproject/private/
-/praxis.swing/nbproject/private/
-/praxis.meta/nbproject/private/
-/praxis.video.gstreamer-osx/nbproject/private/
-/lib.commons-compiler/build/
-/lib.compiler.pjc/build/
-/lib.compiler/build/
-/lib.commons-compiler/nbproject/private/
-/lib.compiler/nbproject/private/
-/lib.compiler.pjc/nbproject/private/
-/praxis.nb.classpath/build/
-/praxis.nb.classpath/nbproject/private/
-/praxis.compiler/nbproject/private/
-/lib.janino.commons/build/
-/praxis.compiler.javac/build/
-/praxis.compiler/build/
-/praxis.compiler.javac/nbproject/private/
-/lib.janino.commons/nbproject/private/
-/praxis.logging/nbproject/private/
-/praxis.logging/build/
-/lib.jogl/build/
-/lib.processing/build/
-/lib.jogl/nbproject/private/
-/lib.processing/nbproject/private/
-/praxis.video.pgl/nbproject/private/
-/praxis.video.pgl/build/
-/dist/
-/praxis.code/build/
-/praxis.code/nbproject/private/
-/praxis.video.code/build/
-/praxis.video.code/nbproject/private/
-/praxis.video.pgl.custom/build/
-/praxis.video.pgl.code/build/
-/praxis.video.pgl.code/nbproject/private/
-/praxis.hub.net/build/
-/praxis.hub.net/nbproject/private/
-/praxis.core.components/build/
-/praxis.core.components/nbproject/private/
-/praxis.core.factory/build/
-/praxis.video.factory/build/
-/praxis.core.factory/nbproject/private/
-/praxis.video.factory/nbproject/private/
-/praxis.video.gstreamer-osx/release/modules/lib/macosx64/
-/praxis.video.gstreamer-win/release/modules/lib/windows32/
-/praxis.video.gstreamer-win/release/modules/lib/windows64/
-/praxis.core.code/build/
-/praxis.core.code/nbproject/private/
-/praxis.audio.code/build/
-/praxis.audio.factory/build/
-/praxis.audio.factory/nbproject/private/
-/praxis.tracker/build/
-/praxis.audio.code/nbproject/private/
-/praxis.tracker/nbproject/private/
-/praxis.video.gst1/build/
-/lib.gst1-java-core/build/
-/lib.gst1-java-core/nbproject/private/
-/praxis.video.gst1/nbproject/private/
-/praxis.code.services/build/
-/praxis.code.services/nbproject/private/
-/lib.darcula/build/
-/lib.nanohttpd/build/
-/praxis.data/build/
-/praxis.data/nbproject/private/
-/lib.jna.platform/build/
\ No newline at end of file
+/nbproject/private/
+/lib.netutil/build/
+/lib.tinkerforge/build/
+/build/
+/lib.miglayout/build/
+/praxis.core/build/
+/praxis.audio.loader/build/
+/praxis.laf/build/
+/praxis.nb.lookup/build/
+/praxis.meta/build/
+/praxis.settings/build/
+/praxis.swing/build/
+/praxis.util/build/
+/praxis.impl/build/
+/praxis.tinkerforge/build/
+/praxis.hub/build/
+/praxis.osc/build/
+/praxis.script/build/
+/praxis.gui/build/
+/praxis.components/build/
+/praxis.midi/build/
+/praxis.video/build/
+/praxis.video.render/build/
+/praxis.video.pipes/build/
+/praxis.video.software/build/
+/lib.janino/build/
+/praxis.java/build/
+/praxis.video.java/build/
+/lib.rsyntaxtextarea/build/
+/praxis.texteditor/build/
+/audio.ops/build/
+/praxis.terminal/build/
+/praxis.player/build/
+/audio.ops.impl/build/
+/lib.lwjgl/build/
+/audio.ops.gpl/build/
+/audio.pipes/build/
+/audio.servers/build/
+/audio.servers.javasound/build/
+/praxis.video.opengl/build/
+/lib.jna/build/
+/audio.servers.jack/build/
+/praxis.audio/build/
+/audio.jnajack/build/
+/lib.gstreamer-java/build/
+/praxis.video.gstreamer/build/
+/praxis.video.gstreamer-osx/build/
+/praxis.video.gstreamer-win/build/
+/praxis.laf/nbproject/private/
+/praxis.hub/nbproject/private/
+/lib.tinkerforge/nbproject/private/
+/praxis.video/nbproject/private/
+/praxis.midi/nbproject/private/
+/audio.servers.javasound/nbproject/private/
+/lib.rsyntaxtextarea/nbproject/private/
+/praxis.gui/nbproject/private/
+/praxis.audio/nbproject/private/
+/praxis.video.pipes/nbproject/private/
+/praxis.video.render/nbproject/private/
+/praxis.java/nbproject/private/
+/lib.janino/nbproject/private/
+/praxis.util/nbproject/private/
+/praxis.video.opengl/nbproject/private/
+/praxis.impl/nbproject/private/
+/audio.pipes/nbproject/private/
+/lib.lwjgl/nbproject/private/
+/audio.servers.jack/nbproject/private/
+/praxis.audio.loader/nbproject/private/
+/praxis.osc/nbproject/private/
+/audio.ops.gpl/nbproject/private/
+/lib.gstreamer-java/nbproject/private/
+/audio.jnajack/nbproject/private/
+/praxis.player/nbproject/private/
+/praxis.video.gstreamer/nbproject/private/
+/praxis.video.java/nbproject/private/
+/audio.ops/nbproject/private/
+/praxis.script/nbproject/private/
+/praxis.video.gstreamer-win/nbproject/private/
+/praxis.video.software/nbproject/private/
+/lib.miglayout/nbproject/private/
+/praxis.texteditor/nbproject/private/
+/lib.jna/nbproject/private/
+/audio.ops.impl/nbproject/private/
+/praxis.tinkerforge/nbproject/private/
+/lib.netutil/nbproject/private/
+/praxis.settings/nbproject/private/
+/praxis.components/nbproject/private/
+/praxis.nb.lookup/nbproject/private/
+/praxis.terminal/nbproject/private/
+/audio.servers/nbproject/private/
+/praxis.core/nbproject/private/
+/praxis.swing/nbproject/private/
+/praxis.meta/nbproject/private/
+/praxis.video.gstreamer-osx/nbproject/private/
+/lib.commons-compiler/build/
+/lib.compiler.pjc/build/
+/lib.compiler/build/
+/lib.commons-compiler/nbproject/private/
+/lib.compiler/nbproject/private/
+/lib.compiler.pjc/nbproject/private/
+/praxis.nb.classpath/build/
+/praxis.nb.classpath/nbproject/private/
+/praxis.compiler/nbproject/private/
+/lib.janino.commons/build/
+/praxis.compiler.javac/build/
+/praxis.compiler/build/
+/praxis.compiler.javac/nbproject/private/
+/lib.janino.commons/nbproject/private/
+/praxis.logging/nbproject/private/
+/praxis.logging/build/
+/lib.jogl/build/
+/lib.processing/build/
+/lib.jogl/nbproject/private/
+/lib.processing/nbproject/private/
+/praxis.video.pgl/nbproject/private/
+/praxis.video.pgl/build/
+/dist/
+/praxis.code/build/
+/praxis.code/nbproject/private/
+/praxis.video.code/build/
+/praxis.video.code/nbproject/private/
+/praxis.video.pgl.custom/build/
+/praxis.video.pgl.code/build/
+/praxis.video.pgl.code/nbproject/private/
+/praxis.hub.net/build/
+/praxis.hub.net/nbproject/private/
+/praxis.core.components/build/
+/praxis.core.components/nbproject/private/
+/praxis.core.factory/build/
+/praxis.video.factory/build/
+/praxis.core.factory/nbproject/private/
+/praxis.video.factory/nbproject/private/
+/praxis.video.gstreamer-osx/release/modules/lib/macosx64/
+/praxis.video.gstreamer-win/release/modules/lib/windows32/
+/praxis.video.gstreamer-win/release/modules/lib/windows64/
+/praxis.core.code/build/
+/praxis.core.code/nbproject/private/
+/praxis.audio.code/build/
+/praxis.audio.factory/build/
+/praxis.audio.factory/nbproject/private/
+/praxis.tracker/build/
+/praxis.audio.code/nbproject/private/
+/praxis.tracker/nbproject/private/
+/praxis.video.gst1/build/
+/lib.gst1-java-core/build/
+/lib.gst1-java-core/nbproject/private/
+/praxis.video.gst1/nbproject/private/
+/praxis.code.services/build/
+/praxis.code.services/nbproject/private/
+/lib.darcula/build/
+/lib.nanohttpd/build/
+/praxis.data/build/
+/praxis.data/nbproject/private/
+/lib.jna.platform/build/
+/lib.syphon/build/
+/praxis.video.pgl.syphon/build/
+/praxis.video.pgl.syphon/nbproject/private/
+/praxis.video.pgl.spout/build/
+/lib.spout/build/
+/praxis.video.pgl.spout/nbproject/private/
\ No newline at end of file
diff --git a/lib.gst1-java-core/manifest.mf b/lib.gst1-java-core/manifest.mf
index 88056424..3dce1fc9 100644
--- a/lib.gst1-java-core/manifest.mf
+++ b/lib.gst1-java-core/manifest.mf
@@ -2,5 +2,5 @@ Manifest-Version: 1.0
AutoUpdate-Show-In-Client: true
OpenIDE-Module: org.freedesktop.gstreamer
OpenIDE-Module-Localizing-Bundle: org/freedesktop/gstreamer/Bundle.properties
-OpenIDE-Module-Specification-Version: 0.9.160303
+OpenIDE-Module-Specification-Version: 0.9.161201
diff --git a/lib.gst1-java-core/nbproject/genfiles.properties b/lib.gst1-java-core/nbproject/genfiles.properties
index e6120fbf..896f7feb 100644
--- a/lib.gst1-java-core/nbproject/genfiles.properties
+++ b/lib.gst1-java-core/nbproject/genfiles.properties
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=47d0585a
+build.xml.data.CRC32=901b2e09
build.xml.script.CRC32=71534ec1
-build.xml.stylesheet.CRC32=a56c6a5b@2.67.1
+build.xml.stylesheet.CRC32=a56c6a5b@2.71.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=47d0585a
+nbproject/build-impl.xml.data.CRC32=901b2e09
nbproject/build-impl.xml.script.CRC32=0556a71e
-nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.71.1
diff --git a/lib.gst1-java-core/nbproject/project.properties b/lib.gst1-java-core/nbproject/project.properties
index 47c097ba..42826920 100644
--- a/lib.gst1-java-core/nbproject/project.properties
+++ b/lib.gst1-java-core/nbproject/project.properties
@@ -1,4 +1,4 @@
-file.reference.gst1-java-core-0.9-160303.jar=release/modules/ext/gst1-java-core-0.9-160303.jar
+file.reference.gst1-java-core-0.9-161201.jar=release/modules/ext/gst1-java-core-0.9-161201.jar
is.autoload=true
javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.8
diff --git a/lib.gst1-java-core/nbproject/project.xml b/lib.gst1-java-core/nbproject/project.xml
index 4f828767..9f7b1ad0 100644
--- a/lib.gst1-java-core/nbproject/project.xml
+++ b/lib.gst1-java-core/nbproject/project.xml
@@ -29,8 +29,8 @@
org.freedesktop.gstreamer.query
- ext/gst1-java-core-0.9-160303.jar
- release/modules/ext/gst1-java-core-0.9-160303.jar
+ ext/gst1-java-core-0.9-161201.jar
+ release/modules/ext/gst1-java-core-0.9-161201.jar
diff --git a/lib.gst1-java-core/release/modules/ext/gst1-java-core-0.9-160303.jar b/lib.gst1-java-core/release/modules/ext/gst1-java-core-0.9-160303.jar
deleted file mode 100644
index d0e6dc5e..00000000
Binary files a/lib.gst1-java-core/release/modules/ext/gst1-java-core-0.9-160303.jar and /dev/null differ
diff --git a/lib.gst1-java-core/release/modules/ext/gst1-java-core-0.9-161201.jar b/lib.gst1-java-core/release/modules/ext/gst1-java-core-0.9-161201.jar
new file mode 100644
index 00000000..7c1d772a
Binary files /dev/null and b/lib.gst1-java-core/release/modules/ext/gst1-java-core-0.9-161201.jar differ
diff --git a/lib.jogl/release/modules/ext/jogl-all.jar b/lib.jogl/release/modules/ext/jogl-all.jar
index f73174f9..e2c7b44b 100644
Binary files a/lib.jogl/release/modules/ext/jogl-all.jar and b/lib.jogl/release/modules/ext/jogl-all.jar differ
diff --git a/lib.processing/manifest.mf b/lib.processing/manifest.mf
index 06671022..bc720724 100644
--- a/lib.processing/manifest.mf
+++ b/lib.processing/manifest.mf
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: processing.core
OpenIDE-Module-Localizing-Bundle: processing/core/Bundle.properties
-OpenIDE-Module-Specification-Version: 3.0.1
+OpenIDE-Module-Specification-Version: 3.2.3
diff --git a/lib.processing/nbproject/genfiles.properties b/lib.processing/nbproject/genfiles.properties
index 30b28586..cc66fe63 100644
--- a/lib.processing/nbproject/genfiles.properties
+++ b/lib.processing/nbproject/genfiles.properties
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=0a597dde
+build.xml.data.CRC32=455094f1
build.xml.script.CRC32=5af10cd5
-build.xml.stylesheet.CRC32=a56c6a5b@2.67.1
+build.xml.stylesheet.CRC32=a56c6a5b@2.71.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=0a597dde
+nbproject/build-impl.xml.data.CRC32=455094f1
nbproject/build-impl.xml.script.CRC32=c2c5dd3f
-nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.67.1
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.71.1
diff --git a/lib.processing/nbproject/project.xml b/lib.processing/nbproject/project.xml
index dc053e1f..0304f330 100644
--- a/lib.processing/nbproject/project.xml
+++ b/lib.processing/nbproject/project.xml
@@ -15,15 +15,12 @@
-
- net.neilcsmith.praxis.code
- net.neilcsmith.praxis.video.pgl
- net.neilcsmith.praxis.video.pgl.code
+ processing.coreprocessing.dataprocessing.eventprocessing.opengl
-
+
ext/core.jarrelease/modules/ext/core.jar
diff --git a/lib.processing/release/modules/ext/core.jar b/lib.processing/release/modules/ext/core.jar
index fb39cd10..e9ebb5b3 100644
Binary files a/lib.processing/release/modules/ext/core.jar and b/lib.processing/release/modules/ext/core.jar differ
diff --git a/lib.spout/build.xml b/lib.spout/build.xml
new file mode 100644
index 00000000..6465d4eb
--- /dev/null
+++ b/lib.spout/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Builds, tests, and runs the project spout.
+
+
diff --git a/lib.spout/manifest.mf b/lib.spout/manifest.mf
new file mode 100644
index 00000000..4be8d4a9
--- /dev/null
+++ b/lib.spout/manifest.mf
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+AutoUpdate-Show-In-Client: true
+OpenIDE-Module: spout
+OpenIDE-Module-Localizing-Bundle: spout/Bundle.properties
+OpenIDE-Module-Specification-Version: 2.0.6.0
+
diff --git a/lib.spout/nbproject/build-impl.xml b/lib.spout/nbproject/build-impl.xml
new file mode 100644
index 00000000..61a0ce56
--- /dev/null
+++ b/lib.spout/nbproject/build-impl.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ You must set 'suite.dir' to point to your containing module suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib.spout/nbproject/genfiles.properties b/lib.spout/nbproject/genfiles.properties
new file mode 100644
index 00000000..b1d21762
--- /dev/null
+++ b/lib.spout/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=c470240c
+build.xml.script.CRC32=8feaeda8
+build.xml.stylesheet.CRC32=a56c6a5b@2.71.1
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=c470240c
+nbproject/build-impl.xml.script.CRC32=ecd8f66a
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.71.1
diff --git a/lib.spout/nbproject/project.properties b/lib.spout/nbproject/project.properties
new file mode 100644
index 00000000..357190e4
--- /dev/null
+++ b/lib.spout/nbproject/project.properties
@@ -0,0 +1 @@
+is.autoload=true
diff --git a/lib.spout/nbproject/project.xml b/lib.spout/nbproject/project.xml
new file mode 100644
index 00000000..09412f16
--- /dev/null
+++ b/lib.spout/nbproject/project.xml
@@ -0,0 +1,27 @@
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ spout
+
+
+
+ processing.core
+
+
+
+ 3.2.3
+
+
+
+
+ spout
+
+
+ ext/spout.jar
+ release/modules/ext/spout.jar
+
+
+
+
diff --git a/lib.spout/nbproject/suite.properties b/lib.spout/nbproject/suite.properties
new file mode 100644
index 00000000..364e160e
--- /dev/null
+++ b/lib.spout/nbproject/suite.properties
@@ -0,0 +1 @@
+suite.dir=${basedir}/..
diff --git a/lib.spout/release/modules/ext/spout.jar b/lib.spout/release/modules/ext/spout.jar
new file mode 100644
index 00000000..408a1f09
Binary files /dev/null and b/lib.spout/release/modules/ext/spout.jar differ
diff --git a/lib.spout/release/modules/lib/JNISpout_32.dll b/lib.spout/release/modules/lib/JNISpout_32.dll
new file mode 100644
index 00000000..099b97eb
Binary files /dev/null and b/lib.spout/release/modules/lib/JNISpout_32.dll differ
diff --git a/lib.spout/release/modules/lib/JNISpout_64.dll b/lib.spout/release/modules/lib/JNISpout_64.dll
new file mode 100644
index 00000000..bee57466
Binary files /dev/null and b/lib.spout/release/modules/lib/JNISpout_64.dll differ
diff --git a/lib.spout/src/spout/Bundle.properties b/lib.spout/src/spout/Bundle.properties
new file mode 100644
index 00000000..0c226e34
--- /dev/null
+++ b/lib.spout/src/spout/Bundle.properties
@@ -0,0 +1 @@
+OpenIDE-Module-Name=lib.spout
diff --git a/lib.syphon/build.xml b/lib.syphon/build.xml
new file mode 100644
index 00000000..40776423
--- /dev/null
+++ b/lib.syphon/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ Builds, tests, and runs the project codeanticode.syphon.
+
+
diff --git a/lib.syphon/manifest.mf b/lib.syphon/manifest.mf
new file mode 100644
index 00000000..7f7b2737
--- /dev/null
+++ b/lib.syphon/manifest.mf
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+AutoUpdate-Show-In-Client: true
+OpenIDE-Module: codeanticode.syphon
+OpenIDE-Module-Localizing-Bundle: codeanticode/syphon/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
diff --git a/lib.syphon/nbproject/build-impl.xml b/lib.syphon/nbproject/build-impl.xml
new file mode 100644
index 00000000..606d0536
--- /dev/null
+++ b/lib.syphon/nbproject/build-impl.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ You must set 'suite.dir' to point to your containing module suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib.syphon/nbproject/genfiles.properties b/lib.syphon/nbproject/genfiles.properties
new file mode 100644
index 00000000..786878f5
--- /dev/null
+++ b/lib.syphon/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=a15ed878
+build.xml.script.CRC32=4e0e891f
+build.xml.stylesheet.CRC32=a56c6a5b@2.71.1
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=a15ed878
+nbproject/build-impl.xml.script.CRC32=9f3f1cde
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.71.1
diff --git a/lib.syphon/nbproject/project.properties b/lib.syphon/nbproject/project.properties
new file mode 100644
index 00000000..00895c5d
--- /dev/null
+++ b/lib.syphon/nbproject/project.properties
@@ -0,0 +1,3 @@
+file.reference.jsyphon.jar=release/modules/ext/jsyphon.jar
+file.reference.Syphon.jar=release/modules/ext/Syphon.jar
+is.autoload=true
diff --git a/lib.syphon/nbproject/project.xml b/lib.syphon/nbproject/project.xml
new file mode 100644
index 00000000..56072c25
--- /dev/null
+++ b/lib.syphon/nbproject/project.xml
@@ -0,0 +1,31 @@
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ codeanticode.syphon
+
+
+
+ processing.core
+
+
+
+ 3.2.3
+
+
+
+
+ codeanticode.syphon
+
+
+ ext/jsyphon.jar
+ release/modules/ext/jsyphon.jar
+
+
+ ext/Syphon.jar
+ release/modules/ext/Syphon.jar
+
+
+
+
diff --git a/lib.syphon/nbproject/suite.properties b/lib.syphon/nbproject/suite.properties
new file mode 100644
index 00000000..29d7cc9b
--- /dev/null
+++ b/lib.syphon/nbproject/suite.properties
@@ -0,0 +1 @@
+suite.dir=${basedir}/..
diff --git a/lib.syphon/release/modules/ext/Syphon.jar b/lib.syphon/release/modules/ext/Syphon.jar
new file mode 100644
index 00000000..8cab869e
Binary files /dev/null and b/lib.syphon/release/modules/ext/Syphon.jar differ
diff --git a/lib.syphon/release/modules/ext/jsyphon.jar b/lib.syphon/release/modules/ext/jsyphon.jar
new file mode 100644
index 00000000..79d027f9
Binary files /dev/null and b/lib.syphon/release/modules/ext/jsyphon.jar differ
diff --git a/lib.syphon/release/modules/lib/Syphon b/lib.syphon/release/modules/lib/Syphon
new file mode 100644
index 00000000..1a702acd
Binary files /dev/null and b/lib.syphon/release/modules/lib/Syphon differ
diff --git a/lib.syphon/release/modules/lib/libJSyphon.jnilib b/lib.syphon/release/modules/lib/libJSyphon.jnilib
new file mode 100644
index 00000000..e15721e6
Binary files /dev/null and b/lib.syphon/release/modules/lib/libJSyphon.jnilib differ
diff --git a/lib.syphon/src/codeanticode/syphon/Bundle.properties b/lib.syphon/src/codeanticode/syphon/Bundle.properties
new file mode 100644
index 00000000..e2371a08
--- /dev/null
+++ b/lib.syphon/src/codeanticode/syphon/Bundle.properties
@@ -0,0 +1 @@
+OpenIDE-Module-Name=lib.syphon
diff --git a/nbproject/project.properties b/nbproject/project.properties
index 8a612a2a..3142e4a8 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -1,128 +1,136 @@
-app.icon=branding/core/core.jar/org/netbeans/core/startup/frame48.gif
-app.name=${branding.token}
-app.title=praxis
-app.conf=praxis.conf
-auxiliary.org-netbeans-modules-apisupport-installer.license-type=no
-auxiliary.org-netbeans-modules-apisupport-installer.os-linux=true
-auxiliary.org-netbeans-modules-apisupport-installer.os-macosx=false
-auxiliary.org-netbeans-modules-apisupport-installer.os-solaris=false
-auxiliary.org-netbeans-modules-apisupport-installer.os-windows=false
-auxiliary.org-netbeans-modules-apisupport-installer.pack200-enabled=false
-modules=\
- ${project.net.neilcsmith.praxis.core}:\
- ${project.net.neilcsmith.praxis.impl}:\
- ${project.net.neilcsmith.praxis.hub}:\
- ${project.net.neilcsmith.praxis.script}:\
- ${project.net.neilcsmith.praxis.components}:\
- ${project.net.neilcsmith.audio.ops}:\
- ${project.net.neilcsmith.jnajack}:\
- ${project.net.miginfocom}:\
- ${project.net.neilcsmith.praxis.gui}:\
- ${project.net.neilcsmith.praxis.util}:\
- ${project.net.neilcsmith.audio.servers}:\
- ${project.net.neilcsmith.praxis.midi}:\
- ${project.net.neilcsmith.praxis.audio}:\
- ${project.net.neilcsmith.praxis.video}:\
- ${project.net.neilcsmith.audioops.impl.gpl}:\
- ${project.net.neilcsmith.audioops.impl}:\
- ${project.net.neilcsmith.audioservers.javasound}:\
- ${project.net.neilcsmith.audioservers.jack}:\
- ${project.net.neilcsmith.praxis.player}:\
- ${project.net.neilcsmith.praxis.terminal}:\
- ${project.net.neilcsmith.praxis.settings}:\
- ${project.org.jaudiolibs.pipes}:\
- ${project.net.neilcsmith.praxis.audio.io}:\
- ${project.com.tinkerforge}:\
- ${project.net.neilcsmith.praxis.tinkerforge}:\
- ${project.net.neilcsmith.praxis.video.render}:\
- ${project.net.neilcsmith.praxis.video.pipes}:\
- ${project.net.neilcsmith.praxis.texteditor}:\
- ${project.net.neilcsmith.praxis.nblookup}:\
- ${project.net.neilcsmith.praxis.meta}:\
- ${project.de.sciss.net}:\
- ${project.net.neilcsmith.praxis.osc}:\
- ${project.com.sun.jna}:\
- ${project.net.neilcsmith.praxis.nb.classpath}:\
- ${project.org.praxislive.compiler.javac}:\
- ${project.net.neilcsmith.praxis.compiler}:\
- ${project.javax.media.opengl}:\
- ${project.processing.core}:\
- ${project.net.neilcsmith.praxis.video.pgl}:\
- ${project.net.neilcsmith.praxis.code}:\
- ${project.net.neilcsmith.praxis.video.code}:\
- ${project.net.neilcsmith.praxis.video.pgl.custom}:\
- ${project.net.neilcsmith.praxis.hub.net}:\
- ${project.net.neilcsmith.praxis.logging}:\
- ${project.net.neilcsmith.praxis.core.factory}:\
- ${project.net.neilcsmith.praxis.video.factory}:\
- ${project.net.neilcsmith.praxis.core.code}:\
- ${project.net.neilcsmith.praxis.audio.code}:\
- ${project.net.neilcsmith.praxis.audio.factory}:\
- ${project.net.neilcsmith.praxis.tracker}:\
- ${project.org.freedesktop.gstreamer}:\
- ${project.net.neilcsmith.praxis.video.gst1}:\
- ${project.net.neilcsmith.praxis.code.services}:\
- ${project.com.bulenkov.darcula}:\
- ${project.fi.iki.elonen}:\
- ${project.net.neilcsmith.praxis.data}:\
- ${project.com.sun.jna.platform}
-project.com.bulenkov.darcula=lib.darcula
-project.com.sun.jna=lib.jna
-project.com.sun.jna.platform=lib.jna.platform
-project.com.tinkerforge=lib.tinkerforge
-project.de.sciss.net=lib.netutil
-project.fi.iki.elonen=lib.nanohttpd
-project.javax.media.opengl=lib.jogl
-project.net.miginfocom=lib.miglayout
-project.net.neilcsmith.audio.ops=audio.ops
-project.net.neilcsmith.audio.servers=audio.servers
-project.net.neilcsmith.audioops.impl=audio.ops.impl
-project.net.neilcsmith.audioops.impl.gpl=audio.ops.gpl
-project.net.neilcsmith.audioservers.jack=audio.servers.jack
-project.net.neilcsmith.audioservers.javasound=audio.servers.javasound
-project.net.neilcsmith.jnajack=audio.jnajack
-project.net.neilcsmith.praxis.audio=praxis.audio
-project.net.neilcsmith.praxis.audio.code=praxis.audio.code
-project.net.neilcsmith.praxis.audio.factory=praxis.audio.factory
-project.net.neilcsmith.praxis.audio.io=praxis.audio.loader
-project.net.neilcsmith.praxis.code=praxis.code
-project.net.neilcsmith.praxis.code.services=praxis.code.services
-project.net.neilcsmith.praxis.compiler=praxis.compiler
-project.net.neilcsmith.praxis.components=praxis.components
-project.net.neilcsmith.praxis.core=praxis.core
-project.net.neilcsmith.praxis.core.code=praxis.core.code
-project.net.neilcsmith.praxis.core.factory=praxis.core.factory
-project.net.neilcsmith.praxis.data=praxis.data
-project.net.neilcsmith.praxis.gui=praxis.gui
-project.net.neilcsmith.praxis.hub=praxis.hub
-project.net.neilcsmith.praxis.hub.net=praxis.hub.net
-project.net.neilcsmith.praxis.impl=praxis.impl
-project.net.neilcsmith.praxis.logging=praxis.logging
-project.net.neilcsmith.praxis.meta=praxis.meta
-project.net.neilcsmith.praxis.midi=praxis.midi
-project.net.neilcsmith.praxis.nb.classpath=praxis.nb.classpath
-project.net.neilcsmith.praxis.nblookup=praxis.nb.lookup
-project.net.neilcsmith.praxis.osc=praxis.osc
-project.net.neilcsmith.praxis.player=praxis.player
-project.net.neilcsmith.praxis.script=praxis.script
-project.net.neilcsmith.praxis.settings=praxis.settings
-project.net.neilcsmith.praxis.terminal=praxis.terminal
-project.net.neilcsmith.praxis.texteditor=praxis.texteditor
-project.net.neilcsmith.praxis.tinkerforge=praxis.tinkerforge
-project.net.neilcsmith.praxis.tracker=praxis.tracker
-project.net.neilcsmith.praxis.util=praxis.util
-project.net.neilcsmith.praxis.video=praxis.video
-project.net.neilcsmith.praxis.video.code=praxis.video.code
-project.net.neilcsmith.praxis.video.factory=praxis.video.factory
-project.net.neilcsmith.praxis.video.gst1=praxis.video.gst1
-project.net.neilcsmith.praxis.video.pgl=praxis.video.pgl
-project.net.neilcsmith.praxis.video.pgl.custom=praxis.video.pgl.code
-project.net.neilcsmith.praxis.video.pipes=praxis.video.pipes
-project.net.neilcsmith.praxis.video.render=praxis.video.render
-project.org.freedesktop.gstreamer=lib.gst1-java-core
-project.org.jaudiolibs.pipes=audio.pipes
-project.org.praxislive.compiler.javac=praxis.compiler.javac
-project.processing.core=lib.processing
-
-# good settings for Jack ? : -J-XX:+UseConcMarkSweepGC -J-XX:+CMSIncrementalMode -J-XX:+CMSIncrementalPacing
-run.args.extra=--nosplash --slave --network all
+app.icon=branding/core/core.jar/org/netbeans/core/startup/frame48.gif
+app.name=${branding.token}
+app.title=praxis
+app.conf=praxis.conf
+auxiliary.org-netbeans-modules-apisupport-installer.license-type=no
+auxiliary.org-netbeans-modules-apisupport-installer.os-linux=true
+auxiliary.org-netbeans-modules-apisupport-installer.os-macosx=false
+auxiliary.org-netbeans-modules-apisupport-installer.os-solaris=false
+auxiliary.org-netbeans-modules-apisupport-installer.os-windows=false
+auxiliary.org-netbeans-modules-apisupport-installer.pack200-enabled=false
+modules=\
+ ${project.net.neilcsmith.praxis.core}:\
+ ${project.net.neilcsmith.praxis.impl}:\
+ ${project.net.neilcsmith.praxis.hub}:\
+ ${project.net.neilcsmith.praxis.script}:\
+ ${project.net.neilcsmith.praxis.components}:\
+ ${project.net.neilcsmith.audio.ops}:\
+ ${project.net.neilcsmith.jnajack}:\
+ ${project.net.miginfocom}:\
+ ${project.net.neilcsmith.praxis.gui}:\
+ ${project.net.neilcsmith.praxis.util}:\
+ ${project.net.neilcsmith.audio.servers}:\
+ ${project.net.neilcsmith.praxis.midi}:\
+ ${project.net.neilcsmith.praxis.audio}:\
+ ${project.net.neilcsmith.praxis.video}:\
+ ${project.net.neilcsmith.audioops.impl.gpl}:\
+ ${project.net.neilcsmith.audioops.impl}:\
+ ${project.net.neilcsmith.audioservers.javasound}:\
+ ${project.net.neilcsmith.audioservers.jack}:\
+ ${project.net.neilcsmith.praxis.player}:\
+ ${project.net.neilcsmith.praxis.terminal}:\
+ ${project.net.neilcsmith.praxis.settings}:\
+ ${project.org.jaudiolibs.pipes}:\
+ ${project.net.neilcsmith.praxis.audio.io}:\
+ ${project.com.tinkerforge}:\
+ ${project.net.neilcsmith.praxis.tinkerforge}:\
+ ${project.net.neilcsmith.praxis.video.render}:\
+ ${project.net.neilcsmith.praxis.video.pipes}:\
+ ${project.net.neilcsmith.praxis.texteditor}:\
+ ${project.net.neilcsmith.praxis.nblookup}:\
+ ${project.net.neilcsmith.praxis.meta}:\
+ ${project.de.sciss.net}:\
+ ${project.net.neilcsmith.praxis.osc}:\
+ ${project.com.sun.jna}:\
+ ${project.net.neilcsmith.praxis.nb.classpath}:\
+ ${project.org.praxislive.compiler.javac}:\
+ ${project.net.neilcsmith.praxis.compiler}:\
+ ${project.javax.media.opengl}:\
+ ${project.processing.core}:\
+ ${project.net.neilcsmith.praxis.video.pgl}:\
+ ${project.net.neilcsmith.praxis.code}:\
+ ${project.net.neilcsmith.praxis.video.code}:\
+ ${project.net.neilcsmith.praxis.video.pgl.custom}:\
+ ${project.net.neilcsmith.praxis.hub.net}:\
+ ${project.net.neilcsmith.praxis.logging}:\
+ ${project.net.neilcsmith.praxis.core.factory}:\
+ ${project.net.neilcsmith.praxis.video.factory}:\
+ ${project.net.neilcsmith.praxis.core.code}:\
+ ${project.net.neilcsmith.praxis.audio.code}:\
+ ${project.net.neilcsmith.praxis.audio.factory}:\
+ ${project.net.neilcsmith.praxis.tracker}:\
+ ${project.org.freedesktop.gstreamer}:\
+ ${project.net.neilcsmith.praxis.video.gst1}:\
+ ${project.net.neilcsmith.praxis.code.services}:\
+ ${project.com.bulenkov.darcula}:\
+ ${project.fi.iki.elonen}:\
+ ${project.net.neilcsmith.praxis.data}:\
+ ${project.com.sun.jna.platform}:\
+ ${project.codeanticode.syphon}:\
+ ${project.net.neilcsmith.praxis.video.pgl.syphon}:\
+ ${project.net.neilcsmith.praxis.video.pgl.spout}:\
+ ${project.spout}
+project.codeanticode.syphon=lib.syphon
+project.com.bulenkov.darcula=lib.darcula
+project.com.sun.jna=lib.jna
+project.com.sun.jna.platform=lib.jna.platform
+project.com.tinkerforge=lib.tinkerforge
+project.de.sciss.net=lib.netutil
+project.fi.iki.elonen=lib.nanohttpd
+project.javax.media.opengl=lib.jogl
+project.net.miginfocom=lib.miglayout
+project.net.neilcsmith.audio.ops=audio.ops
+project.net.neilcsmith.audio.servers=audio.servers
+project.net.neilcsmith.audioops.impl=audio.ops.impl
+project.net.neilcsmith.audioops.impl.gpl=audio.ops.gpl
+project.net.neilcsmith.audioservers.jack=audio.servers.jack
+project.net.neilcsmith.audioservers.javasound=audio.servers.javasound
+project.net.neilcsmith.jnajack=audio.jnajack
+project.net.neilcsmith.praxis.audio=praxis.audio
+project.net.neilcsmith.praxis.audio.code=praxis.audio.code
+project.net.neilcsmith.praxis.audio.factory=praxis.audio.factory
+project.net.neilcsmith.praxis.audio.io=praxis.audio.loader
+project.net.neilcsmith.praxis.code=praxis.code
+project.net.neilcsmith.praxis.code.services=praxis.code.services
+project.net.neilcsmith.praxis.compiler=praxis.compiler
+project.net.neilcsmith.praxis.components=praxis.components
+project.net.neilcsmith.praxis.core=praxis.core
+project.net.neilcsmith.praxis.core.code=praxis.core.code
+project.net.neilcsmith.praxis.core.factory=praxis.core.factory
+project.net.neilcsmith.praxis.data=praxis.data
+project.net.neilcsmith.praxis.gui=praxis.gui
+project.net.neilcsmith.praxis.hub=praxis.hub
+project.net.neilcsmith.praxis.hub.net=praxis.hub.net
+project.net.neilcsmith.praxis.impl=praxis.impl
+project.net.neilcsmith.praxis.logging=praxis.logging
+project.net.neilcsmith.praxis.meta=praxis.meta
+project.net.neilcsmith.praxis.midi=praxis.midi
+project.net.neilcsmith.praxis.nb.classpath=praxis.nb.classpath
+project.net.neilcsmith.praxis.nblookup=praxis.nb.lookup
+project.net.neilcsmith.praxis.osc=praxis.osc
+project.net.neilcsmith.praxis.player=praxis.player
+project.net.neilcsmith.praxis.script=praxis.script
+project.net.neilcsmith.praxis.settings=praxis.settings
+project.net.neilcsmith.praxis.terminal=praxis.terminal
+project.net.neilcsmith.praxis.texteditor=praxis.texteditor
+project.net.neilcsmith.praxis.tinkerforge=praxis.tinkerforge
+project.net.neilcsmith.praxis.tracker=praxis.tracker
+project.net.neilcsmith.praxis.util=praxis.util
+project.net.neilcsmith.praxis.video=praxis.video
+project.net.neilcsmith.praxis.video.code=praxis.video.code
+project.net.neilcsmith.praxis.video.factory=praxis.video.factory
+project.net.neilcsmith.praxis.video.gst1=praxis.video.gst1
+project.net.neilcsmith.praxis.video.pgl=praxis.video.pgl
+project.net.neilcsmith.praxis.video.pgl.custom=praxis.video.pgl.code
+project.net.neilcsmith.praxis.video.pgl.spout=praxis.video.pgl.spout
+project.net.neilcsmith.praxis.video.pgl.syphon=praxis.video.pgl.syphon
+project.net.neilcsmith.praxis.video.pipes=praxis.video.pipes
+project.net.neilcsmith.praxis.video.render=praxis.video.render
+project.org.freedesktop.gstreamer=lib.gst1-java-core
+project.org.jaudiolibs.pipes=audio.pipes
+project.org.praxislive.compiler.javac=praxis.compiler.javac
+project.processing.core=lib.processing
+
+project.spout=lib.spout
+# good settings for Jack ? : -J-XX:+UseConcMarkSweepGC -J-XX:+CMSIncrementalMode -J-XX:+CMSIncrementalPacing
+run.args.extra=--nosplash --slave --network all
diff --git a/praxis.video.code/src/net/neilcsmith/praxis/video/code/FontLoader.java b/praxis.video.code/src/net/neilcsmith/praxis/video/code/FontLoader.java
new file mode 100644
index 00000000..3410ff0d
--- /dev/null
+++ b/praxis.video.code/src/net/neilcsmith/praxis/video/code/FontLoader.java
@@ -0,0 +1,96 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2017 Neil C Smith.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 3 for more details.
+ *
+ * You should have received a copy of the GNU General Public License version 3
+ * along with this work; if not, see http://www.gnu.org/licenses/
+ *
+ *
+ * Please visit http://neilcsmith.net if you need additional information or
+ * have any questions.
+ *
+ *
+ * Parts of the API of this package, as well as some of the code, is derived from
+ * the Processing project (http://processing.org)
+ *
+ * Copyright (c) 2004-09 Ben Fry and Casey Reas
+ * Copyright (c) 2001-04 Massachusetts Institute of Technology
+ *
+ */
+package net.neilcsmith.praxis.video.code;
+
+import java.awt.Font;
+import java.awt.FontFormatException;
+import java.io.IOException;
+import java.net.URI;
+import java.util.Objects;
+import net.neilcsmith.praxis.code.ResourceProperty;
+import net.neilcsmith.praxis.video.code.userapi.PFont;
+import net.neilcsmith.praxis.video.render.utils.FontUtils;
+
+/**
+ *
+ * @author Neil C Smith (http://neilcsmith.net)
+ */
+class FontLoader extends ResourceProperty.Loader {
+
+ private final static FontLoader INSTANCE = new FontLoader();
+
+ private FontLoader() {
+ super(PFont.class);
+ }
+
+ @Override
+ public PFont load(URI uri) throws IOException {
+ try {
+ Font baseFont = FontUtils.load(uri);
+ return new PFontImpl(baseFont);
+ } catch (FontFormatException ex) {
+ throw new IOException(ex);
+ }
+ }
+
+ static FontLoader getDefault() {
+ return INSTANCE;
+ }
+
+ private static class PFontImpl extends PFont {
+
+ private final Font baseFont;
+
+ private PFontImpl(Font baseFont) {
+ this.baseFont = baseFont;
+ }
+
+ @Override
+ protected Font getFont() {
+ return baseFont;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(baseFont);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof PFontImpl) {
+ return ((PFontImpl) obj).baseFont.equals(baseFont);
+ } else {
+ return false;
+ }
+ }
+
+ }
+
+}
diff --git a/praxis.video.code/src/net/neilcsmith/praxis/video/code/VideoCodeConnector.java b/praxis.video.code/src/net/neilcsmith/praxis/video/code/VideoCodeConnector.java
index 6e5e257f..d43ce6a3 100644
--- a/praxis.video.code/src/net/neilcsmith/praxis/video/code/VideoCodeConnector.java
+++ b/praxis.video.code/src/net/neilcsmith/praxis/video/code/VideoCodeConnector.java
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright 2014 Neil C Smith.
+ * Copyright 2017 Neil C Smith.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 only, as
@@ -32,6 +32,7 @@
import net.neilcsmith.praxis.code.userapi.P;
import net.neilcsmith.praxis.core.Port;
import net.neilcsmith.praxis.video.code.userapi.OffScreen;
+import net.neilcsmith.praxis.video.code.userapi.PFont;
import net.neilcsmith.praxis.video.code.userapi.PImage;
/**
@@ -90,6 +91,21 @@ protected void analyseField(Field field) {
}
}
+ if (PFont.class.isAssignableFrom(field.getType())) {
+ P p = field.getAnnotation(P.class);
+ if (p != null) {
+ ResourceProperty.Descriptor fpd =
+ ResourceProperty.Descriptor.create(this, p, field, FontLoader.getDefault());
+ if (fpd != null) {
+ addControl(fpd);
+ if (shouldAddPort(field)) {
+ addPort(fpd.createPortDescriptor());
+ }
+ return;
+ }
+ }
+ }
+
if (field.isAnnotationPresent(OffScreen.class)) {
OffScreenGraphicsInfo osgi = OffScreenGraphicsInfo.create(field);
if (osgi != null) {
diff --git a/praxis.video.code/src/net/neilcsmith/praxis/video/code/VideoCodeDelegate.java b/praxis.video.code/src/net/neilcsmith/praxis/video/code/VideoCodeDelegate.java
index 389bab1d..ae174b5e 100644
--- a/praxis.video.code/src/net/neilcsmith/praxis/video/code/VideoCodeDelegate.java
+++ b/praxis.video.code/src/net/neilcsmith/praxis/video/code/VideoCodeDelegate.java
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright 2014 Neil C Smith.
+ * Copyright 2017 Neil C Smith.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 only, as
@@ -31,6 +31,7 @@
package net.neilcsmith.praxis.video.code;
import net.neilcsmith.praxis.code.DefaultCodeDelegate;
+import net.neilcsmith.praxis.video.code.userapi.PFont;
import net.neilcsmith.praxis.video.code.userapi.PGraphics;
import net.neilcsmith.praxis.video.code.userapi.PImage;
import net.neilcsmith.praxis.video.render.SurfaceOp;
@@ -230,6 +231,18 @@ public void strokeWeight(double weight) {
pg.strokeWeight(weight);
}
+ public void text(String text, double x, double y) {
+ pg.text(text, x, y);
+ }
+
+ public void textFont(PFont font) {
+ pg.textFont(font);
+ }
+
+ public void textFont(PFont font, double size) {
+ pg.textFont(font, size);
+ }
+
public void translate(double x, double y) {
pg.translate(x, y);
}
diff --git a/praxis.video.code/src/net/neilcsmith/praxis/video/code/userapi/PFont.java b/praxis.video.code/src/net/neilcsmith/praxis/video/code/userapi/PFont.java
new file mode 100644
index 00000000..c4b80245
--- /dev/null
+++ b/praxis.video.code/src/net/neilcsmith/praxis/video/code/userapi/PFont.java
@@ -0,0 +1,42 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2017 Neil C Smith.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 3 for more details.
+ *
+ * You should have received a copy of the GNU General Public License version 3
+ * along with this work; if not, see http://www.gnu.org/licenses/
+ *
+ *
+ * Please visit http://neilcsmith.net if you need additional information or
+ * have any questions.
+ *
+ *
+ * Parts of the API of this package, as well as some of the code, is derived from
+ * the Processing project (http://processing.org)
+ *
+ * Copyright (c) 2004-09 Ben Fry and Casey Reas
+ * Copyright (c) 2001-04 Massachusetts Institute of Technology
+ *
+ */
+package net.neilcsmith.praxis.video.code.userapi;
+
+import java.awt.Font;
+
+/**
+ *
+ * @author Neil C Smith (http://neilcsmith.net)
+ */
+public abstract class PFont {
+
+ protected abstract Font getFont();
+
+}
diff --git a/praxis.video.code/src/net/neilcsmith/praxis/video/code/userapi/PGraphics.java b/praxis.video.code/src/net/neilcsmith/praxis/video/code/userapi/PGraphics.java
index 671ca815..5db12a36 100644
--- a/praxis.video.code/src/net/neilcsmith/praxis/video/code/userapi/PGraphics.java
+++ b/praxis.video.code/src/net/neilcsmith/praxis/video/code/userapi/PGraphics.java
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright 2016 Neil C Smith.
+ * Copyright 2017 Neil C Smith.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 only, as
@@ -31,6 +31,7 @@
import java.awt.BasicStroke;
import java.awt.Color;
+import java.awt.Font;
import java.awt.Polygon;
import java.awt.Shape;
import java.awt.geom.AffineTransform;
@@ -45,6 +46,7 @@
import net.neilcsmith.praxis.video.render.ops.RectFill;
import net.neilcsmith.praxis.video.render.ops.ScaledBlit;
import net.neilcsmith.praxis.video.render.ops.ShapeRender;
+import net.neilcsmith.praxis.video.render.ops.TextRender;
import net.neilcsmith.praxis.video.render.ops.TransformBlit;
/**
@@ -62,11 +64,13 @@ public abstract class PGraphics extends PImage {
private BasicStroke stroke = new BasicStroke(1);
private PShape shape;
private AffineTransform transform;
+ private Font font;
private final Blit blit;
private final ScaledBlit scaledBlit;
private final TransformBlit transformBlit;
private final RectFill rectFill;
private final ShapeRender shapeRender;
+ private final TextRender textRender;
protected PGraphics(int width, int height) {
super(width, height);
@@ -75,6 +79,7 @@ protected PGraphics(int width, int height) {
this.transformBlit = new TransformBlit();
this.rectFill = new RectFill();
this.shapeRender = new ShapeRender();
+ this.textRender = new TextRender();
}
protected abstract Surface getSurface();
@@ -392,6 +397,18 @@ public void strokeWeight(double weight) {
}
stroke = new BasicStroke((float) weight);
}
+
+ public void text(String text, double x, double y) {
+ renderText(text, x, y);
+ }
+
+ public void textFont(PFont font) {
+ textFont(font, 12);
+ }
+
+ public void textFont(PFont font, double size) {
+ this.font = font.getFont().deriveFont((float) size);
+ }
public void translate(double x, double y) {
if (transform == null) {
@@ -433,6 +450,22 @@ private void renderShape(Shape shape) {
getSurface().process(shapeRender);
}
+
+ private void renderText(String text, double x, double y) {
+ if (fillColor == null || font == null) {
+ return;
+ }
+
+ textRender.setFont(font)
+ .setColor(fillColor)
+ .setTransform(transform)
+ .setX(x)
+ .setY(y)
+ .setText(text);
+ getSurface().process(textRender);
+
+ }
+
private void polygon(final int[] xPoints, final int[] yPoints, final int nPoints) {
renderShape(new Polygon(xPoints, yPoints, nPoints));
diff --git a/praxis.video.gst1/src/net/neilcsmith/praxis/video/gst1/components/AbstractGstDelegate.java b/praxis.video.gst1/src/net/neilcsmith/praxis/video/gst1/components/AbstractGstDelegate.java
index 9eaa0927..5d973ae5 100644
--- a/praxis.video.gst1/src/net/neilcsmith/praxis/video/gst1/components/AbstractGstDelegate.java
+++ b/praxis.video.gst1/src/net/neilcsmith/praxis/video/gst1/components/AbstractGstDelegate.java
@@ -43,6 +43,7 @@
import org.freedesktop.gstreamer.Bus;
import org.freedesktop.gstreamer.Caps;
import org.freedesktop.gstreamer.Element;
+import org.freedesktop.gstreamer.FlowReturn;
import org.freedesktop.gstreamer.Gst;
import org.freedesktop.gstreamer.GstObject;
import org.freedesktop.gstreamer.Pipeline;
@@ -346,7 +347,7 @@ protected void doEOS() {
private class NewSampleListener implements AppSink.NEW_SAMPLE {
@Override
- public void newBuffer(AppSink sink) {
+ public FlowReturn newSample(AppSink sink) {
surfaceLock.lock();
Sample sample = sink.pullSample();
Structure capsStruct = sample.getCaps().getStructure(0);
@@ -368,6 +369,7 @@ public void newBuffer(AppSink sink) {
} finally {
surfaceLock.unlock();
}
+ return FlowReturn.OK;
}
}
@@ -375,7 +377,7 @@ public void newBuffer(AppSink sink) {
private class NewPrerollListener implements AppSink.NEW_PREROLL {
@Override
- public void newPreroll(AppSink sink) {
+ public FlowReturn newPreroll(AppSink sink) {
surfaceLock.lock();
Sample sample = sink.pullPreroll();
Structure capsStruct = sample.getCaps().getStructure(0);
@@ -397,6 +399,7 @@ public void newPreroll(AppSink sink) {
} finally {
surfaceLock.unlock();
}
+ return FlowReturn.OK;
}
}
diff --git a/praxis.video.gst1/src/net/neilcsmith/praxis/video/gst1/components/PlayBinDelegate.java b/praxis.video.gst1/src/net/neilcsmith/praxis/video/gst1/components/PlayBinDelegate.java
index f929aabf..1292c090 100644
--- a/praxis.video.gst1/src/net/neilcsmith/praxis/video/gst1/components/PlayBinDelegate.java
+++ b/praxis.video.gst1/src/net/neilcsmith/praxis/video/gst1/components/PlayBinDelegate.java
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright 2015 Neil C Smith.
+ * Copyright 2017 Neil C Smith.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 only, as
@@ -109,12 +109,18 @@ protected void doStop() {
super.doStop();
this.rate = 1;
}
-
-
@Override
protected void doEOS() {
- doSeek(true, -1);
+ try {
+ if (isLooping()) {
+ doSeek(true, -1);
+ } else {
+ stop();
+ }
+ } catch (Exception ex) {
+ error("", ex);
+ }
}
private void doSeek(boolean eos, long position) {
diff --git a/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/FontLoader.java b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/FontLoader.java
new file mode 100644
index 00000000..008ec571
--- /dev/null
+++ b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/FontLoader.java
@@ -0,0 +1,99 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2017 Neil C Smith.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 3 for more details.
+ *
+ * You should have received a copy of the GNU General Public License version 3
+ * along with this work; if not, see http://www.gnu.org/licenses/
+ *
+ *
+ * Please visit http://neilcsmith.net if you need additional information or
+ * have any questions.
+ *
+ *
+ * Parts of the API of this package, as well as some of the code, is derived from
+ * the Processing project (http://processing.org)
+ *
+ * Copyright (c) 2004-09 Ben Fry and Casey Reas
+ * Copyright (c) 2001-04 Massachusetts Institute of Technology
+ *
+ */
+package net.neilcsmith.praxis.video.pgl.code;
+
+import java.awt.Font;
+import java.awt.FontFormatException;
+import java.io.IOException;
+import java.net.URI;
+import java.util.Objects;
+import net.neilcsmith.praxis.code.ResourceProperty;
+import net.neilcsmith.praxis.video.pgl.PGLContext;
+import net.neilcsmith.praxis.video.pgl.code.userapi.PFont;
+import net.neilcsmith.praxis.video.render.utils.FontUtils;
+
+/**
+ *
+ * @author Neil C Smith (http://neilcsmith.net)
+ */
+class FontLoader extends ResourceProperty.Loader {
+
+ private final static FontLoader INSTANCE = new FontLoader();
+
+ private FontLoader() {
+ super(PFont.class);
+ }
+
+ @Override
+ public PFont load(URI uri) throws IOException {
+ try {
+ Font baseFont = FontUtils.load(uri);
+ return new PFontImpl(baseFont);
+ } catch (FontFormatException ex) {
+ throw new IOException(ex);
+ }
+ }
+
+ static FontLoader getDefault() {
+ return INSTANCE;
+ }
+
+ private static class PFontImpl extends PFont {
+
+ private final Font baseFont;
+
+ private PFontImpl(Font baseFont) {
+ this.baseFont = baseFont;
+ }
+
+ @Override
+ protected processing.core.PFont unwrap(PGLContext context, double size) {
+ return context.asPFont(baseFont.deriveFont((float) size));
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(baseFont);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof PFontImpl) {
+ return ((PFontImpl) obj).baseFont.equals(baseFont);
+ } else {
+ return false;
+ }
+ }
+
+
+
+ }
+
+}
diff --git a/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P2DCodeConnector.java b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P2DCodeConnector.java
index 579bfd0f..84b486a2 100644
--- a/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P2DCodeConnector.java
+++ b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P2DCodeConnector.java
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright 2016 Neil C Smith.
+ * Copyright 2017 Neil C Smith.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 only, as
@@ -29,26 +29,26 @@
import net.neilcsmith.praxis.code.userapi.In;
import net.neilcsmith.praxis.code.userapi.P;
import net.neilcsmith.praxis.core.Port;
+import net.neilcsmith.praxis.video.pgl.code.userapi.PFont;
import net.neilcsmith.praxis.video.pgl.code.userapi.PImage;
-
+import net.neilcsmith.praxis.video.pgl.code.userapi.PShape;
/**
*
* @author Neil C Smith
*/
public class P2DCodeConnector extends CodeConnector {
-
+
public final static String SETUP = "setup";
public final static String DRAW = "draw";
-
+
private PGLVideoOutputPort.Descriptor output;
-
public P2DCodeConnector(CodeFactory.Task creator,
P2DCodeDelegate delegate) {
super(creator, delegate);
}
-
+
PGLVideoOutputPort.Descriptor extractOutput() {
return output;
}
@@ -62,18 +62,19 @@ protected void addDefaultPorts() {
@Override
protected void analyseField(Field field) {
- if (PImage.class.isAssignableFrom(field.getType())) {
- In ann = field.getAnnotation(In.class);
- if (ann != null) {
- field.setAccessible(true);
- addPort(new PGLVideoInputPort.Descriptor(findID(field), ann.value(), field));
- return;
- }
-
- P p = field.getAnnotation(P.class);
- if (p != null) {
- ResourceProperty.Descriptor ipd =
- ResourceProperty.Descriptor.create(this, p, field, ImageLoader.getDefault());
+
+ In ann = field.getAnnotation(In.class);
+ if (ann != null && PImage.class.isAssignableFrom(field.getType())) {
+ field.setAccessible(true);
+ addPort(new PGLVideoInputPort.Descriptor(findID(field), ann.value(), field));
+ return;
+ }
+
+ P p = field.getAnnotation(P.class);
+ if (p != null) {
+ if (PImage.class.isAssignableFrom(field.getType())) {
+ ResourceProperty.Descriptor ipd
+ = ResourceProperty.Descriptor.create(this, p, field, ImageLoader.getDefault());
if (ipd != null) {
addControl(ipd);
if (shouldAddPort(field)) {
@@ -82,11 +83,33 @@ protected void analyseField(Field field) {
return;
}
}
+
+ if (PFont.class.isAssignableFrom(field.getType())) {
+ ResourceProperty.Descriptor fpd
+ = ResourceProperty.Descriptor.create(this, p, field, FontLoader.getDefault());
+ if (fpd != null) {
+ addControl(fpd);
+ if (shouldAddPort(field)) {
+ addPort(fpd.createPortDescriptor());
+ }
+ return;
+ }
+ }
+
+ if (PShape.class.isAssignableFrom(field.getType())) {
+ ResourceProperty.Descriptor spd
+ = ResourceProperty.Descriptor.create(this, p, field, ShapeLoader.getDefault());
+ if (spd != null) {
+ addControl(spd);
+ if (shouldAddPort(field)) {
+ addPort(spd.createPortDescriptor());
+ }
+ return;
+ }
+ }
}
+
super.analyseField(field);
}
-
-
-
}
diff --git a/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P2DCodeDelegate.java b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P2DCodeDelegate.java
index 712e762b..e367290b 100644
--- a/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P2DCodeDelegate.java
+++ b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P2DCodeDelegate.java
@@ -1,5 +1,3 @@
-
-
package net.neilcsmith.praxis.video.pgl.code;
import net.neilcsmith.praxis.code.DefaultCodeDelegate;
@@ -8,13 +6,13 @@
import net.neilcsmith.praxis.video.pgl.code.userapi.PGraphics2D;
import net.neilcsmith.praxis.video.pgl.code.userapi.PImage;
import net.neilcsmith.praxis.video.pgl.code.userapi.PShader;
-
+import net.neilcsmith.praxis.video.pgl.code.userapi.PShape;
public class P2DCodeDelegate extends DefaultCodeDelegate {
-
+
public int width;
public int height;
-
+
PGraphics2D pg;
void setupGraphics(PGraphics2D pg, int width, int height) {
@@ -22,19 +20,18 @@ void setupGraphics(PGraphics2D pg, int width, int height) {
this.width = width;
this.height = height;
}
-
- public void setup() {}
-
- public void draw() {}
-
- // extension delegate methods
+ public void setup() {
+ }
+
+ public void draw() {
+ }
+
+ // extension delegate methods
public PShader createShader(String vertShader, String fragShader) {
return pg.createShader(vertShader, fragShader);
}
-
-
-
+
// delegate methods
public void beginShape() {
pg.beginShape();
@@ -80,6 +77,14 @@ public void endShape(Constants.ShapeEndMode mode) {
pg.endShape(mode);
}
+ public PShape createShape() {
+ return pg.createShape();
+ }
+
+ public PShape createShape(Constants.ShapeType type) {
+ return pg.createShape(type);
+ }
+
public void clip(double a, double b, double c, double d) {
pg.clip(a, b, c, d);
}
@@ -212,6 +217,18 @@ public void image(PImage img, double a, double b, double c, double d, int u1, in
pg.image(img, a, b, c, d, u1, v1, u2, v2);
}
+ public void shape(PShape shape) {
+ pg.shape(shape);
+ }
+
+ public void shape(PShape shape, double x, double y) {
+ pg.shape(shape, x, y);
+ }
+
+ public void shape(PShape shape, double a, double b, double c, double d) {
+ pg.shape(shape, a, b, c, d);
+ }
+
public double textAscent() {
return pg.textAscent();
}
@@ -443,7 +460,7 @@ public void clear() {
public void background(PImage image) {
pg.background(image);
}
-
+
public void shader(PShader shader) {
pg.shader(shader);
}
@@ -455,5 +472,5 @@ public void resetShader() {
public void filter(PShader shader) {
pg.filter(shader);
}
-
+
}
diff --git a/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P3DCodeConnector.java b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P3DCodeConnector.java
index f232886e..5853619e 100644
--- a/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P3DCodeConnector.java
+++ b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P3DCodeConnector.java
@@ -1,7 +1,7 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
- * Copyright 2015 Neil C Smith.
+ * Copyright 2017 Neil C Smith.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 only, as
@@ -29,26 +29,26 @@
import net.neilcsmith.praxis.code.userapi.In;
import net.neilcsmith.praxis.code.userapi.P;
import net.neilcsmith.praxis.core.Port;
+import net.neilcsmith.praxis.video.pgl.code.userapi.PFont;
import net.neilcsmith.praxis.video.pgl.code.userapi.PImage;
-
+import net.neilcsmith.praxis.video.pgl.code.userapi.PShape;
/**
*
* @author Neil C Smith
*/
public class P3DCodeConnector extends CodeConnector {
-
+
public final static String SETUP = "setup";
public final static String DRAW = "draw";
-
+
private PGLVideoOutputPort.Descriptor output;
-
public P3DCodeConnector(CodeFactory.Task creator,
P3DCodeDelegate delegate) {
super(creator, delegate);
}
-
+
PGLVideoOutputPort.Descriptor extractOutput() {
return output;
}
@@ -62,18 +62,19 @@ protected void addDefaultPorts() {
@Override
protected void analyseField(Field field) {
- if (PImage.class.isAssignableFrom(field.getType())) {
- In ann = field.getAnnotation(In.class);
- if (ann != null) {
- field.setAccessible(true);
- addPort(new PGLVideoInputPort.Descriptor(findID(field), ann.value(), field));
- return;
- }
-
- P p = field.getAnnotation(P.class);
- if (p != null) {
- ResourceProperty.Descriptor ipd =
- ResourceProperty.Descriptor.create(this, p, field, ImageLoader.getDefault());
+
+ In ann = field.getAnnotation(In.class);
+ if (ann != null && PImage.class.isAssignableFrom(field.getType())) {
+ field.setAccessible(true);
+ addPort(new PGLVideoInputPort.Descriptor(findID(field), ann.value(), field));
+ return;
+ }
+
+ P p = field.getAnnotation(P.class);
+ if (p != null) {
+ if (PImage.class.isAssignableFrom(field.getType())) {
+ ResourceProperty.Descriptor ipd
+ = ResourceProperty.Descriptor.create(this, p, field, ImageLoader.getDefault());
if (ipd != null) {
addControl(ipd);
if (shouldAddPort(field)) {
@@ -82,10 +83,33 @@ protected void analyseField(Field field) {
return;
}
}
+
+ if (PFont.class.isAssignableFrom(field.getType())) {
+ ResourceProperty.Descriptor fpd
+ = ResourceProperty.Descriptor.create(this, p, field, FontLoader.getDefault());
+ if (fpd != null) {
+ addControl(fpd);
+ if (shouldAddPort(field)) {
+ addPort(fpd.createPortDescriptor());
+ }
+ return;
+ }
+ }
+
+ if (PShape.class.isAssignableFrom(field.getType())) {
+ ResourceProperty.Descriptor spd
+ = ResourceProperty.Descriptor.create(this, p, field, ShapeLoader.getDefault());
+ if (spd != null) {
+ addControl(spd);
+ if (shouldAddPort(field)) {
+ addPort(spd.createPortDescriptor());
+ }
+ return;
+ }
+ }
}
+
super.analyseField(field);
}
-
-
}
diff --git a/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P3DCodeDelegate.java b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P3DCodeDelegate.java
index cee3a630..e425a163 100644
--- a/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P3DCodeDelegate.java
+++ b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/P3DCodeDelegate.java
@@ -28,7 +28,7 @@
import net.neilcsmith.praxis.video.pgl.code.userapi.PGraphics3D;
import net.neilcsmith.praxis.video.pgl.code.userapi.PImage;
import net.neilcsmith.praxis.video.pgl.code.userapi.PShader;
-
+import net.neilcsmith.praxis.video.pgl.code.userapi.PShape;
public class P3DCodeDelegate extends DefaultCodeDelegate {
@@ -43,18 +43,17 @@ void setupGraphics(PGraphics3D pg, int width, int height) {
this.height = height;
}
- public void setup() {}
-
- public void draw() {}
-
- // extension delegate methods
+ public void setup() {
+ }
+
+ public void draw() {
+ }
+ // extension delegate methods
public PShader createShader(String vertShader, String fragShader) {
return pg.createShader(vertShader, fragShader);
}
-
-
-
+
// delegate methods
public void beginCamera() {
pg.beginCamera();
@@ -308,6 +307,14 @@ public void endShape(Constants.ShapeEndMode mode) {
pg.endShape(mode);
}
+ public PShape createShape() {
+ return pg.createShape();
+ }
+
+ public PShape createShape(Constants.ShapeType type) {
+ return pg.createShape(type);
+ }
+
public void clip(double a, double b, double c, double d) {
pg.clip(a, b, c, d);
}
@@ -440,6 +447,18 @@ public void image(PImage img, double a, double b, double c, double d, int u1, in
pg.image(img, a, b, c, d, u1, v1, u2, v2);
}
+ public void shape(PShape shape) {
+ pg.shape(shape);
+ }
+
+ public void shape(PShape shape, double x, double y) {
+ pg.shape(shape, x, y);
+ }
+
+ public void shape(PShape shape, double a, double b, double c, double d) {
+ pg.shape(shape, a, b, c, d);
+ }
+
public double textAscent() {
return pg.textAscent();
}
@@ -683,8 +702,5 @@ public void resetShader() {
public void filter(PShader shader) {
pg.filter(shader);
}
-
-
-
-
+
}
diff --git a/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/PShapeSVG.java b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/PShapeSVG.java
new file mode 100644
index 00000000..e7471b49
--- /dev/null
+++ b/praxis.video.pgl.code/src/net/neilcsmith/praxis/video/pgl/code/PShapeSVG.java
@@ -0,0 +1,1793 @@
+/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
+
+/*
+ Part of the Processing project - http://processing.org
+
+ Copyright (c) 2012-15 The Processing Foundation
+ Copyright (c) 2006-12 Ben Fry and Casey Reas
+ Copyright (c) 2004-06 Michael Chang
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General
+ Public License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ Boston, MA 02111-1307 USA
+*/
+
+package net.neilcsmith.praxis.video.pgl.code;
+
+import processing.data.*;
+
+// TODO replace these with PMatrix2D
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+
+import java.util.Map;
+import java.util.HashMap;
+import processing.core.PApplet;
+import processing.core.PConstants;
+import processing.core.PGraphics;
+import processing.core.PMatrix2D;
+import processing.core.PShape;
+
+
+/**
+ * This class is not part of the Processing API and should not be used
+ * directly. Instead, use loadShape() and methods like it, which will make
+ * use of this class. Using this class directly will cause your code to break
+ * when combined with future versions of Processing.
+ *
+ * SVG stands for Scalable Vector Graphics, a portable graphics format.
+ * It is a vector format so it allows for "infinite" resolution and relatively
+ * small file sizes. Most modern media software can view SVG files, including
+ * Adobe products, Firefox, etc. Illustrator and Inkscape can edit SVG files.
+ * View the SVG specification here.
+ *
+ * We have no intention of turning this into a full-featured SVG library.
+ * The goal of this project is a basic shape importer that originally was small
+ * enough to be included with applets, meaning that its download size should be
+ * in the neighborhood of 25-30 Kb. Though we're far less limited nowadays on
+ * size constraints, we remain extremely limited in terms of time, and do not
+ * have volunteers who are available to maintain a larger SVG library.
+ *
+ * For more sophisticated import/export, consider the
+ * Batik
+ * library from the Apache Software Foundation.
+ *
+ * Batik is used in the SVG Export library in Processing 3, however using it
+ * for full SVG import is still a considerable amount of work. Wiring it to
+ * Java2D wouldn't be too bad, but using it with OpenGL, JavaFX, and features
+ * like begin/endRecord() and begin/endRaw() would be considerable effort.
+ *
+ * Future improvements to this library may focus on this properly supporting
+ * a specific subset of SVG, for instance the simpler SVG profiles known as
+ * SVG Tiny or Basic,
+ * although we still would not support the interactivity options.
+ *
+ *
+ *
+ * A minimal example program using SVG:
+ * (assuming a working moo.svg is in your data folder)
+ *
+ *
+ */
+class PShapeSVG extends PShape {
+ XML element;
+
+ /// Values between 0 and 1.
+ protected float opacity;
+ float strokeOpacity;
+ float fillOpacity;
+
+ /** Width of containing SVG (used for percentages). */
+ protected float svgWidth;
+
+ /** Height of containing SVG (used for percentages). */
+ protected float svgHeight;
+
+ /** √((w² + h²)/2) of containing SVG (used for percentages). */
+ protected float svgSizeXY;
+
+ protected Gradient strokeGradient;
+ String strokeName; // id of another object, gradients only?
+
+ protected Gradient fillGradient;
+ String fillName; // id of another object
+
+
+ /**
+ * Initializes a new SVG object from the given XML object.
+ */
+ public PShapeSVG(XML svg) {
+ this(null, svg, true);
+
+ if (!svg.getName().equals("svg")) {
+ if (svg.getName().toLowerCase().equals("html")) {
+ // Common case is that files aren't downloaded properly
+ throw new RuntimeException("This appears to be a web page, not an SVG file.");
+ } else {
+ throw new RuntimeException("The root node is not