-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test1.BAS
79 lines (71 loc) · 1.88 KB
/
Test1.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
OPTION EXPLICIT
#INCLUDE "PropText.INC" 'include PropText library
LOAD FONT "SimplEd.FNT" 'load user font
initAll.PROP 'init built-in fonts
initFont.PROP(8) 'init user font
DIM STRING test
DIM INTEGER f
CONST sample="Proportional text"
?:preview
font.PROP(8):color.PROP(RGB(BLACK),RGB(WHITE))
?:?"print.PROP sample:"
color.PROP(RGB(YELLOW))
preview1
font.PROP(8):color.PROP(RGB(BLACK),RGB(WHITE))
?:?:?"wrap.PROP sample:"
color.PROP(RGB(YELLOW))
preview2
font.PROP(8):color.PROP(RGB(BLACK),RGB(WHITE))
?:?:?"justify.PROP sample:"
color.PROP(RGB(YELLOW))
preview3
'SAVE IMAGE "SS.BMP"
END
SUB preview
LOCAL INTEGER fnt
color.PROP RGB(NOTBLACK), RGB(WHITE)
font.PROP 8
printLn.PROP("PropText Library by JirSoft, proportional text is yellow, standard text is white for comparation... ")
FOR fnt = 1 TO 8
IF fnt=6 THEN
test = "0123456789"
ELSE
test = sample
ENDIF
font.PROP fnt
color.PROP RGB(WHITE), RGB(NOTBLACK)
PRINT test" ";
color.PROP RGB(YELLOW), RGB(NOTBLACK)
printLn.PROP test
NEXT fnt
END SUB
SUB preview1
LOCAL INTEGER i
color.PROP RGB(YELLOW), RGB(NOTBLACK)
font.PROP 8
FOR i=1 to 50
print.PROP sample+" "
NEXT i
END SUB
SUB preview2
LOCAL INTEGER i
color.PROP RGB(YELLOW), RGB(NOTBLACK)
font.PROP 5
FOR i=1 to 5
wrap.PROP "This is a sample of the text, that can be printed as word wrapped... "
NEXT i
END SUB
SUB preview3
LOCAL STRING sample = "This is a sample of the text, that can be printed as full word justified from left and right using variable interword space. "
LOCAL INTEGER dy = MM.INFO(VPOS)
font.PROP 8
?@(0,dy);:justify.PROP sample, 300
font.PROP 4
?@(0,dy);:justify.PROP sample, 200, 320
font.PROP 7
?@(0,dy);:justify.PROP sample, 150, 540
font.PROP 1
?@(0,dy);:justify.PROP sample, 200, 710
font.PROP 3
?@(0,dy);:justify.PROP sample, 345, 930
END SUB