Available Algebras

This section gives a quick overview of the main algebras in Doodle. It is not intended to replicate the details you can find in the ScalaDoc. Read that for more details. All algebras have corresponding syntax that adds the methods they define to Picture.

  • Algebra is a marker trait that allow other algebras extend. It provides no useful functionality of its own.

  • Bitmap is a convenience to load a bitmap image as a Picture. This is easy to use but not very flexible, and it does not have any error handling. For more complex cases use the ImageIO in the Java standard library to load a BufferedImage and then use the toPicture method to convert to a Picture.

  • Blend specifies blending modes.

  • Debug renders a picture’s bounding box and origin, which is useful for debugging layout issues.

  • Layout provides basic layout operations.

  • Path converts a ClosedPath or an OpenPath into a Picture.

  • Shape is a convenience for drawing some simple shapes, such as circles and squares.

  • Size gets the size of a Picture, which can be used for complex layout, for example.

  • Style allows changing the stroke, fill, and other characterisitics of a Picture.

  • Text adds text to a Picture.

  • ToPicture converts other types to a Picture.

  • Transform applies geometrics transformations, such as rotations and scaling, to a Picture.

The source code for this page can be found here.