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 aPicture
. This is easy to use but not very flexible, and it does not have any error handling. For more complex cases use theImageIO
in the Java standard library to load aBufferedImage
and then use thetoPicture
method to convert to aPicture
. -
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 aClosedPath
or anOpenPath
into aPicture
. -
Shape
is a convenience for drawing some simple shapes, such as circles and squares. -
Size
gets the size of aPicture
, which can be used for complex layout, for example. -
Style
allows changing the stroke, fill, and other characterisitics of aPicture
. -
Text
adds text to aPicture
. -
ToPicture
converts other types to aPicture
. -
Transform
applies geometrics transformations, such as rotations and scaling, to aPicture
.