Shape

trait Shape[F[_]] extends Algebra[F]

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

trait Algebra[F]
class Object
trait Matchable
class Any
trait GenericShape[F]
trait Basic[F]

Value members

Abstract methods

def circle(diameter: Double): F[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)

def empty: F[Unit]

The empty shape, which is no shape at all.

The empty shape, which is no shape at all.

def rectangle(width: Double, height: Double): F[Unit]

A rectangle with the given width and height.

A rectangle with the given width and height.

def square(width: Double): F[Unit]

A square with the given side length.

A square with the given side length.

def triangle(width: Double, height: Double): F[Unit]

An isoceles triangle with the given width and height.

An isoceles triangle with the given width and height.