d2/docs/architecture/overview.d2

62 lines
1,010 B
Text
Raw Normal View History

2023-01-12 07:47:41 +00:00
input: |d2
2023-03-18 00:17:52 +00:00
# D2 script
2023-01-12 08:30:23 +00:00
hello -> world
2023-01-12 07:47:41 +00:00
|
2023-01-12 08:30:23 +00:00
2023-03-18 00:17:52 +00:00
input -> compiler
2023-01-12 08:30:23 +00:00
compiler: {
2023-03-18 00:17:52 +00:00
width: 300
height: 100
style: {
fill: "#7B90D2"
font-color: white
2023-01-12 08:30:23 +00:00
}
}
2023-03-18 00:17:52 +00:00
compiler -> graph
2023-01-12 08:30:23 +00:00
graph: Graph\n(shapes & connections) {
shape: oval
2023-03-18 00:17:52 +00:00
style.fill: "#A8D8B9"
2023-01-12 08:30:23 +00:00
}
2023-03-18 00:17:52 +00:00
configs -> graph mods
graph -> graph mods -> layout
# Set Dimensions -> Use ruler to measure all texts -> measured graph
# Set Dimensions -> Use given, premeasured dimensions -> measured graph
# measured graph: {
# shape: oval
# style.fill: honeydew
# }
#
# measured graph -> layout engine -> positioned graph
#
# positioned graph: {
# shape: oval
# style.fill: honeydew
# }
#
# positioned graph -> exporter -> diagram
#
# diagram: finalized diagram (styled) {
# shape: oval
# style.fill: honeydew
# }
#
# diagram -> render SVG
#
# render SVG -> use sketch post processor: optional
#
# use sketch post processor -> SVG bytes
#
# SVG bytes: {
# shape: oval
# style.fill: honeydew
# }
#
# SVG bytes -> screenshot for PNG: optional