nutmeg icon indicating copy to clipboard operation
nutmeg copied to clipboard

Modularise Nutmeg's drawing of shapes

Open kitizz opened this issue 10 years ago • 1 comments

Currently, for something like LinePlot, it has an associated LineCanvas. LineCanvas assumes that its parent is a LinePlot and extracts the data it requires by accessing the LinePlot's properties.

A better architecture would be for the Canvas to have the properties of the things it can draw. For example, LineCanvas would have xData and yData properties. These properties are then bound at the QML side.

This then allows for a nice way to "construct" different types of plots. For example, a BarGraphPlot may have a RectangleCanvas and a TextCanvas (for labels).

Related to #40

kitizz avatar Jul 11 '14 04:07 kitizz

This has been implemented by CanvasPlot. But it would be nice to have "models" as well. Where a set of line segments are drawn based on four array properties: x1, y1, x2, y2. This requires some thought...

kitizz avatar Apr 22 '16 03:04 kitizz