commit 57aac68afded5c1594193528baced0f05dbaa668
parent 6210c91bee79cb185778f933dbc3a5482b2478f0
Author: vh <vetle.haflan@gmail.com>
Date: Mon, 15 Jul 2019 20:45:25 +0200
Add notes about components (from a paper note)
Diffstat:
1 file changed, 41 insertions(+), 0 deletions(-)
diff --git a/components.md b/components.md
@@ -0,0 +1,41 @@
+# Components
+Second attempt at a plan, at least for the component *structs*. A component
+should be an interface with the function `draw()`.
+
+## Figure
+- rectangle
+- anything containing other components inside it. Can contain other figures.
+- variables:
+ ```
+ (x0, y0)
+ (x1, y1)
+ components[]
+ ```
+- `.draw()` for a figure simply calls `.draw()` for all compoments in the list.
+
+## Box
+- rectangle only containing text (label)
+- variables:
+ ```
+ (x0, y0)
+ (x1, y1)
+ label
+ ```
+
+## Line
+- a simple start position, stop position, and line type (dotted, thick? etc)
+- variables:
+ ```
+ (x0, y0)
+ (x1, y1)
+ type
+ ```
+
+## Arrow
+- (x, y)
+- direction
+ ```
+ 0 1 2 3
+ UP DOWN LEFT RIGHT
+ ^ v < >
+ ```