% $Id: test-graphonly.tex 1 2021-05-15 22:12:05Z reinhard $

% Copyright (C) 2020 Reinhard Kotucha <reinhard.kotucha@web.de>
% 
% You may freely use, modify, and/or distribute this file.

\font\sf=cmss10

\input luagraphlib
\luagraphicfile{antpattern.lua}

\canvasrule=0pt

\pdfextension info {
  /Author (Reinhard Kotucha)
  /Title (SM701 patterns)
  /Creator (LuaTeX with luagraphlib)
  /Subject (Sinclair SM701 (EXXXX) radiation patterns)
}

\parindent=0pt
\pdfvariable horigin=0pt
\pdfvariable vorigin=0pt
\hoffset=0pt
\voffset=0pt

\pagewidth=9.5cm
\pageheight=\pagewidth

\directlua{default = {
    antpattern = {
      gainref = 'dipole',
      offset = 0,
      lambda = function (a) return a[2], a[1] end,
      bgcolor = {1, 1, .9},
      fillcolor = {0.9, 0.9, 1},
      strokecolor = {0.561, 0.078, 0.008},
    }
  }
}

\begindocument

\begin{canvas}(\pagewidth, \pageheight)
  \at\center{\luagraphic{antpattern('data/ant/sm701_915h.data',
      function (a) return a[2], a[1] end )}}
\end{canvas}

\bye

% Local Variables:
%  mode: TeX
%  TeX-master: t
%  TeX-engine: luatex
%  indent-tabs-mode: nil
%  coding: utf-8-unix
% End:
% vim:set tabstop=2 expandtab: