From cce913d26916accf1729e91a93f1b461872cd682 Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Fri, 27 Oct 2023 20:44:54 +0200 Subject: [PATCH] [orx-shapes] Add position to ContourAdjusterVertex --- .../src/commonMain/kotlin/adjust/ContourAdjusterVertex.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/orx-shapes/src/commonMain/kotlin/adjust/ContourAdjusterVertex.kt b/orx-shapes/src/commonMain/kotlin/adjust/ContourAdjusterVertex.kt index 9f695a00..b2516b6b 100644 --- a/orx-shapes/src/commonMain/kotlin/adjust/ContourAdjusterVertex.kt +++ b/orx-shapes/src/commonMain/kotlin/adjust/ContourAdjusterVertex.kt @@ -10,6 +10,11 @@ class ContourAdjusterVertex(val contourAdjuster: ContourAdjuster, val segmentInd contourAdjuster.updateSelection(newVertex.adjustments) } + val position: Vector2 + get() { + return contourAdjuster.contour.segments[segmentIndex()].start + } + fun select() { contourAdjuster.selectVertex(segmentIndex()) }