Ignore:
Timestamp:
Nov 23, 2012, 1:11:03 PM (12 years ago)
Author:
chronos
Message:
  • Added: Test using Graphics32 package TGR32Image class.
  • Modified: Used packages are now located uncompressed in Packages subfolder.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/UMainForm.pas

    r449 r450  
    2222    ButtonSingleTest: TButton;
    2323    ButtonStop: TButton;
     24    CheckBox1: TCheckBox;
    2425    CheckBoxDoubleBuffered: TCheckBox;
    2526    CheckBoxEraseBackground: TCheckBox;
     
    4445    procedure ButtonSingleTestClick(Sender: TObject);
    4546    procedure ButtonStopClick(Sender: TObject);
     47    procedure CheckBox1Change(Sender: TObject);
    4648    procedure CheckBoxDoubleBufferedChange(Sender: TObject);
    4749    procedure CheckBoxEraseBackgroundChange(Sender: TObject);
     
    8587  UCanvasPixelsUpdateLock, UBGRABitmapPaintBox, UBitmapRawImageDataPaintBox,
    8688  UBitmapRawImageData, UBitmapRawImageDataMove, UDummyMethod, UOpenGLMethod,
    87   UOpenGLPBOMethod;
     89  UOpenGLPBOMethod, UGraphics32Method;
    8890
    8991const
    90   DrawMethodClasses: array[0..{$IFDEF opengl}10{$ELSE}8{$ENDIF}] of TDrawMethodClass = (
     92  DrawMethodClasses: array[0..9{$IFDEF opengl}+2{$ENDIF}] of TDrawMethodClass = (
    9193    TCanvasPixels, TCanvasPixelsUpdateLock, TLazIntfImageColorsCopy,
    9294    TLazIntfImageColorsNoCopy, TBitmapRawImageData, TBitmapRawImageDataPaintBox,
    93     TBitmapRawImageDataMove, TBGRABitmapPaintBox{$IFDEF opengl}, TOpenGLMethod, TOpenGLPBOMethod{$ENDIF}
     95    TBitmapRawImageDataMove, TBGRABitmapPaintBox, TGraphics32Method{$IFDEF opengl}, TOpenGLMethod, TOpenGLPBOMethod{$ENDIF}
    9496    ,TDummyMethod);
    9597
     
    190192end;
    191193
     194procedure TMainForm.CheckBox1Change(Sender: TObject);
     195begin
     196  if CheckBox1.Checked then
     197    DrawForm.ControlStyle := DrawForm.ControlStyle + [csOpaque]
     198    else DrawForm.ControlStyle := DrawForm.ControlStyle - [csOpaque];
     199end;
     200
    192201procedure TMainForm.CheckBoxDoubleBufferedChange(Sender: TObject);
    193202begin
     
    280289    NewScene := TFastBitmap.Create;
    281290    NewScene.Size := FrameSize;
    282     NewScene.RandomImage;
     291    NewScene.RandomImage(I, SceneFrameCount);
    283292    Scenes.Add(NewScene);
    284293  end;
     
    300309  CheckBoxDoubleBuffered.Checked := DrawForm.DoubleBuffered;
    301310  CheckBoxEraseBackground.Checked := DrawForm.EraseBackgroundEnabled;
     311  CheckBox1.Checked := csOpaque in DrawForm.ControlStyle;
    302312end;
    303313
Note: See TracChangeset for help on using the changeset viewer.