In English: BIGPRINT, a SuperBASIC procedure that draws large letters on the QL screen by reading the character patterns from the system fonts in ROM, a follow-up to the big-letter procedure in the previous issue. It takes seven parameters (message, style, position, letter width and height, colour) and offers four styles: normal, letters built from the character itself, italic and raised relief. A short demo program and the full listing are given.
The article below is in French, as printed in QL_DOC n8 (February-March 1989).
Dans le dernier numéro de QL_DOC, il y avait une procédure pour obtenir des grosses lettres à l’écran. En voici une autre qui offre des possibilités supplémentaires.
Elle a pour nom BIGPRINT, on a besoin de 7 paramètres pour l’utiliser.
Syntaxe : BIGPRINT a$,type,x,y,xpix,ypix,col
a$= le message que l’on veut imprimer.
type= le style de l’impression.
si =1 alors le style est normal
si =2 les gros caractères sont formés eux-mêmes de caractères!
si =3 alors on est en mode italique
si =4 on est en normal mais en relief
x et y sont les positions à l’écran.
xpix est la largeur des lettres et y pix est la hauteur des lettres.
col représente la couleur.
100 REMark demo pour procedure de grosses lettres...
110 :
120 CLS#0
130 WINDOW 512,256,0,0:MODE 4
140 PAPER 4:INK 0:BORDER 15,0:CLS
150 bigprint "QL_DOC",4,5,17,9,5,94
160 bigprint "Le Newsletter Québécois",3,29,75,2,2,0
170 bigprint "pour les ordinateurs",3,45,90,2,2,0
180 bigprint "Sinclair QL",4,31,115,4,6,60
190 bigprint "*Abonnez-vous*",2,1,170,4,4,0
200 REPeat demo:PAUSE 100:RECOL 4,1,2,3,0,5,6,7:END REPeat demo
210 :
220 :
230 REMark a$ =le message type=le style
240 REMark x&y =la position a l'écran xpix=largeur
250 REMark ypix=hauteur col =couleur
260 :
270 DEFine PROCedure bigprint (a$,type,x,y,xpix,ypix,col)
280 LOCal base,bit,byte,cbase,chr,xpos,caractere,base1,base2
290 INK col
300 base1=PEEK_L(42+(PEEK_L(PEEK_L(163960)+4)))-277
310 base2=PEEK_L(46+(PEEK_L(PEEK_L(163960)+4)))-1141
320 FOR chr=1 TO LEN(a$)
330 caractere=CODE(a$(chr))
340 SELect ON caractere
350 =32 TO 127: cbase=base1+9*caractere
360 =128 TO 191: cbase=base2+9*caractere
370 =REMAINDER : cbase=base2+1143
380 END SELect
390 xpos=x+(chr-1)*xpix*8
400 FOR byte=cbase TO cbase+8
410 IF PEEK(byte)
420 FOR bit=1 TO 5
430 IF PEEK(byte)&&(2^(7-bit))
440 routine=type
450 SELect ON routine
460 =1 :REMark NORMAL
470 BLOCK xpix+1,ypix,xpos+xpix+bit*xpix,y+(byte-cbase)*ypix,col
480 =2 :REMark CARACTERE
490 OVER 1
500 CURSOR xpos+xpix+bit*xpix,y+(byte-cbase)*ypix:PRINT a$(chr)
510 OVER 0
520 =3 :REMark ITALIQUE
530 BLOCK xpix+1,ypix,xpos+xpix+bit*xpix+6-byte+cbase,y+(byte-cbase)*ypix,col
540 =4 :REMark RELIEF
550 BLOCK xpix+4,ypix+3,xpos+xpix+bit*xpix, y+(byte-cbase)*ypix,0
560 BLOCK xpix+1,ypix,xpos+xpix+bit*xpix,y+(byte-cbase)*ypix,col
570 END SELect
580 END IF
590 NEXT bit
600 END IF
610 NEXT byte
620 NEXT chr
630 END DEFine bigprint
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.