Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Curve from the top of the Shape Tree #17

Open
rvodden opened this issue Oct 27, 2020 · 0 comments
Open

Remove Curve from the top of the Shape Tree #17

rvodden opened this issue Oct 27, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@rvodden
Copy link
Owner

rvodden commented Oct 27, 2020

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.

@rvodden rvodden added this to the 0.1.0 milestone Oct 27, 2020
@rvodden rvodden added enhancement New feature or request good first issue Good for newcomers labels Oct 27, 2020
@rvodden rvodden removed the good first issue Good for newcomers label Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant