Path

Properties

Link copied to clipboard
abstract val closed: Boolean
Link copied to clipboard
@Transient
abstract val empty: Boolean
Link copied to clipboard
@Transient
abstract val infinity: T
Link copied to clipboard
@Transient
open val length: Double
Link copied to clipboard
abstract val segments: List<BezierSegment<T>>

Functions

Link copied to clipboard
open fun adaptivePositions(distanceTolerance: Double = 0.5): List<T>

Recursively subdivides linear Segment2Ds to approximate Bézier curves.

Link copied to clipboard
open fun adaptivePositionsWithT(distanceTolerance: Double = 0.5): List<Pair<T, Double>>
Link copied to clipboard
open fun curvature(ut: Double): Double
Link copied to clipboard
open fun direction(ut: Double): T
Link copied to clipboard
open fun equidistantPositions(pointCount: Int, distanceTolerance: Double = 0.5): List<T>

Returns specified amount of points of equal distance from each other, measured along the path. The first point is the start of the path, the last point is the end of an open path.

Link copied to clipboard
open fun equidistantPositionsWithT(pointCount: Int, distanceTolerance: Double = 0.5): List<Pair<T, Double>>

Returns specified amount of points of equal distance from each other, measured along the path, with their path parameter. The first point is the start of the path, the last point is the end of an open path.

Link copied to clipboard
open fun pointAtLength(length: Double, distanceTolerance: Double = 0.5): T

Calculates the point at a given distance along this ShapeContour.

Link copied to clipboard
open fun position(ut: Double): T

Returns a point on the path of the ShapeContour.

Link copied to clipboard
open fun segment(ut: Double): Pair<Int, Double>

Returns segment number and segment offset in a ShapeContour for the given ut.

Link copied to clipboard
abstract fun sub(t0: Double, t1: Double): Path<T>
Link copied to clipboard
open fun tForLength(length: Double): Double

Estimates the t value for a given length.