PathElement

Companion:
class
Source:
PathElement.scala
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
Source:
Mirror.scala

The name of the type

The name of the type

Inherited from:
Mirror
Source:
Mirror.scala

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.

Source:
PathElement.scala
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.

Source:
PathElement.scala
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.

Source:
PathElement.scala
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

Construct an equilateral triangle

Construct an equilateral triangle

Source:
PathElement.scala

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.

Source:
PathElement.scala
def regularPolygon(sides: Int, radius: Double): List[PathElement]

Construct a regular polygon

Construct a regular polygon

Source:
PathElement.scala
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

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

Construct a star

Construct a star

Source:
PathElement.scala

Concrete fields