I’m making a graphical application. I have a dll which contains some classes belonging to the rendering flow. My renderer can draw classes inherited from IShape, which is in the dll. My goal is to inherit this class outside the dll, then pass it to the renderer to draw. In this way I can reuse this dll, and create custom, different shapes in each application I make.
dll ├── Renderer (has a function like void Draw(IShapre shape); ) └── IShape app ├── Rectangle : IShape ├── Main (which calls renderer.Draw(new Rectangle(...)); ) └── other classes
Is it a bad design? Which other options I have to achieve this?