From ae10e0f58af88e34f906804a163e4d1165ea08d2 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 12 Jan 2023 00:30:23 -0800 Subject: [PATCH] overview --- docs/diagrams/overview.d2 | 46 +++++++++++++++++++++++++++++++++++++- docs/diagrams/overview.svg | 27 +++++++++++++++++++--- 2 files changed, 69 insertions(+), 4 deletions(-) diff --git a/docs/diagrams/overview.d2 b/docs/diagrams/overview.d2 index 4081a7c3d..83c199b9e 100644 --- a/docs/diagrams/overview.d2 +++ b/docs/diagrams/overview.d2 @@ -1,3 +1,47 @@ input: |d2 - hello + hello -> world | + +input -> compiler.parse + +compiler: { + parse -> AST + AST: Abstract Syntax Tree { + shape: oval + } + + AST -> compile +} + +compiler.compile -> graph +graph: Graph\n(shapes & connections) { + shape: oval +} + +graph -> Set Dimensions +Set Dimensions -> Use ruler to measure all texts -> measured graph +Set Dimensions -> Use given, premeasured dimensions -> measured graph + +measured graph: { + shape: oval +} + +measured graph -> layout engine -> positioned graph + +positioned graph -> exporter -> diagram + +diagram: finalized diagram (styled) { + shape: oval +} + +diagram -> render SVG + +render SVG -> use sketch post processor: optional + +use sketch post processor -> SVG bytes + +SVG bytes: { + shape: oval +} + +SVG bytes -> screenshot for PNG: optional diff --git a/docs/diagrams/overview.svg b/docs/diagrams/overview.svg index 7cfd3aa31..e38ca731a 100644 --- a/docs/diagrams/overview.svg +++ b/docs/diagrams/overview.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="344" height="330" viewBox="-102 -102 344 330">