Changeset 494 for GraphicTest/Packages/bgrabitmap/bgragrayscalemask.pas
- Timestamp:
- Dec 22, 2016, 8:49:19 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/Packages/bgrabitmap/bgragrayscalemask.pas
r472 r494 39 39 procedure DownSamplePutImageGrayscale(source: TBGRACustomBitmap; dest: TGrayscaleMask; ADestRect: TRect); 40 40 41 procedure BGRAFillClearTypeGrayscaleMask(dest: TBGRACustomBitmap; x, 42 y: integer; xThird: integer; mask: TGrayscaleMask; color: TBGRAPixel; 43 texture: IBGRAScanner; RGBOrder: boolean); 44 41 45 implementation 42 46 43 uses GraphType, BGRABlend; 47 uses BGRABlend; 48 49 procedure BGRAFillClearTypeGrayscaleMask(dest: TBGRACustomBitmap; x, 50 y: integer; xThird: integer; mask: TGrayscaleMask; color: TBGRAPixel; 51 texture: IBGRAScanner; RGBOrder: boolean); 52 var delta: NativeInt; 53 begin 54 delta := mask.Width; 55 BGRABlend.BGRAFillClearTypeMaskPtr(dest,x,y,xThird,mask.ScanLine[0],1,delta,mask.Width,mask.Height,color,texture,RGBOrder); 56 end; 44 57 45 58 { TGrayscaleMask } … … 77 90 pdest := FData; 78 91 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; 82 95 else 83 ofs := 0;96 ofs := TBGRAPixel_BlueByteOffset; 84 97 end; 85 98 for y := 0 to FHeight-1 do
Note:
See TracChangeset
for help on using the changeset viewer.