Fixes and move to jvmDemo (#286)
This commit is contained in:
17
orx-shapes/src/jvmDemo/kotlin/DemoRoundedRectangle.kt
Normal file
17
orx-shapes/src/jvmDemo/kotlin/DemoRoundedRectangle.kt
Normal file
@@ -0,0 +1,17 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.shapes.RoundedRectangle
|
||||
import kotlin.math.cos
|
||||
|
||||
fun main() = application {
|
||||
program {
|
||||
extend {
|
||||
drawer.fill = ColorRGBa.WHITE
|
||||
drawer.stroke = ColorRGBa.PINK
|
||||
val radius = cos(seconds) * 20.0 + 20.0
|
||||
val rectangle = RoundedRectangle(50.0, 50.0, width - 100.0, height - 100.0, radius)
|
||||
drawer.contour(rectangle.contour)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user