Subversion Repositories Kolibri OS

Rev

Rev 9174 | Rev 9208 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9174 Rev 9193
Line 17... Line 17...
17
    along with CEdit. If not, see .
17
    along with CEdit. If not, see .
18
*)
18
*)
Line 19... Line 19...
19
 
19
 
Line 20... Line 20...
20
MODULE Graph;
20
MODULE Graph;
Line 21... Line 21...
21
 
21
 
Line 22... Line 22...
22
IMPORT SYSTEM, K := KOSAPI, Lines;
22
IMPORT SYSTEM, K := KOSAPI, Lines, Languages;
23
 
23
 
Line 245... Line 245...
245
        DEC(i)
245
        DEC(i)
246
    END
246
    END
247
END clear;
247
END clear;
Line 248... Line 248...
248
 
248
 
249
 
249
 
250
PROCEDURE TextOut* (canvas: tCanvas; x, y: INTEGER; text: INTEGER; n: INTEGER);
250
PROCEDURE TextOut* (canvas: tCanvas; x, y: INTEGER; text: INTEGER; n: INTEGER; delimColor: INTEGER);
251
CONST
251
CONST
252
    WCHAR_SIZE = 2;
252
    WCHAR_SIZE = 2;
253
VAR
253
VAR
254
    color, i: INTEGER;
254
    color, i, ecx: INTEGER;
255
    c: WCHAR;
255
    c: WCHAR;
256
BEGIN
256
BEGIN
257
    IF (0 <= y) & (y <= canvas.height - canvas.font.height - 1) THEN
257
    IF (0 <= y) & (y <= canvas.height - canvas.font.height - 1) THEN
Line 269... Line 269...
269
            FillRect(canvas, x, y, x + n*canvas.font.width, y + canvas.font.height);
269
            FillRect(canvas, x, y, x + n*canvas.font.width, y + canvas.font.height);
270
            canvas.color := color;
270
            canvas.color := color;
271
            WHILE n > 0 DO
271
            WHILE n > 0 DO
272
                SYSTEM.GET(text + i*WCHAR_SIZE, c);
272
                SYSTEM.GET(text + i*WCHAR_SIZE, c);
273
                IF ~Lines.isSpace(c) THEN
273
                IF ~Lines.isSpace(c) THEN
-
 
274
                	IF Languages.isDelim(c) THEN
-
 
275
                		ecx := LSL(28H + canvas.font.size, 24) + delimColor
-
 
276
                	ELSE
-
 
277
                		ecx := LSL(28H + canvas.font.size, 24) + canvas.textColor
-
 
278
                	END;
274
                    K.sysfunc6(4, x*65536 + y, LSL(28H + canvas.font.size, 24) + canvas.textColor, SYSTEM.ADR(c), 1, canvas.bitmap - 8)
279
                    K.sysfunc6(4, x*65536 + y, ecx, SYSTEM.ADR(c), 1, canvas.bitmap - 8)
275
                END;
280
                END;
276
                INC(x, canvas.font.width);
281
                INC(x, canvas.font.width);
277
                INC(i);
282
                INC(i);
278
                DEC(n)
283
                DEC(n)
279
            END
284
            END
280
            (*K.sysfunc6(4, x*65536 + y, LSL(28H + canvas.font.size, 24) + canvas.textColor, text + i*WCHAR_SIZE, n, canvas.bitmap - 8)*)
-
 
281
        END
285
        END
282
    END
286
    END
283
END TextOut;
287
END TextOut;
Line 284... Line 288...
284
 
288
 
285
 
289
 
286
PROCEDURE TextOut2* (canvas: tCanvas; x, y: INTEGER; text: ARRAY OF WCHAR; n: INTEGER);
290
PROCEDURE TextOut2* (canvas: tCanvas; x, y: INTEGER; text: ARRAY OF WCHAR; n: INTEGER);
287
BEGIN
291
BEGIN
Line 288... Line 292...
288
    TextOut(canvas, x, y, SYSTEM.ADR(text[0]), n)
292
    TextOut(canvas, x, y, SYSTEM.ADR(text[0]), n, canvas.textColor)
289
END TextOut2;
293
END TextOut2;