Let's make a Drawable a bag of properties - an object - with a type
property to inform how to use those properties to e.g. draw a path.
{
"id": 7,
"type": "Rectangle",
"top": 15,
"left": 10,
"bottom": 25,
"right": 20,
"style": {...}
}
(Somewhere there's a map of names to property types to inform a property editor.)
drawableStack gets renamed to display, push to paint, pop to erase, draw to refresh (and bring the refresh once a frame logic into the type along with getBoundingBox).
Shape specific code (such as drawable to path and drawable to anchors) is held in the shape objects that also implement the tool interface.