Files
orx/orx-shade-styles/src/jvmDemo/kotlin/DemoRadialGradient01.kt
Abe Pazos c8f7dd52c6 Demos: ensure all use fun main() = application {
- Adjust some demo window sizes.
- Replace Random.double by Double.uniform
- Tweak some demos so screenshots look more interesting
2025-01-26 20:57:04 +01:00

18 lines
500 B
Kotlin

import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.shadestyles.radialGradient
import kotlin.math.cos
fun main() = application {
program {
extend {
drawer.shadeStyle = radialGradient(
ColorRGBa.PINK,
ColorRGBa.PINK.toHSVa().shiftHue(180.0).shade(0.5).toRGBa(),
exponent = cos(seconds) * 0.5 + 0.5
)
drawer.rectangle(120.0, 40.0, 400.0, 400.0)
}
}
}