Ignore:
Timestamp:
Feb 1, 2012, 3:33:59 PM (12 years ago)
Author:
chronos
Message:
  • Fixed: Exchanged numeric values in table columns for Duration and FPS.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/UFastBitmap.pas

    r317 r318  
    99
    1010type
    11  TFastBitmapPixel = Integer;
    12  PFastBitmapPixel = ^TFastBitmapPixel;
    13 
    14  TFastBitmapPixelComponents = packed record
    15    B, G, R, A: Byte;
    16  end;
    17 
    18  { TFastBitmap }
     11
     12  TFastBitmapPixel = Integer;
     13  (*TFastBitmapPixel = record
     14    Blue: Byte;
     15    Green: Byte;
     16    Red: Byte;
     17  end;*)
     18  PFastBitmapPixel = ^TFastBitmapPixel;
     19
     20  TFastBitmapPixelComponents = packed record
     21    B, G, R, A: Byte;
     22  end;
     23
     24const
     25  FastPixelSize = SizeOf(TFastBitmapPixel);
     26
     27type
     28  { TFastBitmap }
    1929
    2030  TFastBitmap = class
     
    166176function TFastBitmap.GetPixel(X, Y: Integer): TFastBitmapPixel;
    167177begin
    168   Result := PFastBitmapPixel(FPixelsData + (Y * FSize.X + X) * SizeOf(TFastBitmapPixel))^;
     178  Result := PFastBitmapPixel(FPixelsData + (Y * FSize.X + X) * FastPixelSize)^;
    169179end;
    170180
    171181procedure TFastBitmap.SetPixel(X, Y: Integer; const AValue: TFastBitmapPixel);
    172182begin
    173   PFastBitmapPixel(FPixelsData + (Y * FSize.X + X) * SizeOf(TFastBitmapPixel))^ := AValue;
     183  PFastBitmapPixel(FPixelsData + (Y * FSize.X + X) * FastPixelSize)^ := AValue;
    174184end;
    175185
     
    178188  if (FSize.X = AValue.X) and (FSize.Y = AValue.X) then Exit;
    179189  FSize := AValue;
    180   FPixelsData := ReAllocMem(FPixelsData, FSize.X * FSize.Y * SizeOf(TFastBitmapPixel));
     190  FPixelsData := ReAllocMem(FPixelsData, FSize.X * FSize.Y * FastPixelSize);
    181191end;
    182192
Note: See TracChangeset for help on using the changeset viewer.