[orx-image-fit] Tweak demo comments

This commit is contained in:
Abe Pazos
2025-10-01 20:44:11 +02:00
parent 2b56cd5502
commit 0c2d34784f
2 changed files with 35 additions and 22 deletions

View File

@@ -6,6 +6,17 @@ import org.openrndr.extra.noise.shapes.uniformSub
import org.openrndr.extra.shapes.primitives.grid
import kotlin.random.Random
/**
* Demonstrates the `imageFitSub()` method, which allows specifying not only a target `Rectangle`,
* but also a source `Rectangle`, which is used to set the area of the original image we want to fit
* into the target.
*
* The program also demonstrates the `Rectangle.uniformSub` method, which returns a random sub-rectangle
* taking into consideration the minimum and maximum width and height arguments.
*
* Notice the trick used to generate unique random results changing only once per second by using
* the current seconds as an integer seed.
*/
fun main() = application {
configure {
width = 720