To use methods on algebras that are not constructors (constructors are explained in Picture Object) you would usually use syntax.

The standard import for syntax is

import doodle.syntax.all._

Say we want to use the beside method on Layout. First we need some pictures to layout.

val left =
val right =

Then, with the syntax imported, we can just call the beside method as if it's a method on Picture.


As with constructors, syntax methods will return a Picture not a Drawing.

Frame and Canvas→