doodle.algebra

Type members

Classlikes

trait Algebra

Base type for algebras that produce results in some effect type Drawing. Users of algebras should use dependent method types (or dependent function types in Scala 3) to return the Drawing type of the method they are passed:

Base type for algebras that produce results in some effect type Drawing. Users of algebras should use dependent method types (or dependent function types in Scala 3) to return the Drawing type of the method they are passed:

def usingAlgebra(algebra: Algebra): algebra.Drawing = ???

All Drawing types are required to implement Applicative

Companion:
object
Source:
Algebra.scala
object Algebra
Companion:
class
Source:
Algebra.scala

Base module for constructors

Base module for constructors

The intention is to assist with type inference for constructors by defining constructors that are parameterized by the Algebra and Drawing types, and instantiating those types within each backend.

Algebras that define constructors should also define a constructor mixin. See e.g. Shape for an example.

Source:
BaseConstructor.scala
trait Bitmap extends Algebra

Constructors for Bitmap algebra

Constructors for Bitmap algebra

Source:
Bitmap.scala
trait Blend extends Algebra

Algebra describing color blending modes.

Algebra describing color blending modes.

Source:
Blend.scala
trait Debug extends Algebra

Algebra for converting a BufferedImage to a picture

Algebra for converting a BufferedImage to a picture

Source:
FromBufferedImage.scala

Constructor for FromBufferedImage algebra

Constructor for FromBufferedImage algebra

Source:
FromBufferedImage.scala
trait FromGifBase64 extends Algebra

Algebra indicating a Picture can be created from a base 64 encoded bitmap in Gif format.

Algebra indicating a Picture can be created from a base 64 encoded bitmap in Gif format.

Source:
FromBase64.scala

Constructor for FromGifBase64 algebra

Constructor for FromGifBase64 algebra

Source:
FromBase64.scala
trait FromJpgBase64 extends Algebra

Algebra indicating a Picture can be created from a base 64 encoded bitmap in JPG format.

Algebra indicating a Picture can be created from a base 64 encoded bitmap in JPG format.

Source:
FromBase64.scala

Constructor for FromJpgBase64 algebra

Constructor for FromJpgBase64 algebra

Source:
FromBase64.scala
trait FromPngBase64 extends Algebra

Algebra indicating a Picture can be created from a base 64 encoded bitmap in PNG format.

Algebra indicating a Picture can be created from a base 64 encoded bitmap in PNG format.

Source:
FromBase64.scala

Constructor for FromPngBase64 algebra

Constructor for FromPngBase64 algebra

Source:
FromBase64.scala
trait Layout extends Algebra
trait Path extends Algebra
Source:
Path.scala

Constructors for Path algebra

Constructors for Path algebra

Source:
Path.scala
trait Picture[-Alg <: Algebra, A]

Represents a picture, which is a function from a tagless final algebra to some type F that represents drawing a picture with result A. Has a monad instance if F does.

Represents a picture, which is a function from a tagless final algebra to some type F that represents drawing a picture with result A. Has a monad instance if F does.

Companion:
object
Source:
Picture.scala
object Picture
Companion:
class
Source:
Picture.scala
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.

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

Source:
Shape.scala

Constructors for Shape algebra

Constructors for Shape algebra

Source:
Shape.scala
trait Size extends Algebra

Get information about the size of the bounding box enclosing an picture.

Get information about the size of the bounding box enclosing an picture.

Source:
Size.scala
trait Style extends Algebra

Apply styling to a image.

Apply styling to a image.

Source:
Style.scala
trait Text extends Algebra

Algebra for creating and styling text.

Algebra for creating and styling text.

Source:
Text.scala

Constructors for Text algebra

Constructors for Text algebra

Source:
Text.scala
trait ToPicture[Input, Alg <: Algebra]

Represents converting from the Input type to a Picture, and depends on the support of some Algebra to actually do the conversion. This can be used to represent, for example, creating a picture from a bitmap in a base64 encoded string.

Represents converting from the Input type to a Picture, and depends on the support of some Algebra to actually do the conversion. This can be used to represent, for example, creating a picture from a bitmap in a base64 encoded string.

Source:
ToPicture.scala
trait Transform extends Algebra