PostScript Language is a concatenative and Interpreted programming Language. It was developed in 1982 by John Warnock, Charles Geschke, Doug Brotz, Ed Taft and Bill Paxton. It is also known as Page description Language in electronics and desktop publishing areas. In Postscript ”%” is used to give comments in Programs and every PostScript program should start with the characters "%!". It is used for design Vector Graphs.
Given example will filled the drawn object in a particular shade, both for the outline and the interior. The shade range from 0 (black) to 1 (white).
Note:closepath is used for joining the first vertex of the path with the last.
newpath 100 200 moveto 200 250 lineto 100 300 lineto closepath gsave 0.5 setgray fill grestore 4 setlinewidth 0.75 setgray stroke
Output of the Program