DIM pw AS INTEGER
SUB MakeImage (n AS INTEGER)
DIM Font AS QFONT
Font.Size = pw / 50
DIM Image AS QBITMAP
Image.Width = pw \ 5
Image.Height = Image.Width
Image.Font = Font
Image.TextOut 0, 0, STR$(n), 0, &HFFFFFF
Image.Line 0, 0, Image.Height, Image.Width, 0
DIM S AS QRECT
S.Left = 0
S.Top = 0
S.Right = Image.Width
S.Bottom = Image.Height
DIM D AS QRECT
D.Left = (n MOD 4) * (pw \ 4)
D.Top = (n \ 4) * (pw \ 4)
D.Right = D.Left + Image.Width
D.Bottom = D.Top + Image.Height
Printer.CopyRect D, Image, S
END SUB
Printer.BeginDoc
pw = Printer.PageWidth
FOR i = 0 TO 19
MakeImage(i)
NEXT
Printer.EndDoc
|