From c9b8cda267d09965e4788a9c2dea04c84d78779a Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Sun, 2 Feb 2020 14:21:35 +0100 Subject: [PATCH] Fix annotations in orx-fx --- orx-fx/src/main/kotlin/blur/GaussianBlur.kt | 2 +- orx-fx/src/main/kotlin/blur/HashBlur.kt | 2 +- orx-fx/src/main/kotlin/dither/ADither.kt | 20 ++++++++------------ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/orx-fx/src/main/kotlin/blur/GaussianBlur.kt b/orx-fx/src/main/kotlin/blur/GaussianBlur.kt index 05969265..61516978 100644 --- a/orx-fx/src/main/kotlin/blur/GaussianBlur.kt +++ b/orx-fx/src/main/kotlin/blur/GaussianBlur.kt @@ -1,9 +1,9 @@ package org.openrndr.extra.fx.blur -import jdk.jfr.Description import org.openrndr.draw.Filter import org.openrndr.draw.Shader import org.openrndr.extra.fx.filterFragmentCode +import org.openrndr.extra.parameters.Description import org.openrndr.extra.parameters.DoubleParameter import org.openrndr.extra.parameters.IntParameter diff --git a/orx-fx/src/main/kotlin/blur/HashBlur.kt b/orx-fx/src/main/kotlin/blur/HashBlur.kt index bdb7826b..d43b7d59 100644 --- a/orx-fx/src/main/kotlin/blur/HashBlur.kt +++ b/orx-fx/src/main/kotlin/blur/HashBlur.kt @@ -1,9 +1,9 @@ package org.openrndr.extra.fx.blur -import jdk.jfr.Description import org.openrndr.draw.Filter import org.openrndr.draw.Shader import org.openrndr.extra.fx.filterFragmentCode +import org.openrndr.extra.parameters.Description import org.openrndr.extra.parameters.DoubleParameter import org.openrndr.extra.parameters.IntParameter diff --git a/orx-fx/src/main/kotlin/dither/ADither.kt b/orx-fx/src/main/kotlin/dither/ADither.kt index 4a211104..5a5fa36a 100644 --- a/orx-fx/src/main/kotlin/dither/ADither.kt +++ b/orx-fx/src/main/kotlin/dither/ADither.kt @@ -3,20 +3,16 @@ package org.openrndr.extra.fx.dither import org.openrndr.draw.Filter import org.openrndr.draw.Shader import org.openrndr.extra.fx.filterFragmentCode +import org.openrndr.extra.parameters.Description +import org.openrndr.extra.parameters.IntParameter +@Description("ADither") +class ADither: Filter(Shader.createFromCode(filterVertexCode, filterFragmentCode("dither/a-dither.frag"))) { + @IntParameter("pattern index", 0, 3) + var pattern: Int by parameters -class ADither: Filter(Shader.createFromCode(Filter.filterVertexCode, filterFragmentCode("dither/a-dither.frag"))) { - var pattern: Int - set(value) { - parameters["pattern"] = value - } - get() = parameters["pattern"] as Int - - var levels: Int - set(value) { - parameters["levels"] = value; - } - get() = parameters["levels"] as Int + @IntParameter("levels", 1, 64) + var levels: Int by parameters init { levels = 4