1 {$X+} 2 3 Program Blt_Test; 4 5 uses GRX; 6 7 procedure TestFunc; 8 var 9 x, y, ww, wh, ii, jj, c : Integer; 10 11 begin 12 x := GrSizeX; 13 y := GrSizeY; 14 ww := round((x-10)/32); 15 wh := round((y-10)/8); 16 17 GrSetRGBcolorMode; 18 for ii := 0 to 7 do 19 for jj := 0 to 31 do begin 20 c := ii*32+jj; 21 {gives the same color independently of BPP: not all drivers have good BPP=8} 22 c := GrAllocColor(c and 2#11100000,(c and 2#11100) shl 3, (c and 2#11) shl 6); 23 GrFilledBox(5+jj*ww,5+ii*wh,5+jj*ww+ww-1,5+ii*wh+wh-1,c); 24 end; 25 end; { TestFunc } 26 27 var 28 x, y, xv, yv, BPP, 29 m : Integer; 30 31 begin 32 x := 1000; 33 y := 1000; 34 xv := 1280; 35 yv := 1024; 36 BPP:= 24; 37 38 (* m := GrSetMode(Gr_Width_Height_BPP_Graphics,x,y,bpp,0,0); *) 39 m := GrSetMode(Gr_Custom_BPP_Graphics,x,y,BPP,xv,yv); 40 41 TestFunc; 42 GrCircle(400,400,200,GrWhite); 43 GrCircle(400,400,205,GrWhite); 44 GrLineNC(0, 0, GrScreenX-1, GrScreenY-1, GrWhite); 45 GrLineNC(0, GrScreenY-1, GrScreenX-1, 0, GrWhite); 46 GrKeyRead; 47 GrTextXY(0,0,'GrScreenContext',GrWhite,GrBlack); 48 GrBitBltNC(GrScreenContext, 200, 200, GrScreenContext, 0, 0, 200, 200, GrWrite); 49 GrKeyRead; 50 GrBitBltNC(GrScreenContext, 300, 300, GrScreenContext, 0, 0, 200, 200, GrOr); 51 GrKeyRead; 52 GrBitBltNC(GrScreenContext, 400, 400, GrScreenContext, 0, 0, 200, 200, GrAnd); 53 GrKeyRead; 54 GrBitBltNC(GrScreenContext, 500, 500, GrScreenContext, 0, 0, 200, 200, GrXor); 55 GrKeyRead; 56 GrBitBltNC(GrScreenContext, 600, 600, GrScreenContext, 0, 0, 200, 200, GrImage); 57 GrKeyRead; 58 end. 59 60