diff options
author | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 20:37:45 +0000 |
---|---|---|
committer | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 20:37:45 +0000 |
commit | c89f0bc2209f7f98695e6b94fbac316c84fbf9d4 (patch) | |
tree | 456d506bd18edd3b768eaffa8f70ae93565682e4 /include/tblf | |
parent | 7db8921aac3a0e1223af269ec7092bdd91a7c7a2 (diff) | |
download | lout-c89f0bc2209f7f98695e6b94fbac316c84fbf9d4.tar.gz |
Lout 3.25.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@19 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'include/tblf')
-rw-r--r-- | include/tblf | 68 |
1 files changed, 20 insertions, 48 deletions
diff --git a/include/tblf b/include/tblf index 9770d63..18b16ef 100644 --- a/include/tblf +++ b/include/tblf @@ -4,13 +4,14 @@ # Lout @Tbl package for tables # # # # Version 1.0 (22 November 1998) # +# Version 1.1 (21 October 2001: improvements to handling of colour) # # Jeffrey H. Kingston # # # # Based on the @Tab package (Jeffrey H. Kingston, September 1991). # # # ############################################################################### -@SysPrependGraphic { tblf.lpg } +# obsoloete now @SysPrependGraphic { tblf.lpg } export @OrIfPlain def @TOIP { @@ -1179,61 +1180,35 @@ def @TblSetup @OneRow { /0io x /0io } } - def @PDFColourCommand right col - { - def @ColourCoords - { - col @Case { - nochange @Yield { nochange } - darkblue @Yield { 0.0 0.0 0.5 } - blue @Yield { 0.0 0.0 1.0 } - lightblue @Yield { 0.5 0.5 1.0 } - darkgreen @Yield { 0.0 0.5 0.0 } - green @Yield { 0.0 1.0 0.0 } - lightgreen @Yield { 0.5 1.0 0.5 } - darkred @Yield { 0.5 0.0 0.0 } - red @Yield { 1.0 0.0 0.0 } - lightred @Yield { 1.0 0.5 0.5 } - darkcyan @Yield { 0.0 0.5 0.5 } - cyan @Yield { 0.0 1.0 1.0 } - lightcyan @Yield { 0.5 1.0 1.0 } - darkmagenta @Yield { 0.5 0.0 0.5 } - magenta @Yield { 1.0 0.0 1.0 } - lightmagenta @Yield { 1.0 0.5 1.0 } - darkyellow @Yield { 0.5 0.5 0.0 } - yellow @Yield { 1.0 1.0 0.0 } - lightyellow @Yield { 1.0 1.0 0.5 } - darkgray @Yield { 0.2 0.2 0.2 } - gray @Yield { 0.5 0.5 0.5 } - lightgray @Yield { 0.8 0.8 0.8 } - darkgrey @Yield { 0.2 0.2 0.2 } - grey @Yield { 0.5 0.5 0.5 } - lightgrey @Yield { 0.8 0.8 0.8 } - black @Yield { 0.0 0.0 0.0 } - white @Yield { 1.0 1.0 1.0 } - } - } +# include @ColourCommand symbol +@SysInclude { ccommand } - @ColourCoords "rg" @ColourCoords "RG" + def @PDFBox + { + "0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h" } def @PDFAddPaint right col { col @Case { none @Yield "" - nochange @Yield "q f Q" - else @Yield { "q" @PDFColourCommand col "f Q" } + else @Yield { "q" @ColourCommand col "f Q" } + } + } + + def @PSAddPaint right col + { + col @Case { + none @Yield "" + else @Yield { @ColourCommand col "fill" } } } def @FillBox left col right x { @BackEnd @Case { - PostScript @Yield {{"LoutBox ltbl"col} @Graphic x} - PDF @Yield {{ - "0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h" - @PDFAddPaint col "S" - } @Graphic x} + PostScript @Yield { {"LoutBox" @PSAddPaint col } @Graphic x } + PDF @Yield { { @PDFBox @PDFAddPaint col "S" } @Graphic x } PlainText @Yield { rpc @PlainGraphic x } } } @@ -1241,11 +1216,8 @@ def @TblSetup def @PaintBox left col right x { @BackEnd @Case { - PostScript @Yield {{"LoutBox ltbl"col} @Graphic x} - PDF @Yield {{ - "0 0 m __xsize 0 l __xsize __ysize l 0 __ysize l h" - @PDFAddPaint col "S" - } @Graphic x} + PostScript @Yield { {"LoutBox" @PSAddPaint col } @Graphic x } + PDF @Yield { { @PDFBox @PDFAddPaint col "S" } @Graphic x } PlainText @Yield { x } } } |