# PathElement

Companion
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

## Type members

### Classlikes

final case
class BezierCurveTo(cp1: Point, cp2: Point, to: Point) extends PathElement
final case
class LineTo(to: Point) extends PathElement
final case
class MoveTo(to: Point) extends PathElement

### Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

## Value members

### Concrete methods

def catmulRom(points: Seq[Point], tension: Double): List[PathElement]

Interpolate a spline (a curve) that passes through all the given points, using the Catmul Rom formulation (see, e.g., https://en.wikipedia.org/wiki/Cubic_Hermite_spline)

Interpolate a spline (a curve) that passes through all the given points, using the Catmul Rom formulation (see, e.g., https://en.wikipedia.org/wiki/Cubic_Hermite_spline)

The tension can be changed to control how tightly the curve turns. It defaults to 0.5.

The Catmul Rom algorithm requires a point before and after each pair of points that define the curve. To meet this condition for the first and last points in `points`, they are repeated.

If `points` has less than two elements an empty List is returned.

def circle(center: Point, diameter: Double): List[PathElement]

Utility to construct a `List[PathElement]` that represents a circle.

Utility to construct a `List[PathElement]` that represents a circle.

def circle(x: Double, y: Double, diameter: Double): List[PathElement]

Utility to construct a `List[PathElement]` that represents a circle.

Utility to construct a `List[PathElement]` that represents a circle.

def curveTo(cp1: Point, cp2: Point, to: Point): PathElement
def curveTo(cp1X: Double, cp1Y: Double, cp2X: Double, cp2Y: Double, toX: Double, toY: Double): PathElement
def curveTo(cp1R: Double, cp1Angle: Angle, cp2R: Double, cp2Angle: Angle, toR: Double, toAngle: Angle): PathElement
def equilateralTriangle(width: Double): List[PathElement]

Construct an equilateral triangle

Construct an equilateral triangle

def interpolatingSpline(points: Seq[Point]): List[PathElement]

Construct list of bezier curves that are smoothly connected and intersect all the given points. Defaults to `catmulRom` with the default tension.

Construct list of bezier curves that are smoothly connected and intersect all the given points. Defaults to `catmulRom` with the default tension.

def lineTo(point: Point): PathElement
def lineTo(x: Double, y: Double): PathElement
def lineTo(r: Double, angle: Angle): PathElement
def moveTo(point: Point): PathElement
def moveTo(x: Double, y: Double): PathElement
def moveTo(r: Double, angle: Angle): PathElement
def regularPolygon(sides: Int, radius: Double): List[PathElement]

Construct a regular polygon

Construct a regular polygon

def rightArrow(width: Double, height: Double): List[PathElement]
def roundedRectangle(width: Double, height: Double, radius: Double): List[PathElement]

Construct a rounded rectangle with the given width, height, and corner radius

Construct a rounded rectangle with the given width, height, and corner radius

def star(points: Int, outerRadius: Double, innerRadius: Double): List[PathElement]

Construct a star

Construct a star

### Concrete fields

val oneOnSqrt3: Double