Add ApplicationPreload mechanism to collectScreenshots

This commit is contained in:
Edwin Jakobs
2021-08-31 22:43:39 +02:00
parent 46dfc06ab1
commit bf11867232
62 changed files with 94 additions and 379 deletions

View File

@@ -21,12 +21,6 @@ fun main() {
height = 800
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
// helper to get screen locations using normalized uv values
fun pos(u: Double, v: Double) = drawer.bounds.position(u, v)
val c0 = LineSegment(pos(0.1, 0.1), pos(0.9, 0.1))

View File

@@ -21,12 +21,6 @@ fun main() {
height = 800
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val c = Circle(width / 2.0, height / 2.0, 350.0).contour
val bp = bezierPatch(c)

View File

@@ -21,12 +21,6 @@ fun main() {
height = 800
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val bp = bezierPatch(
Circle(width / 2.0, height / 2.0, 350.0).contour
)

View File

@@ -18,12 +18,6 @@ fun main() {
height = 800
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val bp = bezierPatch(
Circle(drawer.bounds.center, 350.0).contour
//Rectangle.fromCenter(drawer.bounds.center, 550.0).contour

View File

@@ -28,13 +28,6 @@ fun main() {
multisample = WindowMultisample.SampleCount(8)
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
multisample = BufferMultisample.SampleCount(8)
}
}
val c0 = Segment3D(Vector3(-5.0, 0.0, -9.0), Vector3(5.0, 0.0, -9.0))
val c1 = Segment3D(Vector3(-5.0, -5.0, -3.0), Vector3(5.0, -5.0, -3.0))
val c2 = Segment3D(Vector3(-5.0, 5.0, 3.0), Vector3(5.0, 5.0, 3.0))

View File

@@ -8,11 +8,6 @@ import org.openrndr.shape.Circle
fun main() {
application {
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.clear(ColorRGBa.PINK)
val bp = bezierPatch(

View File

@@ -14,11 +14,6 @@ fun main() {
height = 720
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.clear(ColorRGBa.BLACK)
val bp2 = bezierPatch(

View File

@@ -22,11 +22,6 @@ fun main() {
height = 720
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.clear(ColorRGBa.BLACK)
val colors = listOf(

View File

@@ -23,12 +23,6 @@ fun main() {
height = 800
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
val c0 = Circle(width / 3.0, height / 2.0, 150.0).contour
val bp0 = bezierPatch(c0)

View File

@@ -10,11 +10,6 @@ fun main() {
height = 800
}
program {
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.fill = ColorRGBa.WHITE.opacify(0.25)
drawer.stroke = ColorRGBa.PINK

View File

@@ -8,12 +8,6 @@ import kotlin.math.cos
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.fill = ColorRGBa.PINK
drawer.stroke = ColorRGBa.WHITE

View File

@@ -7,12 +7,6 @@ import kotlin.math.sin
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.fill = ColorRGBa.PINK
drawer.stroke = ColorRGBa.WHITE

View File

@@ -9,12 +9,6 @@ import kotlin.math.sin
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.fill = ColorRGBa.PINK
drawer.stroke = ColorRGBa.WHITE

View File

@@ -6,12 +6,6 @@ import kotlin.math.cos
fun main() = application {
program {
// -- this block is for automation purposes only
if (System.getProperty("takeScreenshot") == "true") {
extend(SingleScreenshot()) {
this.outputFile = System.getProperty("screenshotPath")
}
}
extend {
drawer.fill = ColorRGBa.WHITE
drawer.stroke = ColorRGBa.PINK