Doctus is a Scala Library for the creation of visual art pieces.

It is based on the ideas of Processing but uses scala as a programming language. Projects can create images on multiple platforms. Currently Swing and HTML5-Canvas are supported.

Contact: entelijan


Doctus prepares a core interface. For the creation of your art pieces you always use that core interface. These can then be rendered on different platforms. Usually all classes of the core interfaces have a wrapper for each platform to be rendered on there.


Sourcecode: wwagner4/doctus1.


doctus project doctus project doctus project doctus project

List of projects using doctus. more...

Getting started

The easiest way to start a doctus project is to use giter8, a command line tool to generate files and directories from templates.

To create a new doctus project call

g8 wwagner4/mydoctus.g8

This will create a multimodule sbt project containing all the sourcefiles and other resouces you need.

To test the newly created project (we assume you named it 'mydoctus') change to the root directory of that project. There start sbt. This might take some time if you have not yet downloaded and compiled all the necessary libraries.

cd mydoctus sbt

Inside 'sbt', call 'test' to see if everything compiles right and the tests execute correctly.

> test

After 'test' succeeded, generate the javascript code for running your project in the browser. To do so call 'fastOptJS'. For details about the 'fastOptJS' command see ScalaJS

> fastOptJS

You can test your project by opening the 'mydoctus-scalajs/index.html' page in your preferred browser.

For running your project in the swing renderer execute the following commands in sbt.

> project mydoctus-swing > run

This should open a new window running your project.


Planned for the future


To get an overview of the API have a look at the core interface for the doctus version you wnt to use.

Naming conventions for wrapper classes

In order make it easy to find the wrapper implementations for the interface class you want to use the following naming conventions.

The name of the implementation starts with the name of the interface followed by the platform name and an optional qualifier.


IDE Support

To be able to edit your project inside your preferred IDE do the following:


The doctus library includes a showase module for the core and every platform. All doctus functionality is (should be) present in the doctus showcases.


Sourcecode (Same as the doctus library): wwagner4/doctus1.

Beside the showcase the source code of the example programs is also good starting point to understand how doctus works.