aboutsummaryrefslogtreecommitdiffstats
path: root/include/bsf
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-05-19 00:42:48 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-05-19 00:42:48 +0200
commiteb3942e15700f3f4f61b4e46917ae8fbe614e524 (patch)
treebe0c003fa8a0dead8d9dc921050ba13a56d1a9dd /include/bsf
parent71d625f730d872791eef74d7999e1be28d5e5c7e (diff)
downloadlout-eb3942e15700f3f4f61b4e46917ae8fbe614e524.tar.gz
Lout 3.41.HEADmaster
http://jeffreykingston.id.au/lout/lout-3.41.tar.gz
Diffstat (limited to 'include/bsf')
-rw-r--r--include/bsf48
1 files changed, 47 insertions, 1 deletions
diff --git a/include/bsf b/include/bsf
index 383d918..6c8959e 100644
--- a/include/bsf
+++ b/include/bsf
@@ -52,6 +52,53 @@ def @OrIfPlain
}
}
+
+def @ZeroSize right x
+{
+ @HContract @VContract { ^/0io |0io @OneCol @OneRow x |0io /0io }
+}
+
+
+###########################################################################
+# #
+# @Place: places an object at an arbitrary point on the page. #
+# #
+###########################################################################
+
+#
+# VT: the expressions in the braces will work for PostScript but not for PDF
+# they should be modified in the way the "named c { " cm" }" blocks were modified above
+# but since the point of @Place is to output a matrix (?), I have not implemented this
+#
+def @Place
+ import @PSLengths named x
+ named "+" precedence 96 associativity left left a right b { a b "add" }
+ named "-" precedence 96 associativity left left a right b { a b "sub" }
+ named "/" precedence 97 associativity left left a right b { a b "div" }
+ named "*" precedence 98 associativity left left a right b { a b "mul" }
+ { 0 }
+ import @PSLengths named y
+ named "+" precedence 96 associativity left left a right b { a b "add" }
+ named "-" precedence 96 associativity left left a right b { a b "sub" }
+ named "/" precedence 97 associativity left left a right b { a b "div" }
+ named "*" precedence 98 associativity left left a right b { a b "mul" }
+ { 0 }
+ right val
+{
+ @ZeroSize {
+ @BackEnd @Case {
+ PlainText @Yield ""
+ PostScript @Yield {
+ { "LoutPageDict begin matr setmatrix" x y "translate end gsave"
+ // "grestore" } @Graphic val
+ }
+ else @Yield { { "% @Place UNIMPLEMENTED" } @Graphic val # VT: PDF currently has no output
+ }
+ }
+ }
+}
+
+
###########################################################################
# #
# @Colour, @Color #
@@ -78,7 +125,6 @@ def @ColouredUnderline @ColoredUnderline left col right y {
# #
###########################################################################
-
def @Texture
left type
named scale { 1 }