You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment all shapes inherit from the Shape object. The vast majority of shapes inherit from Shape via Curve. This is a legacy of the rendering logic being mixed up with the modelling logic; many of the shapes use Curve to be drawn. There is nothing wrong with using Curve to render primitive objects, but that should be a decision for the render (at present the DrawingTool implementation.
It would be great to refactor the model logic so that Curve isn't in the object hierarchy for shapes such as Circle and Line. This will mean changing the interface between the model and drawing_tool so that it knows how to draw more primitive shapes (i.e. add methods such as draw_line and draw_circle). This will mean that where rendering tools understand how to draw primitive shapes (like the <circle> tag in SVG) then we can take advantage of that. For the scope of this issue we can continue to reuse the curve drawing logic, it just needs to move to drawing_tool.
The text was updated successfully, but these errors were encountered:
At the moment all shapes inherit from the
Shape
object. The vast majority of shapes inherit fromShape
viaCurve
. This is a legacy of the rendering logic being mixed up with the modelling logic; many of the shapes use Curve to be drawn. There is nothing wrong with usingCurve
to render primitive objects, but that should be a decision for the render (at present theDrawingTool
implementation.It would be great to refactor the model logic so that
Curve
isn't in the object hierarchy for shapes such asCircle
andLine
. This will mean changing the interface between the model anddrawing_tool
so that it knows how to draw more primitive shapes (i.e. add methods such asdraw_line
anddraw_circle
). This will mean that where rendering tools understand how to draw primitive shapes (like the<circle
> tag in SVG) then we can take advantage of that. For the scope of this issue we can continue to reuse the curve drawing logic, it just needs to move todrawing_tool
.The text was updated successfully, but these errors were encountered: