Upgrade to JDK 17. Add @JvmRecord annotations

This commit is contained in:
Edwin Jakobs
2024-06-01 07:31:44 +02:00
parent 06f593053b
commit 78fbff54c5
38 changed files with 94 additions and 33 deletions

View File

@@ -2,7 +2,9 @@ package org.openrndr.extra.shapes.adjust
import org.openrndr.math.Vector2
import org.openrndr.shape.ShapeContour
import kotlin.jvm.JvmRecord
@JvmRecord
data class ContourAdjusterEdge(val contourAdjuster: ContourAdjuster, val segmentIndex: () -> Int) {
val startPosition

View File

@@ -9,6 +9,7 @@ import org.openrndr.math.transforms.buildTransform
import org.openrndr.shape.Segment2D
import org.openrndr.shape.SegmentType
import org.openrndr.shape.ShapeContour
import kotlin.jvm.JvmRecord
import kotlin.math.abs
internal fun Vector2.transformedBy(t: Matrix44, mask: Int = 0x0f, maskRef: Int = 0x0f) =
@@ -38,6 +39,7 @@ fun <E> List<E>.update(vararg updates: Pair<Int, E>): List<E> {
* of changes in the contour topology.
* @since 0.4.4
*/
@JvmRecord
data class ContourEdge(
val contour: ShapeContour,
val segmentIndex: Int,

View File

@@ -5,7 +5,9 @@ import org.openrndr.math.Matrix44
import org.openrndr.math.Vector2
import org.openrndr.math.transforms.buildTransform
import org.openrndr.shape.ShapeContour
import kotlin.jvm.JvmRecord
@JvmRecord
data class ContourVertex(
val contour: ShapeContour,
val segmentIndex: Int,

View File

@@ -1,9 +1,12 @@
package org.openrndr.extra.shapes.adjust
import org.openrndr.shape.Segment2D
import kotlin.jvm.JvmRecord
sealed interface SegmentOperation {
@JvmRecord
data class Remove(val index: Int, val amount: Int) : SegmentOperation
@JvmRecord
data class Insert(val index: Int, val amount: Int) : SegmentOperation
}