[orx-shapes] Add Arc, Net, Pulley, Tear and bounds tools

This commit is contained in:
Edwin Jakobs
2023-02-02 10:06:05 +01:00
parent aabdf9fc0e
commit aed6efb87a
8 changed files with 258 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
package org.openrndr.extra.shapes.bounds
import org.openrndr.shape.*
import kotlin.jvm.JvmName
/**
* Evaluates the bounds around all [ShapeContour] instances in the [Iterable]
*/
val Iterable<ShapeContour>.bounds : Rectangle
@JvmName("shapeContourBounds")
get() = map {
it.bounds
}.bounds
/**
* Evaluates the bounds around all [Shape] instances in the [Iterable]
*/
val Iterable<Shape>.bounds : Rectangle
@JvmName("shapeBounds")
get() = map {
it.bounds
}.bounds
/**
* Evaluates the bounds around all [Segment] instances in the [Iterable]
*/
val Iterable<Segment>.bounds : Rectangle
@JvmName("segmentBounds")
get() = map {
it.bounds
}.bounds