nutmeg
nutmeg copied to clipboard
Implement special data type classes in Python
Implement classes like Image, Rectangle, Line, etc. This makes the syntax nicer for sending data to Nutmeg.
For example instead of:
fig.append('ax.shapePlot.shapes', {'type': 'rectangle', 'x': 5, 'y': 10, 'width': 50, 'height': 100, 'color': 'red'})
The user can do something like:
rect = Rectangle(5, 10, 50, 100)
rect.color = 'red'
fig.append('ax.shapePlot.shapes', rect)
Related to #40
Reconsider how this might work with the new API where method invocations are allowed. Things like
fig.invoke('ax.shapePlot.createRect', x=5, y=10, width=50, height=100)
Might be possible.