From 8c5c4c9a97ec7c771171da4eff07468a07e35df9 Mon Sep 17 00:00:00 2001 From: Abe Pazos Date: Mon, 28 Apr 2025 13:16:21 +0300 Subject: [PATCH] [orx-processing] Upgrade to 4.4.0, add demo with curves --- gradle/libs.versions.toml | 2 +- orx-jvm/orx-processing/build.gradle.kts | 1 + .../src/demo/kotlin/DemoPShape02.kt | 26 +++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 orx-jvm/orx-processing/src/demo/kotlin/DemoPShape02.kt diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 49dbc451..6f619b3c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -29,7 +29,7 @@ ktor = "3.1.2" jgit = "7.1.0.202411261347-r" javaosc = "0.9" jsoup = "1.19.1" -processing = "4.3.4" +processing = "4.4.0" [libraries] kotlin-logging = { group = "io.github.oshai", name = "kotlin-logging", version.ref = "kotlinLogging" } diff --git a/orx-jvm/orx-processing/build.gradle.kts b/orx-jvm/orx-processing/build.gradle.kts index 435d7811..3e384fe7 100644 --- a/orx-jvm/orx-processing/build.gradle.kts +++ b/orx-jvm/orx-processing/build.gradle.kts @@ -11,4 +11,5 @@ dependencies { implementation(libs.openrndr.math) implementation(libs.kotlin.reflect) demoRuntimeOnly(libs.slf4j.simple) + demoImplementation(project(":orx-shapes")) } \ No newline at end of file diff --git a/orx-jvm/orx-processing/src/demo/kotlin/DemoPShape02.kt b/orx-jvm/orx-processing/src/demo/kotlin/DemoPShape02.kt new file mode 100644 index 00000000..cc95a3dc --- /dev/null +++ b/orx-jvm/orx-processing/src/demo/kotlin/DemoPShape02.kt @@ -0,0 +1,26 @@ +import org.openrndr.application +import org.openrndr.color.ColorRGBa +import org.openrndr.extra.processing.PShape +import org.openrndr.extra.processing.toShape +import org.openrndr.extra.shapes.primitives.regularStarRounded + +fun main() = application { + program { + val c = regularStarRounded( + points = 5, + innerRadius = 100.0, + outerRadius = 200.0, + innerFactor = 0.25, + outerFactor = 0.75, + center = drawer.bounds.center + ) + val ps = PShape(c) + val rc = ps.toShape() + extend { + drawer.fill = ColorRGBa.PINK.opacify(0.5) + drawer.shape(rc) + drawer.translate(15.0, 15.0) + drawer.contour(c) + } + } +} \ No newline at end of file