Commands/preloaded
nsk@EdgeFade
Apply subtle fading effects along diagram edges to emphasize boundaries.
Overview
The \nskEdgeFade command applies a gradient fade effect along a specified edge of the current diagram's bounding box, creating a smooth transition and subtle emphasis on diagram boundaries. It automatically measures the diagram's dimensions and renders a \nskBlock with the appropriate fade direction, size, and offset.
nskEdgeFade internally leverages \nskMeasure to compute the length of the target edge and then draws a transparent block with fading style.
Usage
Options
| Option | Type | Default | Description |
|---|---|---|---|
edge | choice | down | Side to apply the fade. Options: down, up, left, right. |
size | dimension | 10mm | Thickness of the fade effect. |
offset | dimension | 1mm | Distance from the diagram's bounding box to position the fade. |
Examples
Default Fade
Fades the bottom edge of the diagram:
Custom Fade
Apply a 5mm fade on the left edge, offset by 2mm:
Internal Mechanics
- Parses options via the
nsk/efadingskey definitions. - Determines the position of the fade block relative to the
current bounding boxbased onedgeandoffset. - Measures the length of the targeted edge using
\nskMeasure. - Invokes an internal helper to render a
\nskBlockwith the computed width/height andfadestyle.
Reference Table
| Prop | Type | Default |
|---|---|---|
| edge? | choice | down |
| size? | dimension | 10mm |
| offset? | dimension | 1mm |
