'printing example
'A4 paper size is 210x297 mm. So ratio is 1.414258571 Hmmm
Ratio = 297 / 210
RAT = 1000
PaperWidth = RAT
PaperHeight = RAT / Ratio
'This is for portrait printing. If you want to print landscape, flip it.
Paper&
= _NEWIMAGE(PaperWidth
, PaperHeight
, 32)CLS , &HFFFFFFFF 'the same as CLS, _RGBA32(255, 255, 255, 255) <-create white background for save cartridge font
(i
) = _LOADFONT("lbrite.ttf", Sizes
, "bold") i = i + 1
INPUT "View page before print? [Y/N]"; m$
SCREEN 0 'first screen (program is in text mode, but Paper screen is in graphic mode) INPUT "Press P for print, or other key for end"; m$
'Of course, for printing, it is also necessary to check with _PRINTWIDTH whether the printing is no longer in the X axis outside the printable area.
'_PRINTIMAGE supports color printing, including images.
'erase memory!
_FREEIMAGE Paper&
' first kill screen contains used fonts, FOR KillFonts
= 0 TO 14 ' then kill used fonts for free memory.