//;This is a sample printfile containing various A-Shell GDI commands.
//;(Lines beginning with //; are comments; with // are commands)
//;To print this file, just use the PRINT.LIT command, specifying a 
//;printer whose INI file uses PASSTHROUGH=OFF.
//;
//;Updated 17-Oct-26 (Switch from metafiles to PNG and JPG)
//;Updated 30-Jan-05 (see //TEXTINDENT and //RESETLPP commands)
//;Updated 30-May-05 (see //TEXTRECTANGLE)
//;
//;Misc notes:
//;The 3rd parameter of the following TEXTOUT command is quoted
//;(otherwise the comma would be treated as terminating the 3rd param.
//;TEXTOUT does not update the internal cursor for subsequent
//;plain text output, so the next line will start at top of page.
//;Following SETMAPMODE command establishes units of 254/inch to avoid 
//;dependency on printer; otherwise default units are pixels.
//;
//XORIGIN,400
//YORIGIN,400
//SETMAPMODE,LOMETRIC
//TEXTOUT,0,1400,"[0,1400]"
This is a test of A-Shell GDI printing.  (This font is either the printer default
or resulted from the FONTHEIGHT/FONTWIDTH commands in your SYS:printer.INI.)
Note that we started out at the top of page even though we started with
a //TEXTOUT,0,1400,"[0,1400]" command.  (A blank line follows this one.)

//SETFONT,200,Arial,0,0,0,0
//;The following command resets the vertical line spacing to be based 
//;purely on the font rather than on the number of lines per page and
//;page size.  Note that even when LPP not specified or set to 0 in the
//;printer init file, LPP is initially set up automatically based on 6 LPI
//ResetLPP
Now we should be in 20 point Arial.  (Note that default line spacing 
adjusted itself, only because we used the //ResetLPP command)
//; This is a comment
//;SETFONT,120,Courier New,0,0,0,0
//;try setting default
//SETFONT,120


And now back to 12 point Courier \
//SETFONT,120,Courier New,0,0,0,1
(ITALIC) \
//SETFONT,120,Courier New,0,0,0,0
(NORMAL)
(Note change to italic in mid-line using the \ command to hold the position.)

Here we use //TEXTINDENT to print a memo using relative positioning \
//TextIndent,-1,-1,[Memo Line 1]
[Memo Line 2]
[Memo Line 3]
//;Cancel the text indent mode
//TextIndent

//;Now use TextIndent with absolute positioning
//TextIndent,1300,800,[(1300,800) is absolute]
[position of this]
[memo.]
//TextIndent

//SETFONT,120,Arial
//;SETVMI,25
//TextRectangle,1300,1000,1750,1200
This uses TEXTRECTANGLE to format text within a rectangle.
//TextRectangle
//SetPen,0,3
//Rectangle,1295,995,1745,1205

//RECTANGLE,80,660,820,1150
//;Select a slightly bolder solid pen
//SETPEN,0,3
//;The ellipse will fit just inside the rectangle...
//ELLIPSE,80,660,820,1150
//SETFONT,160,MISTRAL
//Textout,150,780,"Normal Text Alignment"
//Moveto,150,780
//Lineto,750,780
//SetTextAlign,24
//Textout,150,910,"Baseline Alignment"
//Moveto,150,910
//Lineto,750,910
//SetTextAlign,8
//Textout,150,1030,"Bottom Alignment"
//Moveto,150,1030
//Lineto,750,1030

//SETFONT,120,Arial
//Moveto,0,1300
Now for some drawing commands...  Note that unlike //TEXTOUT, the
preceding //MOVETO command did cause internal cursor to move.
//SETPEN,4,1
//MOVETO,0,1400
//lineto,1400,1400
//lineto,1500,1650
//LINETO,100,1700
//lineto,0,1500
//SETPEN,0,4
//lineto,1500,1500
//lineto,1600,1750
//LINETO,200,1800
//lineto,100,1600
//SETPEN,2,1
//lineto,1600,1600
//lineto,1700,1850
//LINETO,300,1900
//lineto,200,1700
//SETPEN,1,1
//LINETO,0,1500

//;change to 1/100" units... (this is a comment)
//SETMAPMODE,LOENGLISH
//;Select 10 point Times Roman italic
//SETFONT,100,Times Roman,0,0,0,1

//;display a metafile of a satellite in two sizes.  
//Moveto,0,780
Now for a pair of JPG and PNG images, each in two sizes, one preserving
the original aspect ratio, the other stretched.

//SETFONT,200,Franklin Gothic,0,0,600,2
//TEXTOUT,0,830,"JPG:"
//IMAGE,bicycle.jpg,80,825,130,925,&h040
//IMAGE,bicycle.jpg,170,850,370,960,&h044

//TEXTOUT,400,830,"PNG:"
//IMAGE,ashell4b.png,480,825,530,925,&h040
//IMAGE,ashell4b.png,570,850,760,960,&h044

//SETPEN,0,6
//RECTANGLE,250,970,550,1010,1
//SETFONT,120,Comic Sans,0,0,700,0
//TEXTCENTER,250,970,550,1010,"Centered Text (Shaded)"

//SETFONT,240,Arial,0,0,700,1

//TEXTOUT,660,1050,The End
