Fixes to orx-color and orx-shapes (#296)

This commit is contained in:
Abe Pazos
2023-03-21 09:57:26 +01:00
committed by GitHub
parent 8e3e4bddb0
commit 7412ae4595
5 changed files with 109 additions and 17 deletions

View File

@@ -0,0 +1,32 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.shapes.Net
import org.openrndr.shape.Circle
import kotlin.math.sin
fun main() {
application {
program {
extend {
drawer.clear(ColorRGBa.BLACK)
drawer.stroke = ColorRGBa.WHITE
drawer.fill = ColorRGBa.PINK
val a = drawer.bounds.position(0.7, 0.5)
val b = drawer.bounds.position(0.3, 0.5)
val c = Circle(
drawer.bounds.position(
sin(seconds) * 0.35 + 0.5,
sin(seconds * 2) * 0.25 + 0.5
), 50.0
)
val net = Net(a, b, c)
drawer.circle(a, 10.0)
drawer.circle(b, 10.0)
drawer.circle(c)
drawer.strokeWeight = 2.0
drawer.contour(net.contour)
}
}
}
}