File tree Expand file tree Collapse file tree 5 files changed +13
-32
lines changed Expand file tree Collapse file tree 5 files changed +13
-32
lines changed Original file line number Diff line number Diff line change
1
+ import ScreenshotsHelper.collectScreenshots
2
+
1
3
sourceSets {
2
- demo {
4
+ val main by getting { }
5
+ val demo by creating {
3
6
java {
4
- srcDirs = [ " src/demo/kotlin" ]
7
+ srcDir( " src/demo/kotlin" )
5
8
compileClasspath + = main.getCompileClasspath()
6
9
runtimeClasspath + = main.getRuntimeClasspath()
7
10
}
8
11
}
12
+ collectScreenshots(project, demo) { }
9
13
}
10
14
11
- def boofcvVersion = " 0.37"
15
+ val openrndrVersion: String by rootProject.extra
16
+ val openrndrOS: String by rootProject.extra
17
+ val boofcvVersion = " 0.37"
18
+
19
+ val demoImplementation by configurations.getting {}
20
+ val demoRuntimeOnly by configurations.getting {}
12
21
13
22
dependencies {
14
23
api(" org.boofcv:boofcv-core:$boofcvVersion " )
@@ -17,4 +26,4 @@ dependencies {
17
26
demoRuntimeOnly(" org.openrndr:openrndr-gl3:$openrndrVersion " )
18
27
demoRuntimeOnly(" org.openrndr:openrndr-gl3-natives-$openrndrOS :$openrndrVersion " )
19
28
demoImplementation(sourceSets.getByName(" main" ).output)
20
- }
29
+ }
Original file line number Diff line number Diff line change @@ -16,14 +16,6 @@ import kotlin.math.sin
16
16
fun main () {
17
17
application {
18
18
program {
19
-
20
- // -- this block is for automation purposes only
21
- if (System .getProperty(" takeScreenshot" ) == " true" ) {
22
- extend(SingleScreenshot ()) {
23
- this .outputFile = System .getProperty(" screenshotPath" )
24
- }
25
- }
26
-
27
19
// Load an image, convert to BoofCV format using orx-boofcv
28
20
val input = loadImage(" demo-data/images/image-001.png" ).toGrayF32()
29
21
Original file line number Diff line number Diff line change @@ -8,12 +8,6 @@ import org.openrndr.extensions.SingleScreenshot
8
8
fun main () {
9
9
application {
10
10
program {
11
- if (System .getProperty(" takeScreenshot" ) == " true" ) {
12
- extend(SingleScreenshot ()) {
13
- this .outputFile = System .getProperty(" screenshotPath" )
14
- }
15
- }
16
-
17
11
// Load an image, convert to BoofCV format using orx-boofcv
18
12
val input = loadImage(" demo-data/images/image-001.png" )
19
13
Original file line number Diff line number Diff line change @@ -8,12 +8,6 @@ import org.openrndr.extensions.SingleScreenshot
8
8
fun main () {
9
9
application {
10
10
program {
11
- if (System .getProperty(" takeScreenshot" ) == " true" ) {
12
- extend(SingleScreenshot ()) {
13
- this .outputFile = System .getProperty(" screenshotPath" )
14
- }
15
- }
16
-
17
11
// Load an image, convert to BoofCV format using orx-boofcv
18
12
val input = loadImage(" demo-data/images/image-001.png" )
19
13
val scaled = input.resizeTo(input.width / 3 )
Original file line number Diff line number Diff line change @@ -21,14 +21,6 @@ import org.openrndr.shape.toContour
21
21
fun main () {
22
22
application {
23
23
program {
24
-
25
- // -- this block is for automation purposes only
26
- if (System .getProperty(" takeScreenshot" ) == " true" ) {
27
- extend(SingleScreenshot ()) {
28
- this .outputFile = System .getProperty(" screenshotPath" )
29
- }
30
- }
31
-
32
24
// Create a buffer where to draw something for boofcv
33
25
val rt = renderTarget(width, height) {
34
26
colorBuffer()
You can’t perform that action at this time.
0 commit comments