summaryrefslogtreecommitdiff
path: root/fp2/week6/mart/QA_shapes.icl
diff options
context:
space:
mode:
authorCamil Staps2015-05-28 22:01:57 +0200
committerCamil Staps2015-05-28 22:01:57 +0200
commit96e60d979a542ebb3ae7a8074cd7848884ab29c8 (patch)
tree96c47969869cbb5e43365d642c991b0472ba4ec1 /fp2/week6/mart/QA_shapes.icl
parentweek 45 finish (diff)
parentoops (diff)
Merge branch 'master' of github:dopefishh/fp1415
Diffstat (limited to 'fp2/week6/mart/QA_shapes.icl')
-rw-r--r--fp2/week6/mart/QA_shapes.icl27
1 files changed, 27 insertions, 0 deletions
diff --git a/fp2/week6/mart/QA_shapes.icl b/fp2/week6/mart/QA_shapes.icl
new file mode 100644
index 0000000..fdb1a54
--- /dev/null
+++ b/fp2/week6/mart/QA_shapes.icl
@@ -0,0 +1,27 @@
+implementation module QA_shapes
+
+import QA, StdReal
+
+// deze module definieert een aantal eenvoudige vorm-naam elementen
+
+d :== px 40.0
+font :== normalFontDef "Times" 40.0
+
+queries :: [QA]
+queries
+ = [(rect d d, "square")
+ ,(circle d <@< {strokewidth=zero}, "circle")
+ ,(ellipse d (d /. 2) <@< {strokewidth=zero}, "ellipse")
+ ,(text font "Hello", "text")
+ ,(margin (d /. 2,px zero) (xline Nothing d), "xline")
+ ,(margin (px zero,d /. 2) (yline Nothing d), "yline")
+ ,(line Nothing Slash d d, "slash")
+ ,(line Nothing Backslash d d, "backslash")
+ ,(polygon Nothing [(d/.2,zero),(d,d),(zero,d)], "triangle")
+ ,(polyline Nothing [(d/.2,zero),(d,d),(zero,d),(d/.2,zero)], "polyline")
+ ,(fitx (d /. 1.2)
+ (overlay [(AtMiddleX,AtMiddleY),(AtMiddleX,AtMiddleY)]
+ []
+ [rect d d,rotate (deg 45.0) (rect d d)]
+ Nothing), "star")
+ ]