[orx-processing] Upgrade to 4.4.0, add demo with curves

This commit is contained in:
Abe Pazos
2025-04-28 13:16:21 +03:00
parent 6ff081f19a
commit 8c5c4c9a97
3 changed files with 28 additions and 1 deletions

View File

@@ -11,4 +11,5 @@ dependencies {
implementation(libs.openrndr.math)
implementation(libs.kotlin.reflect)
demoRuntimeOnly(libs.slf4j.simple)
demoImplementation(project(":orx-shapes"))
}

View File

@@ -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)
}
}
}