# Cross-Mode Conversion

Move content between flowchart and whiteboard modes with structural conversions or visual snapshots. All conversions are non-destructive. The source data is never modified.

## Mode Switching

Every project can switch between **Flowchart** and **Whiteboard** mode using the mode switcher in the editor header. Content in each mode is **saved independently**. Switching modes does not overwrite anything.

Shortcut: `Shift + W` to toggle between modes.

## The Convert Menu

The **Convert** button in the editor header opens a dropdown with conversion options. The available actions depend on which mode you're currently in:

In Flowchart Mode
- Send to Whiteboard (structural)
- Copy as Image to Whiteboard

In Whiteboard Mode
- Convert to Flowchart (structural)
- Copy as Image to Flowchart

## Conversion Types

### Structural: Flowchart → Whiteboard

FC → WB

Converts flowchart nodes and edges into editable whiteboard elements. Each node becomes a shape, each edge becomes an arrow, and labels become bound text.

**Element Mapping**

- Terminal nodes (oval) → Ellipses
- Process nodes (rectangle) → Rectangles
- Decision nodes (diamond) → Diamonds
- Edges with labels → Arrows with bound text
- Node colors → Shape stroke colors

**Best for:** When you want to annotate, sketch around, or freely rearrange a flowchart in whiteboard mode.

### Structural: Whiteboard → Flowchart

WB → FC

Converts whiteboard shapes and arrows back into flowchart nodes and edges. The reverse mapping turns geometric shapes into semantic node types.

**Element Mapping**

- Ellipses → Terminal nodes
- Rectangles → Process nodes
- Diamonds → Decision nodes
- Arrows → Flowchart edges
- Bound text → Node labels

**Best for:** When a sketch has evolved into a clear structure and you want semantic flowchart nodes with proper connections.

### Snapshot: Flowchart → Whiteboard Image

FC → WB (image)

Rasterizes the current flowchart as a PNG image and embeds it in the whiteboard. The flowchart content is not modified. You get a visual reference.

**Best for:** When you want a visual reference of the flowchart on the whiteboard without converting structure. Great for side-by-side comparison.

### Snapshot: Whiteboard → Flowchart Image

WB → FC (image)

Rasterizes the current whiteboard scene as a PNG image and adds it as an image node in the flowchart. The whiteboard content is not modified.

**Best for:** When you want to embed a whiteboard sketch inside your flowchart for documentation or context.

## When to Use Structural vs. Snapshot

### Structural Conversion

- You want to continue editing in the other mode
- You need semantic nodes and edges (flowchart) or shapes and arrows (whiteboard)
- A sketch has matured into a formal flow
- You want to annotate a flowchart with freehand drawing

### Snapshot Conversion

- You need a visual reference without modifying structure
- You want to embed a diagram inside the other mode for context
- You're documenting or handing off to stakeholders
- The content has complex formatting that doesn't map cleanly

## Example Workflow

**Sketch → Formalize → Document**

1. **Whiteboard:** Sketch out a rough process flow using shapes, arrows, and text.
2. **Convert → Structural WB→FC:** Turn the sketch into proper flowchart nodes with connections.
3. **Flowchart:** Refine node labels, add decision branches, and clean up the layout.
4. **Convert → Snapshot FC→WB:** Embed a snapshot of the final flowchart in the whiteboard for meeting notes and annotations.

**Tip:** Conversions are additive. They never delete existing content in the destination mode. The converted content is merged alongside whatever is already there.
