ContourAdjusterEdge

data class ContourAdjusterEdge(val contourAdjuster: ContourAdjuster, val segmentIndex: () -> Int)(source)

Constructors

Link copied to clipboard
constructor(contourAdjuster: ContourAdjuster, segmentIndex: () -> Int)

Properties

Link copied to clipboard
Link copied to clipboard

A ContourAdjusterVertex interface for the end-vertex of the edge

Link copied to clipboard
val endPosition: Vector2
Link copied to clipboard
Link copied to clipboard

A link to the edge after this edge

Link copied to clipboard

A link to the edge before this edge

Link copied to clipboard
val segmentIndex: () -> Int
Link copied to clipboard

A ContourAdjusterVertex interface for the start-vertex of the edge

Link copied to clipboard
val startPosition: Vector2
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun moveBy(translation: Vector2, updateTangents: Boolean = true)

Creates a new contour edge by applying a translation to the current edge.

Link copied to clipboard
fun moveControl0By(translation: Vector2)

Moves the first control point of a contour edge by a specified translation vector.

Link copied to clipboard
fun moveControl1By(translation: Vector2)

Moves the second control point (Control1) of a contour edge by a specified translation vector.

Link copied to clipboard
fun moveEndBy(translation: Vector2, updateTangents: Boolean = true)

Moves the end point of the contour edge by the specified translation vector.

Link copied to clipboard
fun moveStartBy(translation: Vector2, updateTangents: Boolean = true)

Moves the starting point of the contour edge by the given translation vector.

Link copied to clipboard
fun normal(t: Double): Vector2
Link copied to clipboard
fun position(t: Double): Vector2
Link copied to clipboard

Replace this edge with a point at t

fun replaceWith(openContour: ShapeContour)

Replaces the current edge with the segments of an open shape contour.

Link copied to clipboard
fun rotate(rotationInDegrees: Double, anchorT: Double = 0.5, updateTangents: Boolean = true)

Rotates the current edge by a specified angle around an anchor point relative to the edge. Optionally updates the tangents of adjacent segments after the rotation.

Link copied to clipboard
fun scale(scaleFactor: Double, anchorT: Double = 0.5)

Scales the current edge by a specified factor, with an optional anchor point determining the scaling center along the edge. The scaling operation updates the tangents of the edge.

Link copied to clipboard
fun select()
Link copied to clipboard
fun splitAt(t: Double)

Split the edge at t

Link copied to clipboard
fun splitIn(numberOfParts: Int)

Split the edge in numberOfParts parts of equal length

Link copied to clipboard
fun sub(t0: Double, t1: Double)

Returns part of the edge between t0 to t1. Preserves topology unless t0 = t1.

Link copied to clipboard
fun toCubic()

Convert the edge to a cubic edge

Link copied to clipboard
fun toLinear()

Convert the edge to a linear edge, truncating control points if those exist

Link copied to clipboard
fun ContourAdjusterEdge.withTunniLine(pointOnLine: Vector2)
Link copied to clipboard
fun ContourAdjusterEdge.withTunniPoint(tunniPoint: Vector2)