[orx-shapes] Remove System.setProperty() add Camera2D to DemoText01.kt
This commit is contained in:
@@ -3,23 +3,23 @@ package text
|
|||||||
import org.openrndr.application
|
import org.openrndr.application
|
||||||
import org.openrndr.color.ColorRGBa
|
import org.openrndr.color.ColorRGBa
|
||||||
import org.openrndr.draw.font.loadFace
|
import org.openrndr.draw.font.loadFace
|
||||||
|
import org.openrndr.extra.camera.Camera2D
|
||||||
import org.openrndr.extra.shapes.bounds.bounds
|
import org.openrndr.extra.shapes.bounds.bounds
|
||||||
import org.openrndr.extra.shapes.text.shapesFromText
|
import org.openrndr.extra.shapes.text.shapesFromText
|
||||||
import org.openrndr.internal.Driver
|
import org.openrndr.internal.Driver
|
||||||
|
|
||||||
fun main() = application {
|
fun main() = application {
|
||||||
System.setProperty("org.openrndr.draw.wait_for_finish", "true")
|
|
||||||
configure {
|
configure {
|
||||||
width = 720
|
width = 720
|
||||||
height = 720
|
height = 720
|
||||||
}
|
}
|
||||||
program {
|
program {
|
||||||
|
|
||||||
val face =
|
val face =
|
||||||
loadFace("https://github.com/IBM/plex/raw/master/packages/plex-mono/fonts/complete/otf/IBMPlexMono-Bold.otf")
|
loadFace("https://github.com/IBM/plex/raw/master/packages/plex-mono/fonts/complete/otf/IBMPlexMono-Bold.otf")
|
||||||
val shapes = shapesFromText(face, "SUCH\nVECTOR\nSUCH\nTEXT", 150.0)
|
val shapes = shapesFromText(face, "SUCH\nVECTOR\nSUCH\nTEXT", 150.0)
|
||||||
|
|
||||||
val bounds = shapes.bounds
|
val bounds = shapes.bounds
|
||||||
|
extend(Camera2D())
|
||||||
extend {
|
extend {
|
||||||
drawer.clear(ColorRGBa.PINK)
|
drawer.clear(ColorRGBa.PINK)
|
||||||
drawer.translate(-bounds.corner)
|
drawer.translate(-bounds.corner)
|
||||||
|
|||||||
Reference in New Issue
Block a user