From bbc855e4c728da1f652a5aa9525c9512527261ff Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Thu, 7 Dec 2023 10:06:10 +0100 Subject: [PATCH] [orx-shapes] Make vertex/edgeSelection private. Add CAVertex.moveTo --- orx-shapes/src/commonMain/kotlin/adjust/ContourAdjusterVertex.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/orx-shapes/src/commonMain/kotlin/adjust/ContourAdjusterVertex.kt b/orx-shapes/src/commonMain/kotlin/adjust/ContourAdjusterVertex.kt index 5abd2c4b..6f0f8414 100644 --- a/orx-shapes/src/commonMain/kotlin/adjust/ContourAdjusterVertex.kt +++ b/orx-shapes/src/commonMain/kotlin/adjust/ContourAdjusterVertex.kt @@ -45,6 +45,7 @@ class ContourAdjusterVertex(val contourAdjuster: ContourAdjuster, val segmentInd fun remove(updateTangents: Boolean = true) = wrap { remove(updateTangents) } fun moveBy(translation: Vector2, updateTangents: Boolean = true) = wrap { movedBy(translation, updateTangents) } + fun moveTo(position: Vector2, updateTangents: Boolean = true) = wrap { movedBy(position - this.position, updateTangents) } fun rotate(rotationInDegrees: Double) = wrap { rotatedBy(rotationInDegrees) } fun scale(scaleFactor: Double) = wrap { scaledBy(scaleFactor) }