Skip to content

SketchMorph2 Core

Kuganash Ravishanker edited this page Aug 4, 2022 · 28 revisions

MorphicMonet

This name was chosen as a collective term for all frontend functionality. This handles the user interface and displays the M2Canvas

The MorphicMonet class contains code for setting up the UI and functions requiring file system interaction.

Currently, the UI consists of a menu bar and the M2Canvas.

M2Backend

This class implements the functionality for drawing on an M2Canvas.
It also uses the M2UndoLevel and M2UserAction classes to implement Undo functionality.

The form class

A lot of the backend functionality is already included in the form class. It provides a way to draw with a pen by describing its movements.
It is relatively easy to understand and use, but please note that unlike everything else in squeak, form has a zero-based index.

M2ViewPort

This holds the form shown to the user in the canvas, which is the backend form, scaled according to the current zoom factor.

M2Canvas

This is an ImageMorph that displays the viewPort's form to the user and handles mouse input that it relays to the backend.

Clone this wiki locally