diff options
| author | Edwin Jakobs <edwin@rndr.studio> | 2019-11-10 14:26:16 +0100 |
|---|---|---|
| committer | Edwin Jakobs <edwin@rndr.studio> | 2019-11-10 14:26:16 +0100 |
| commit | 1ab4b6e53828c09c62edd05161aad51033251776 (patch) | |
| tree | c0ac15613f3b4e9f1fca4a0cb0953ba911e799e4 /src | |
| parent | c0205c03b81a1ebd6061126d87d2e8cd66f65e37 (diff) | |
| download | art-playground-openrndr-1ab4b6e53828c09c62edd05161aad51033251776.tar.gz art-playground-openrndr-1ab4b6e53828c09c62edd05161aad51033251776.zip | |
Add default simple logging
* Bump library versions
* Bump template version
* Small clean-up of TemplateProgram.kt
Diffstat (limited to '')
| -rw-r--r-- | src/main/kotlin/TemplateProgram.kt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/kotlin/TemplateProgram.kt b/src/main/kotlin/TemplateProgram.kt index 3187dc8..c8d0c62 100644 --- a/src/main/kotlin/TemplateProgram.kt +++ b/src/main/kotlin/TemplateProgram.kt @@ -1,8 +1,10 @@ import org.openrndr.application import org.openrndr.color.ColorRGBa -import org.openrndr.draw.FontImageMap +import org.openrndr.draw.loadFont import org.openrndr.draw.loadImage import org.openrndr.draw.tint +import kotlin.math.cos +import kotlin.math.sin fun main() = application { configure { @@ -12,19 +14,19 @@ fun main() = application { program { - val image = loadImage("file:data/images/pm5544.png") - val font = FontImageMap.fromUrl("file:data/fonts/IBMPlexMono-Regular.ttf", 64.0) + val image = loadImage("data/images/pm5544.png") + val font = loadFont("data/fonts/IBMPlexMono-Regular.ttf", 64.0) extend { drawer.drawStyle.colorMatrix = tint(ColorRGBa.WHITE.shade(0.2)) drawer.image(image) drawer.fill = ColorRGBa.PINK - drawer.circle(Math.cos(seconds)*width/2.0+width/2.0, Math.sin(0.5*seconds)*height/2.0 + height/2.0, 140.0) + drawer.circle(cos(seconds) * width / 2.0 + width / 2.0, sin(0.5 * seconds) * height / 2.0 + height / 2.0, 140.0) drawer.fontMap = font drawer.fill = ColorRGBa.WHITE - drawer.text("OPENRNDR", width/2.0, height /2.0) + drawer.text("OPENRNDR", width / 2.0, height / 2.0) } } }
\ No newline at end of file |
