Skip to main content

Module vector

Module vector 

Source
Expand description

Vector shape primitive model — Screen’s shared shape language (M-VEC.1 / AUT-53).

This is not SVG support. It is Wisp’s own deterministic vector primitive model: rect / rounded-rect / circle / ellipse / path / group, with fill / stroke / opacity / transform.

One shape language drives every visual tool in Screen — masks, crops, highlights, callouts, cursor effects — so each tool doesn’t invent its own geometry model. Subsequent issues build on this:

  • M-VEC.2 / AUT-54 renders Vector into the scene as visible geometry.
  • M-VEC.3 / AUT-55 renders Vector into alpha-mask textures (bridge to M-DYN.1).
  • M-VEC.4..6 refactors privacy blur / redaction / spotlight onto the vector mask path.

§Relationship to existing types

  • MaskShape (the analytic SDF subset) can be derived from a compatible VectorShape via VectorShape::as_mask_shape. This lets the existing apply_clip / apply_solid_redaction / etc. consume vector data without a separate code path.
  • Path points carry an owned Vec<Vec2> so VectorShape is Clone, not Copy (intentional — the path variant is the reason MaskShape::Path was never added; see M-MASK.10’s chapter).

Structs§

Vector
Full vector primitive — shape + fill + stroke + opacity + transform. The “what” + the “how it paints.”
VectorStroke
Stroke paint — width (NDC units) plus solid color.

Enums§

VectorShape
Geometric shape — no paint, no transform. The “what” of a vector primitive.

Functions§

points_bounds 🔒
scale_fill_alpha 🔒