Ignore:
Timestamp:
Apr 17, 2019, 12:58:41 AM (5 years ago)
Author:
chronos
Message:
  • Modified: Propagate project build mode options to used packages.
  • Added: Check memory leaks using heaptrc.
  • Modified: Update BGRABitmap package.
Location:
GraphicTest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest

    • Property svn:ignore
      •  

        old new  
        88GraphicTest.lps
        99GraphicTest.dbg
         10heaptrclog.trc
  • GraphicTest/Packages/bgrabitmap/bgrafilterscanner.pas

    r494 r521  
    6161      ADest: PBGRAPixel; ACount: integer); override;
    6262  public
    63     constructor Create(ASource: IBGRAScanner; ABounds: TRect);
    64     constructor Create(ASource: TBGRACustomBitmap);
     63    constructor Create(ASource: IBGRAScanner; ABounds: TRect); overload;
     64    constructor Create(ASource: TBGRACustomBitmap); overload;
    6565    property SourceBorderColor: TBGRAPixel read FSourceBorderColor write FSourceBorderColor;
    6666    property DestinationBorderColor: TBGRAPixel read FDestinationBorderColor write FDestinationBorderColor;
     
    7979  public
    8080    constructor Create(ASource: IBGRAScanner; ABounds: TRect;
    81                        AGammaCorrection: boolean = False);
     81                       AGammaCorrection: boolean = False); overload;
    8282    constructor Create(ASource: TBGRACustomBitmap;
    83                        AGammaCorrection: boolean = False);
     83                       AGammaCorrection: boolean = False); overload;
    8484    property Opacity: Byte read FOpacity write FOpacity;
    8585  end;
     
    9393  public
    9494    constructor Create(ASource: IBGRAScanner; ABounds: TRect;
    95                        AAmount: integer = 256);
     95                       AAmount: integer = 256); overload;
    9696    constructor Create(ASource: TBGRACustomBitmap;
    97                        AAmount: integer = 256);
     97                       AAmount: integer = 256); overload;
    9898  end;
    9999
     
    108108    procedure SetSourceChannel(AValue: TChannel);
    109109  public
    110     constructor Create(ASource: IBGRAScanner; ABounds: TRect; ABoundsVisible: Boolean);
    111     constructor Create(ASource: TBGRACustomBitmap; ABoundsVisible: Boolean);
     110    constructor Create(ASource: IBGRAScanner; ABounds: TRect; ABoundsVisible: Boolean); overload;
     111    constructor Create(ASource: TBGRACustomBitmap; ABoundsVisible: Boolean); overload;
    112112    property FillSelection: boolean read FFillSelection write FFillSelection;
    113113    property SourceChannel: TChannel read FSourceChannel write SetSourceChannel;
     
    138138  highlight: TBGRAPixel;
    139139begin
    140   sum := (PByte(PTop)+FChannelOffset)^ + (PByte(PTop+1)+FChannelOffset)^+
    141          (PByte(PMiddle)+FChannelOffset)^ - (PByte(PMiddle+2)+FChannelOffset)^ -
    142          (PByte(PBottom+1)+FChannelOffset)^ - (PByte(PBottom+2)+FChannelOffset)^;
     140  sum := NativeInt((PByte(PTop)+FChannelOffset)^) +
     141         NativeInt((PByte(PTop+1)+FChannelOffset)^) +
     142         NativeInt((PByte(PMiddle)+FChannelOffset)^) -
     143         NativeInt((PByte(PMiddle+2)+FChannelOffset)^) -
     144         NativeInt((PByte(PBottom+1)+FChannelOffset)^) -
     145         NativeInt((PByte(PBottom+2)+FChannelOffset)^);
    143146  sum := 128 - sum div 3;
    144147  if sum > 255 then
     
    711714      begin
    712715        if ADest^.alpha <> 0 then
    713           DWord(ADest^) := DWord(ADest^) xor (not ($ff shl TBGRAPixel_AlphaShift));
     716          DWord(ADest^) := DWord(ADest^) xor ($ffffffff and not ($ff shl TBGRAPixel_AlphaShift));
    714717        Inc(ADest);
    715718        dec(ACount);
     
    738741          ADest^ := BGRAPixelTransparent
    739742        else
    740           DWord(ADest^) := DWord(ASource^) xor (not ($ff shl TBGRAPixel_AlphaShift));
     743          DWord(ADest^) := DWord(ASource^) xor ($ffffffff and not ($ff shl TBGRAPixel_AlphaShift));
    741744        inc(ASource);
    742745        Inc(ADest);
Note: See TracChangeset for help on using the changeset viewer.