A question on GKSLIN

4 views
Skip to first unread message

Dave Jones

unread,
Nov 1, 2022, 11:48:57 AM11/1/22
to dislin...@googlegroups.com
Hello, All.
Is there any documentation on the format of the metafile GKSLIN?  I'd like to be able to write some code that reads that file type and drives a plotter of some type.
Many thanks.
DJ

Helmut Michels

unread,
Nov 1, 2022, 12:37:09 PM11/1/22
to dislin-users
Dear Dave,

the GKSLIN format is a very simple ASCII format  for containing plot vectors and color numbers.
It was the first output format in Dislin. The first line of a GKSLIN file describes the width and
height of a plot in cm. The following lines contain floatingpoint numbers with a field length
of 10 for each number (ranged right). The meaning of the values in a GKSLIN metafile (.met) is:

       >= 0.0  and <=  1.0   plot vector (x, y), the numbers must be multiplied by max (width, height)  
       = 2.0                           pendown
       = 3.0                           penup
       = 9.0                           end of file
       >= 10.0                       pen (color value), where the value 10 corresponds to  pen 1, etc.

At the beginning there were only 8 pens for pen plotters (values 10.0 until 17.0). Later the pens
were extended to 256 color values, but the file format does only support two digits before the
decimalpoint. Therefore, the value 99.0 is used as a shifting instruction. The pen number is shifted
by the value 89.   For example,   the instruction 99.0  99.0  86.0 at the beginning of the file means
the color value:  89 + 89 + 86 - 9  = 255.

With best regards,

Helmut
Reply all
Reply to author
Forward
0 new messages