[Coco] Printing on a Coco with modern printers.
Gene Heskett
gheskett at wdtv.com
Sat Jan 11 15:21:19 EST 2014
On Saturday 11 January 2014 15:20:50 Mark J. Blair did opine:
> On Jan 11, 2014, at 11:46 , Gene Heskett <gheskett at wdtv.com> wrote:
> > Frosting on the cake then. But how do they represent the real?
>
> Postscript is a complete programming language, designed for the primary
> purpose of describing vector graphics. When you print to a Postscript
> printer, you send the printer a Postscript program which describes what
> you want to be printed. The printer executes that program, and renders
> its output in whatever native resolution the printer uses. The
> Postscript code is plain old ASCII text, and numbers are represented
> just like you would in most computer programming languages, i.e.
> "1.23456".
>
> Postscript is stack-based and uses postfix notation (hence, the name).
>
> Here's an example from the Wikipedia page which prints "Hello world!" at
> 1 inch (72 points) from the left edge, and 6.944 inches (500 points)
> from the bottom edge:
>
> ------ 8< cut here 8< ------
> %!PS
> /Courier % name the desired font
> 20 selectfont % choose the size in points and establish
> % the font as the current one
> 72 500 moveto % position the current point at
> % coordinates 72, 500 (the origin is at the
> % lower-left corner of the page)
> (Hello world!) show % stroke the text in parentheses
> showpage % print all on the page
> ------ 8< cut here 8< ------
>
>
> The coordinates are in units of 1/72 of an inch, but they don't have to
> be integers. For example, line with the coordinates could have stated
> "72.12345 499.5 moveto" and the text would be rendered at those
> coordinates, limited by the native resolution of the printer.
>
> Postscript code is most commonly machine-generated, but you can also
> write native Postscript code if that floats your boat.
Tried it once, boat slowly sank. :)
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
The meat is rotten, but the booze is holding out.
Computer translation of "The spirit is willing, but the flesh is weak."
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
More information about the Coco
mailing list