Fill Between
Visually fill the area between diagram elements using Neural Sketch.
Introduction
The \nskFillBetween
command allows you to visually fill the area between two elements—such as blocks or coordinates—in your Neural Sketch diagrams. It is particularly useful for emphasizing relationships, highlighting regions, or simply enhancing visual clarity.
Usage
Parameter Overview
Parameter | Description | Default |
---|---|---|
from | ID of the first block or coordinate | required |
to | ID of the second block or coordinate | required |
fill | Fill color between elements | transparent |
draw | Border color of the filled area | none |
opacity | Opacity of the filled area (0 –1 ) | 1 |
edge | Determines if edges are straight or curved | straight |
orientation | Direction of filling: vertical or horizontal | vertical |
corner-offset | Offset to adjust the corner alignment (straight edge) | 0mm |
Examples
Straight vs. Curved Edges
Here’s an illustrative example showcasing both straight and curved fills:
Advanced Example
This advanced use case demonstrates multiple fills, annotations, and coordinate-based fills:
Best Practices
- Use fills judiciously to avoid visual clutter.
- Prefer subtle colors and moderate opacity for readability.
- Pair fills with annotations to clarify meaning.
Reference
Prop | Type | Default |
---|---|---|
corner-offset? | dimension | {} |
draw? | token list | nskStrongBlue!50 |
edge? | choice | straight |
fill? | token list | nskStrongBlue!20 |
from? | token list | {} |
opacity? | number | 0.4 |
orientation? | choice | vertical |
to? | token list | {} |
Key Takeaway
The \nskFillBetween
command provides an effective method to visually
emphasize regions and relationships between diagram elements, enhancing both
clarity and aesthetics with customizable fills, edges, and orientation
controls.