Package-level declarations

Types

Link copied to clipboard
object Arc
Link copied to clipboard

Port of the operations of the library Bezier.JS with some adjustments, Original library created by Pomax: https://github.com/Pomax/bezierjs Based on algorithms described here: https://pomax.github.io/bezierinfo/

Link copied to clipboard
interface Curve
Link copied to clipboard
data class CurveLUT(val curve: Curve, val points: PointArrayList, val ts: DoubleArrayList, _estimatedLengths: DoubleArrayList)
Link copied to clipboard
data class Curves(val beziers: List<Bezier>, val closed: Boolean) : Curve, Extra
Link copied to clipboard
data class CurveSplit(val base: Bezier, val left: SubBezier, val right: SubBezier, val t: Ratio, val hull: PointList?)
Link copied to clipboard
interface StrokePoints

A generic stroke points with either x, y or x, y, dx, dy, dist, distMax components when having separate components, it is possible to later scale the stroke without regenerating it by adjusting the scale component

Link copied to clipboard
class StrokePointsBuilder(val width: Double, val mode: StrokePointsMode = StrokePointsMode.NON_SCALABLE_POS, val generateDebug: Boolean = false) : StrokePoints
Link copied to clipboard
Link copied to clipboard
class SubBezier(val curve: Bezier, val t1: Ratio, val t2: Ratio, val parent: Bezier?)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
inline fun List<Curves>.fastForEachBezier(block: (Bezier) -> Unit)
Link copied to clipboard
fun Curve.getEquidistantPoints(count: Int = this.recommendedDivisions(), out: PointArrayList = PointArrayList()): PointList
Link copied to clipboard
fun Curve.getPoints(count: Int = this.recommendedDivisions(), out: PointArrayList = PointArrayList()): PointList
Link copied to clipboard
Link copied to clipboard
@JvmName(name = "ListCurve_toCurves")
fun List<Bezier>.toCurves(closed: Boolean): Curves
@JvmName(name = "ListCurves_toCurves")
fun List<Curves>.toCurves(closed: Boolean = this.last().closed): Curves
Link copied to clipboard
fun Curves.toDashes(pattern: DoubleArray?, offset: Double = 0.0): List<Curves>
Link copied to clipboard
Link copied to clipboard
fun Curves.toStrokePointsList(info: StrokeInfo, mode: StrokePointsMode = StrokePointsMode.NON_SCALABLE_POS, generateDebug: Boolean = false, forceClosed: Boolean? = null): List<StrokePoints>
fun VectorPath.toStrokePointsList(info: StrokeInfo, mode: StrokePointsMode = StrokePointsMode.NON_SCALABLE_POS, generateDebug: Boolean = false, forceClosed: Boolean? = null): List<StrokePoints>
fun List<Curves>.toStrokePointsList(info: StrokeInfo, mode: StrokePointsMode = StrokePointsMode.NON_SCALABLE_POS, generateDebug: Boolean = false, forceClosed: Boolean? = null): List<StrokePoints>
fun List<Curves>.toStrokePointsList(width: Double, join: LineJoin = LineJoin.MITER, startCap: LineCap = LineCap.BUTT, endCap: LineCap = LineCap.BUTT, miterLimit: Double = 10.0, mode: StrokePointsMode = StrokePointsMode.NON_SCALABLE_POS, lineDash: DoubleList? = null, lineDashOffset: Double = 0.0, generateDebug: Boolean = false, forceClosed: Boolean? = null): List<StrokePoints>

fun Curves.toStrokePointsList(width: Double, join: LineJoin = LineJoin.MITER, startCap: LineCap = LineCap.BUTT, endCap: LineCap = LineCap.BUTT, miterLimit: Double = 10.0, mode: StrokePointsMode = StrokePointsMode.NON_SCALABLE_POS, lineDash: DoubleList? = null, lineDashOffset: Double = 0.0, generateDebug: Boolean = false): List<StrokePoints>

Useful for drawing

Link copied to clipboard
fun Curve.toVectorPath(out: VectorPath = VectorPath()): VectorPath
fun List<Curve>.toVectorPath(out: VectorPath = VectorPath()): VectorPath