Posts: 77
Threads: 15
Joined: Mar 2004
Quote:You should ideally use LINE command to print your font on the screen. The secret is to use the bitscan field =P(Look up the line command in qb's help).
I know what the LINE command does, but how is that gonna help? Most of the characters have curved edges which LINE will obviously not help with.
nd remember kids, only you can provoke forest fires!
Posts: 137
Threads: 9
Joined: Feb 2004
Thats what the bitscan point was about... a line is not always a line...
Jonathan Simpson
onathan Simpson
Posts: 6,419
Threads: 74
Joined: Mar 2002
Quote:TheBigBasicQ Wrote:You should ideally use LINE command to print your font on the screen. The secret is to use the bitscan field =P(Look up the line command in qb's help).
I know what the LINE command does, but how is that gonna help? Most of the characters have curved edges which LINE will obviously not help with.
Read up the bitscan parameter in the QB help. It is done this way. Faster and cleaner:
Code:
SUB GPrint (x%, y%, culler%, Text$)
' by Douglas H. Lusher, adapt'd por Nathan
DEF SEG = &HFFA6
xx% = x%
FOR char% = 1 TO LEN(Text$)
Addr% = 8 * ASC(MID$(Text$, char%, 1)) + 14
FOR Ln% = 0 TO 7
LineFormat% = CVI(CHR$(0) + CHR$(PEEK(Addr% + Ln%)))
yy% = y% + Ln%
LINE (xx%, yy%)-(xx% + 7, yy%), culler%, , LineFormat%
NEXT
xx% = xx% + 8
NEXT
DEF SEG
END SUB