diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2024-05-19 00:42:48 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-05-19 00:42:48 +0200 |
commit | eb3942e15700f3f4f61b4e46917ae8fbe614e524 (patch) | |
tree | be0c003fa8a0dead8d9dc921050ba13a56d1a9dd /include/bsf | |
parent | 71d625f730d872791eef74d7999e1be28d5e5c7e (diff) | |
download | lout-eb3942e15700f3f4f61b4e46917ae8fbe614e524.tar.gz |
http://jeffreykingston.id.au/lout/lout-3.41.tar.gz
Diffstat (limited to 'include/bsf')
-rw-r--r-- | include/bsf | 48 |
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 } |