Milen’s Software: Monodraw

Monodraw

I decided to create Monodraw after stumbling upon some very nice ASCII diagrams on StackOverflow while researching data structures for a text editor. I realised that there were no Mac apps that would allow me to easily visualise algorithms and data structures, so I decided to make one.

As part of the development process, I created my own custom text engine based on CoreText. This provided full control over the layout process (utilised by the text tool). The line sweep direction and movement can be independently adjusted, as can the text position and alignment within the enclosing container.

Monodraw also marks the first document-based app that I made, which is something I had on my todo list for a while. The canvas itself is Core Animation-based (via layer-backed views) which significantly improves performance and makes certain geometry-related operations trivial.

The shape inspector is implemented using a custom list view which I created for two reasons: firstly, I wanted each list element to be visualised by a NSViewController, rather than follow NSTableView’s approach of using plain NSViews. This design decision allowed me to decouple a lot of controller logic, so that it sits at the controller level of each element assistant, rather than having to reside in the views. Secondly, I wanted to have full control over the animations (which are display link-based).

I wrote the first line of code in December 2013 when I started to prototype the custom text view used in the app.

 Monodraw running on OS X Yosemite.

Monodraw running on OS X Yosemite.