Shape

doodle.algebra.Shape
trait Shape extends Algebra

Higher level shape primitives. These draw common geometric shapes with the center of the shape the origin of the bounding box.

Attributes

Source:
Shape.scala
Graph
Supertypes
trait Algebra
class Object
trait Matchable
class Any
Known subtypes
trait GenericShape[G]
trait Basic

Members list

Concise view

Type members

Inherited types

type Drawing[_]

The effect type that methods on this algebra produce. Represents an effect that, when run, will draw something and produce a value.

The effect type that methods on this algebra produce. Represents an effect that, when run, will draw something and produce a value.

Attributes

Inherited from:
Algebra
Source:
Algebra.scala

Value members

Abstract methods

def circle(diameter: Double): Drawing[Unit]

A circle with the given diameter. We use diamter rather than radius so circle(100) has the same size as square(100)

A circle with the given diameter. We use diamter rather than radius so circle(100) has the same size as square(100)

Attributes

Source:
Shape.scala

The empty shape, which is no shape at all.

The empty shape, which is no shape at all.

Attributes

Source:
Shape.scala
def rectangle(width: Double, height: Double): Drawing[Unit]

A rectangle with the given width and height.

A rectangle with the given width and height.

Attributes

Source:
Shape.scala
def square(width: Double): Drawing[Unit]

A square with the given side length.

A square with the given side length.

Attributes

Source:
Shape.scala
def triangle(width: Double, height: Double): Drawing[Unit]

An isoceles triangle with the given width and height.

An isoceles triangle with the given width and height.

Attributes

Source:
Shape.scala

Implicits

Inherited implicits

Attributes

Inherited from:
Algebra
Source:
Algebra.scala