Ignore:
Timestamp:
Apr 9, 2015, 9:58:36 PM (10 years ago)
Author:
chronos
Message:
  • Fixed: Use csOpaque control style also to Image, PaintBox and OpenGLControl.
  • Modified: Change size of test frame with SpinEdits as delayed using timer.
  • Updated: BRGABitmap package to version 8.1.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Packages/bgrabitmap/renderdensity256.inc

    r452 r472  
    1717          for xb := densMinX to densMaxX do
    1818          begin
    19             j := pdens^;
     19            tempDensity := pdens^;
    2020            Inc(pdens);
    2121            c := pscan^;
    2222            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,
    2528              {$ifdef PARAM_ANTIALIASINGFACTOR}DivByAntialiasPrecision256{$endif}
    26               (c.alpha * j
     29              (c.alpha * tempDensity
    2730              {$ifdef PARAM_ANTIALIASINGFACTOR} ) {$else} +128) shr 8 {$endif}
    2831              ));
     
    3336          for xb := densMinX to densMaxX do
    3437          begin
    35             j := pdens^;
     38            tempDensity := pdens^;
    3639            Inc(pdens);
    3740            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,
    4046              {$ifdef PARAM_ANTIALIASINGFACTOR}DivByAntialiasPrecision256{$endif}
    41               (c.alpha * j
     47              (c.alpha * tempDensity
    4248              {$ifdef PARAM_ANTIALIASINGFACTOR} ) {$else} +128) shr 8 {$endif}
    4349              ));
     
    5157        for xb := densMinX to densMaxX do
    5258        begin
    53           j := pdens^;
     59          tempDensity := pdens^;
    5460          Inc(pdens);
    55           if j <> 0 then
     61          if tempDensity <> 0 then
    5662            ErasePixelInline(pdest,
    5763            {$ifdef PARAM_ANTIALIASINGFACTOR}DivByAntialiasPrecision256{$endif}
    58             (c.alpha * j
     64            (c.alpha * tempDensity
    5965            {$ifdef PARAM_ANTIALIASINGFACTOR} ) {$else} +128) shr 8 {$endif}
    6066            );
     
    6672        for xb := densMinX to densMaxX do
    6773        begin
    68           j := pdens^;
     74          tempDensity := pdens^;
    6975          Inc(pdens);
    70           if j <> 0 then
     76          if tempDensity <> 0 then
    7177          begin
    7278            c2.alpha :=
    7379              {$ifdef PARAM_ANTIALIASINGFACTOR}DivByAntialiasPrecision256{$endif}
    74               (c.alpha * j
     80              (c.alpha * tempDensity
    7581              {$ifdef PARAM_ANTIALIASINGFACTOR} ) {$else} +128) shr 8 {$endif}
    7682              ;
     83            {$ifdef PARAM_LINEARANTIALIASING}
     84            FastBlendPixelInline(pdest, c2);
     85            {$else}
    7786            DrawPixelInlineExpandedOrNotWithAlphaCheck(pdest, ec, c2);
     87            {$endif}
    7888          end;
    7989          Inc(pdest);
     
    8393  end
    8494{$undef PARAM_ANTIALIASINGFACTOR}
     95{$undef PARAM_LINEARANTIALIASING}
Note: See TracChangeset for help on using the changeset viewer.