I'm thinking of having a VectorRenderer class, with a bunch of render_rectangle(), render_rounded_rectangle(), etc. methods. Renderer will receive a bunch of shapes in the draw() phase and pass them to the appropriate VectorRenderer methods.
Inside VectorRenderer, actual drawing logic will be delegated to a graphics library such as NanoVG, Pathfinder, or Blend2D.
I'm thinking of having a
VectorRenderer
class, with a bunch ofrender_rectangle()
,render_rounded_rectangle()
, etc. methods.Renderer
will receive a bunch of shapes in thedraw()
phase and pass them to the appropriateVectorRenderer
methods.Inside
VectorRenderer
, actual drawing logic will be delegated to a graphics library such as NanoVG, Pathfinder, or Blend2D.