Improve demos for better screenshots, cleanup

This commit is contained in:
Abe Pazos
2020-05-20 14:08:31 +02:00
committed by Edwin Jakobs
parent d52875769e
commit 677f821ca8
10 changed files with 61 additions and 35 deletions

View File

@@ -16,6 +16,13 @@ enum class BackgroundColors {
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val gui = GUI()
gui.compartmentsCollapsedByDefault = false
val settings = @Description("Settings") object {
@@ -24,11 +31,6 @@ fun main() = application {
}
gui.add(settings)
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend(gui)
extend {
when(settings.option) {

View File

@@ -11,6 +11,13 @@ import org.openrndr.shape.Circle
*/
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val gui = GUI()
gui.compartmentsCollapsedByDefault = false
@@ -28,11 +35,6 @@ fun main() = application {
var radii = mutableListOf(5.0, 6.0, 8.0, 14.0, 20.0, 30.0)
}
gui.add(settings)
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend(gui)
extend {
drawer.fill = settings.color

View File

@@ -1,4 +1,5 @@
import org.openrndr.application
import org.openrndr.extensions.SingleScreenshot
import org.openrndr.extra.gui.GUI
import org.openrndr.extra.parameters.Description
import org.openrndr.extra.parameters.XYParameter
@@ -11,7 +12,15 @@ fun main() = application {
}
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val gui = GUI()
gui.compartmentsCollapsedByDefault = false
val settings = @Description("Settings") object {
@XYParameter("Position", 0.0, 800.0, 0.0, 800.0,