Changeset 472 for GraphicTest/Packages/bgrabitmap/renderdensity256.inc
- Timestamp:
- Apr 9, 2015, 9:58:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/Packages/bgrabitmap/renderdensity256.inc
r452 r472 17 17 for xb := densMinX to densMaxX do 18 18 begin 19 j:= pdens^;19 tempDensity := pdens^; 20 20 Inc(pdens); 21 21 c := pscan^; 22 22 inc(pscan); 23 if j <> 0 then 24 DrawPixelInlineWithAlphaCheck(pdest, BGRA(c.red, c.green, c.blue, 23 if tempDensity <> 0 then 24 {$ifdef PARAM_LINEARANTIALIASING} 25 FastBlendPixelInline 26 {$else} 27 DrawPixelInlineWithAlphaCheck{$endif}(pdest, BGRA(c.red, c.green, c.blue, 25 28 {$ifdef PARAM_ANTIALIASINGFACTOR}DivByAntialiasPrecision256{$endif} 26 (c.alpha * j29 (c.alpha * tempDensity 27 30 {$ifdef PARAM_ANTIALIASINGFACTOR} ) {$else} +128) shr 8 {$endif} 28 31 )); … … 33 36 for xb := densMinX to densMaxX do 34 37 begin 35 j:= pdens^;38 tempDensity := pdens^; 36 39 Inc(pdens); 37 40 c := ScanNextPixelProc(); 38 if j <> 0 then 39 DrawPixelInlineWithAlphaCheck(pdest, BGRA(c.red, c.green, c.blue, 41 if tempDensity <> 0 then 42 {$ifdef PARAM_LINEARANTIALIASING} 43 FastBlendPixelInline 44 {$else} 45 DrawPixelInlineWithAlphaCheck{$endif}(pdest, BGRA(c.red, c.green, c.blue, 40 46 {$ifdef PARAM_ANTIALIASINGFACTOR}DivByAntialiasPrecision256{$endif} 41 (c.alpha * j47 (c.alpha * tempDensity 42 48 {$ifdef PARAM_ANTIALIASINGFACTOR} ) {$else} +128) shr 8 {$endif} 43 49 )); … … 51 57 for xb := densMinX to densMaxX do 52 58 begin 53 j:= pdens^;59 tempDensity := pdens^; 54 60 Inc(pdens); 55 if j<> 0 then61 if tempDensity <> 0 then 56 62 ErasePixelInline(pdest, 57 63 {$ifdef PARAM_ANTIALIASINGFACTOR}DivByAntialiasPrecision256{$endif} 58 (c.alpha * j64 (c.alpha * tempDensity 59 65 {$ifdef PARAM_ANTIALIASINGFACTOR} ) {$else} +128) shr 8 {$endif} 60 66 ); … … 66 72 for xb := densMinX to densMaxX do 67 73 begin 68 j:= pdens^;74 tempDensity := pdens^; 69 75 Inc(pdens); 70 if j<> 0 then76 if tempDensity <> 0 then 71 77 begin 72 78 c2.alpha := 73 79 {$ifdef PARAM_ANTIALIASINGFACTOR}DivByAntialiasPrecision256{$endif} 74 (c.alpha * j80 (c.alpha * tempDensity 75 81 {$ifdef PARAM_ANTIALIASINGFACTOR} ) {$else} +128) shr 8 {$endif} 76 82 ; 83 {$ifdef PARAM_LINEARANTIALIASING} 84 FastBlendPixelInline(pdest, c2); 85 {$else} 77 86 DrawPixelInlineExpandedOrNotWithAlphaCheck(pdest, ec, c2); 87 {$endif} 78 88 end; 79 89 Inc(pdest); … … 83 93 end 84 94 {$undef PARAM_ANTIALIASINGFACTOR} 95 {$undef PARAM_LINEARANTIALIASING}
Note:
See TracChangeset
for help on using the changeset viewer.