Ignore:
Timestamp:
Dec 22, 2016, 8:49:19 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Updated BGRABitmap package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Packages/bgrabitmap/bgragrayscalemask.pas

    r472 r494  
    3939procedure DownSamplePutImageGrayscale(source: TBGRACustomBitmap; dest: TGrayscaleMask; ADestRect: TRect);
    4040
     41procedure BGRAFillClearTypeGrayscaleMask(dest: TBGRACustomBitmap; x,
     42  y: integer; xThird: integer; mask: TGrayscaleMask; color: TBGRAPixel;
     43  texture: IBGRAScanner; RGBOrder: boolean);
     44
    4145implementation
    4246
    43 uses GraphType, BGRABlend;
     47uses BGRABlend;
     48
     49procedure BGRAFillClearTypeGrayscaleMask(dest: TBGRACustomBitmap; x,
     50  y: integer; xThird: integer; mask: TGrayscaleMask; color: TBGRAPixel;
     51  texture: IBGRAScanner; RGBOrder: boolean);
     52var delta: NativeInt;
     53begin
     54  delta := mask.Width;
     55  BGRABlend.BGRAFillClearTypeMaskPtr(dest,x,y,xThird,mask.ScanLine[0],1,delta,mask.Width,mask.Height,color,texture,RGBOrder);
     56end;
    4457
    4558{ TGrayscaleMask }
     
    7790    pdest := FData;
    7891    Case AChannel of
    79       cAlpha: ofs := 3;
    80       cRed: ofs := 2;
    81       cGreen: ofs := 1;
     92      cAlpha: ofs := TBGRAPixel_AlphaByteOffset;
     93      cRed: ofs := TBGRAPixel_RedByteOffset;
     94      cGreen: ofs := TBGRAPixel_GreenByteOffset;
    8295    else
    83       ofs := 0;
     96      ofs := TBGRAPixel_BlueByteOffset;
    8497    end;
    8598    for y := 0 to FHeight-1 do
Note: See TracChangeset for help on using the changeset viewer.