VertexRenderer
Renderer for vertex-based shapes with multi-contour support
Handles both open and closed shapes, with special logic for fill behavior: - Open shapes (lines): No fill, only stroke - Closed shapes: Both fill and stroke - Shapes with holes : Uses SVG masks for proper rendering during morphing - During morphing: Fill fades in/out smoothly The key Manim-inspired feature: when morphing from open to closed, we implicitly connect the endpoints for fill determination without drawing that connecting line. Hole rendering strategy: - Uses SVG masks (essential for morphing between different hole configurations) - Hole strokes rendered separately at normal width
Constructor
VertexRenderer(args, kwargs)
Methods
render
render(
state: State,
drawing: Optional[Drawing] = None
) -> DrawingElement