Changeset 459 for GraphicTest/Methods


Ignore:
Timestamp:
Nov 28, 2012, 8:09:38 AM (12 years ago)
Author:
chronos
Message:
  • Added: Brief description for rest of available draw methods.
  • Added: Graphics32 method conditional compilation.
Location:
GraphicTest/Methods
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Methods/UBGRABitmapPaintBox.pas

    r454 r459  
    4444  BGRABitmap := TBGRABitmap.Create(0, 0);
    4545  PaintObject := poPaintBox;
     46  Description.Add('This method use graphic library BGRABitmap. ' +
     47    'PaintBox is used to display image data.');
    4648end;
    4749
  • GraphicTest/Methods/UBitmapRawImageData.pas

    r447 r459  
    2525  inherited;
    2626  Caption := 'TBitmap.RawImage.Data';
     27  Description.Add('Custom TFastBitmap data are converted to visible image bitmap raw data. ' +
     28    'Then TImage is responsible for show loaded data.');
    2729end;
    2830
  • GraphicTest/Methods/UBitmapRawImageDataMove.pas

    r447 r459  
    2525  inherited;
    2626  Caption := 'TBitmap.RawImage.Data Move';
     27  Description.Add('This is same as BitmapRawImageData but data is not converted from different format. ' +
     28   'But only moved to TImage raw data. ' +
     29    'Then TImage is responsible for show loaded data.');
    2730end;
    2831
  • GraphicTest/Methods/UBitmapRawImageDataPaintBox.pas

    r452 r459  
    66
    77uses
    8   Classes, SysUtils, UDrawMethod, UFastBitmap, Graphics, LCLType,
    9   FPimage, IntfGraphics, GraphType{$IFDEF windows}, Windows{$ENDIF};
     8  {$IFDEF windows}Windows,{$ENDIF}Classes, SysUtils, Controls, UDrawMethod, UFastBitmap, Graphics, LCLType,
     9  FPimage, IntfGraphics, GraphType;
    1010
    1111type
     
    1313
    1414  TBitmapRawImageDataPaintBox = class(TDrawMethodPaintBox)
     15    TempBitmap: TBitmap;
    1516    constructor Create; override;
     17    procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override;
     18    procedure Done; override;
    1619    procedure Paint(Sender: TObject); override;
    1720    procedure DrawFrame(FastBitmap: TFastBitmap); override;
     
    2831  Caption := 'TBitmap.RawImage.Data PaintBox';
    2932  PaintObject := poPaintBox;
     33  Description.Add('Custom TFastBitmap data are converted to bitmap data compatible with screen. ' +
     34    'Then data is sent to PaintBox by Draw method.');
     35end;
     36
     37procedure TBitmapRawImageDataPaintBox.Init(Parent: TWinControl; Size: TPoint;
     38  PixelFormat: TPixelFormat);
     39begin
     40  inherited;
     41  TempBitmap := TBitmap.Create;
     42  TempBitmap.PixelFormat := PixelFormat;
     43  TempBitmap.SetSize(Size.X, Size.Y);
     44end;
     45
     46procedure TBitmapRawImageDataPaintBox.Done;
     47begin
     48  FreeAndNil(TempBitmap);
     49  inherited Done;
    3050end;
    3151
  • GraphicTest/Methods/UGraphics32Method.pas

    r454 r459  
    66
    77uses
    8   Classes, SysUtils, UFastBitmap, UDrawMethod, GR32, GR32_Image, Controls,
     8  Classes, SysUtils, UFastBitmap, UDrawMethod{$IFDEF gr32}, GR32, GR32_Image{$ENDIF}, Controls,
    99  Graphics;
    1010
     11{$IFDEF gr32}
    1112type
    1213  { TGraphics32Method }
     
    2021    procedure Done; override;
    2122  end;
    22 
     23{$ENDIF}
    2324
    2425implementation
    2526
     27{$IFDEF gr32}
    2628{ TGraphics32Method }
    2729
     
    9294end;
    9395
     96{$ENDIF}
     97
    9498end.
    9599
  • GraphicTest/Methods/ULazIntfImageColorsCopy.pas

    r447 r459  
    2929  Caption := 'TLazIntfImage.Colors copy';
    3030  TempIntfImage := TLazIntfImage.Create(0, 0);
     31  Description.Add('Method use TLazIntfImage class for faster access to bitmap pixels compared to simple access using TBitmap.Pixels.');
     32  Description.Add('TLazIntfImage is created from visible image.');
    3133end;
    3234
  • GraphicTest/Methods/ULazIntfImageColorsNoCopy.pas

    r454 r459  
    3535  inherited;
    3636  Caption := 'TLazIntfImage.Colors no copy';
     37  Description.Add('Method use TLazIntfImage class for faster access to bitmap pixels compared to simple access using TBitmap.Pixels.');
     38  Description.Add('Bitmap is not copied from original bitmap.');
    3739end;
    3840
  • GraphicTest/Methods/UOpenGLMethod.pas

    r451 r459  
    3131  Caption := 'OpenGL';
    3232  PaintObject := poOpenGL;
     33  Description.Add('This method use OpenGL 3D acceleration with simple one 2D orthogonal plane covering all visible area.' +
     34    'Texture data is loaded from bitmap.');
    3335end;
    3436
  • GraphicTest/Methods/UOpenGLPBOMethod.pas

    r454 r459  
    6969  Index := 0;
    7070  NextIndex := 1;
     71  Description.Add('This method use OpenGL acceleration same like other OpenGL method but ' +
     72    'use DMA(Direct Memory Access) for faster texture data transfer without use of CPU.');
    7173end;
    7274
Note: See TracChangeset for help on using the changeset viewer.