Changeset 29 for trunk/ScreenTools.pas
- Timestamp:
- Jan 8, 2017, 10:20:03 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 11 11 lib 12 12 heaptrclog.trc 13 c-evo
-
- Property svn:ignore
-
trunk/ScreenTools.pas
r28 r29 9 9 {$ENDIF} 10 10 StringTables, 11 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls,11 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, 12 12 Forms, Menus; 13 13 … … 192 192 193 193 uses 194 Directories, Sound, Registry; 194 Directories, Sound, ButtonBase, ButtonA, ButtonB, 195 196 Registry; 195 197 196 198 var … … 384 386 procedure ApplyGamma(Start, Stop: pbyte); 385 387 begin 386 while Start < Stopdo388 while integer(Start) < integer(Stop) do 387 389 begin 388 390 Start^ := GammaLUT[Start^]; … … 442 444 FirstLine := bmp.ScanLine[0]; 443 445 LastLine := bmp.ScanLine[bmp.Height - 1]; 444 if FirstLine < LastLinethen446 if integer(FirstLine) < integer(LastLine) then 445 447 ApplyGamma(pointer(FirstLine), @LastLine[bmp.Width]) 446 448 else … … 502 504 FirstLine := bmp.ScanLine[0]; 503 505 LastLine := bmp.ScanLine[bmp.Height - 1]; 504 if FirstLine < LastLinethen506 if integer(FirstLine) < integer(LastLine) then 505 507 ApplyGamma(pointer(FirstLine), @LastLine[bmp.Width]) 506 508 else … … 620 622 // X channel = background amp (old Dst content), 128=original brightness 621 623 type 622 TPixel = array [0..2] of Byte; 623 PPixel = ^TPixel; 624 TPixel = array [0 .. 2] of Byte; 624 625 var 625 626 i, Brightness, test: integer; 626 627 PixelSrc: ^Byte; 627 PixelDst: PPixel;628 PixelDst: ^TPixel; 628 629 begin 629 630 {TODO assert(Src.PixelFormat = pf8bit);} … … 652 653 while yDst < h do 653 654 begin 654 PixelDst := dst.ScanLine[yDst] + 3 * xDst;655 PixelSrc := Src.ScanLine[ySrc] + xSrc;655 PixelDst := pointer(integer(dst.ScanLine[yDst]) + 3 * xDst); 656 PixelSrc := pointer(integer(Src.ScanLine[ySrc]) + xSrc); 656 657 for i := 0 to w - 1 do 657 658 begin … … 672 673 else 673 674 PixelDst[0] := test; // Blue 674 PixelDst := Pointer(PixelDst) + 3;675 PixelSrc := Pointer(PixelSrc) + 1;675 PixelDst := pointer(integer(PixelDst) + 3); 676 PixelSrc := pointer(integer(PixelSrc) + 1); 676 677 end; 677 678 inc(yDst); … … 763 764 while y < h do 764 765 begin 765 Pixel := bmp.ScanLine[y] + 3 * x;766 Pixel := pointer(integer(bmp.ScanLine[y]) + 3 * x); 766 767 for i := 0 to w - 1 do 767 768 begin … … 776 777 Pixel[1] := Green; 777 778 Pixel[2] := Red; 778 Pixel := Pointer(Pixel) + 3;779 Pixel := pointer(integer(Pixel) + 3); 779 780 end; 780 781 inc(y);
Note:
See TracChangeset
for help on using the changeset viewer.