PathElement

doodle.core.PathElement$
See thePathElement companion class

Attributes

Companion:
class
Source:
PathElement.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

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

Attributes

Source:
PathElement.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any
final case class LineTo(to: Point) extends PathElement

Attributes

Source:
PathElement.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any
final case class MoveTo(to: Point) extends PathElement

Attributes

Source:
PathElement.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source:
Mirror.scala

The name of the type

The name of the type

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

Source:
PathElement.scala
def curveTo(cp1: Point, cp2: Point, to: Point): PathElement

Attributes

Source:
PathElement.scala
def curveTo(cp1X: Double, cp1Y: Double, cp2X: Double, cp2Y: Double, toX: Double, toY: Double): PathElement

Attributes

Source:
PathElement.scala
def curveTo(cp1R: Double, cp1Angle: Angle, cp2R: Double, cp2Angle: Angle, toR: Double, toAngle: Angle): PathElement

Attributes

Source:
PathElement.scala

Construct an equilateral triangle

Construct an equilateral triangle

Attributes

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.

Attributes

Source:
PathElement.scala
def lineTo(point: Point): PathElement

Attributes

Source:
PathElement.scala

Attributes

Source:
PathElement.scala
def lineTo(r: Double, angle: Angle): PathElement

Attributes

Source:
PathElement.scala
def moveTo(point: Point): PathElement

Attributes

Source:
PathElement.scala

Attributes

Source:
PathElement.scala
def moveTo(r: Double, angle: Angle): PathElement

Attributes

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

Construct a regular polygon

Construct a regular polygon

Attributes

Source:
PathElement.scala
def rightArrow(width: Double, height: Double): List[PathElement]

Attributes

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

Attributes

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

Construct a star

Construct a star

Attributes

Source:
PathElement.scala

Concrete fields

Attributes

Source:
PathElement.scala