Changeset 459 for GraphicTest
- Timestamp:
- Nov 28, 2012, 8:09:38 AM (12 years ago)
- Location:
- GraphicTest
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/GraphicTest.lpi
r454 r459 19 19 <SearchPaths> 20 20 <IncludeFiles Value="$(ProjOutDir)"/> 21 <OtherUnitFiles Value="Methods"/> 21 22 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> 22 23 </SearchPaths> … … 118 119 <IsPartOfProject Value="True"/> 119 120 <ComponentName Value="DrawForm"/> 121 <HasResources Value="True"/> 120 122 <ResourceBaseClass Value="Form"/> 121 123 <UnitName Value="UDrawForm"/> -
GraphicTest/Methods/UBGRABitmapPaintBox.pas
r454 r459 44 44 BGRABitmap := TBGRABitmap.Create(0, 0); 45 45 PaintObject := poPaintBox; 46 Description.Add('This method use graphic library BGRABitmap. ' + 47 'PaintBox is used to display image data.'); 46 48 end; 47 49 -
GraphicTest/Methods/UBitmapRawImageData.pas
r447 r459 25 25 inherited; 26 26 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.'); 27 29 end; 28 30 -
GraphicTest/Methods/UBitmapRawImageDataMove.pas
r447 r459 25 25 inherited; 26 26 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.'); 27 30 end; 28 31 -
GraphicTest/Methods/UBitmapRawImageDataPaintBox.pas
r452 r459 6 6 7 7 uses 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; 10 10 11 11 type … … 13 13 14 14 TBitmapRawImageDataPaintBox = class(TDrawMethodPaintBox) 15 TempBitmap: TBitmap; 15 16 constructor Create; override; 17 procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override; 18 procedure Done; override; 16 19 procedure Paint(Sender: TObject); override; 17 20 procedure DrawFrame(FastBitmap: TFastBitmap); override; … … 28 31 Caption := 'TBitmap.RawImage.Data PaintBox'; 29 32 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.'); 35 end; 36 37 procedure TBitmapRawImageDataPaintBox.Init(Parent: TWinControl; Size: TPoint; 38 PixelFormat: TPixelFormat); 39 begin 40 inherited; 41 TempBitmap := TBitmap.Create; 42 TempBitmap.PixelFormat := PixelFormat; 43 TempBitmap.SetSize(Size.X, Size.Y); 44 end; 45 46 procedure TBitmapRawImageDataPaintBox.Done; 47 begin 48 FreeAndNil(TempBitmap); 49 inherited Done; 30 50 end; 31 51 -
GraphicTest/Methods/UGraphics32Method.pas
r454 r459 6 6 7 7 uses 8 Classes, SysUtils, UFastBitmap, UDrawMethod , GR32, GR32_Image, Controls,8 Classes, SysUtils, UFastBitmap, UDrawMethod{$IFDEF gr32}, GR32, GR32_Image{$ENDIF}, Controls, 9 9 Graphics; 10 10 11 {$IFDEF gr32} 11 12 type 12 13 { TGraphics32Method } … … 20 21 procedure Done; override; 21 22 end; 22 23 {$ENDIF} 23 24 24 25 implementation 25 26 27 {$IFDEF gr32} 26 28 { TGraphics32Method } 27 29 … … 92 94 end; 93 95 96 {$ENDIF} 97 94 98 end. 95 99 -
GraphicTest/Methods/ULazIntfImageColorsCopy.pas
r447 r459 29 29 Caption := 'TLazIntfImage.Colors copy'; 30 30 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.'); 31 33 end; 32 34 -
GraphicTest/Methods/ULazIntfImageColorsNoCopy.pas
r454 r459 35 35 inherited; 36 36 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.'); 37 39 end; 38 40 -
GraphicTest/Methods/UOpenGLMethod.pas
r451 r459 31 31 Caption := 'OpenGL'; 32 32 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.'); 33 35 end; 34 36 -
GraphicTest/Methods/UOpenGLPBOMethod.pas
r454 r459 69 69 Index := 0; 70 70 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.'); 71 73 end; 72 74 -
GraphicTest/UDrawMethod.pas
r454 r459 27 27 StepDuration: TDateTime; 28 28 PaintObject: TPaintObject; 29 TempBitmap: TBitmap;30 29 FrameCounter: Integer; 31 30 FrameCounterStart: TDateTime; … … 112 111 Image.Parent := Parent; 113 112 Image.SetBounds(0, 0, Size.X, Size.Y); 113 Image.Picture.Bitmap.PixelFormat := PixelFormat; 114 114 Image.Picture.Bitmap.SetSize(Size.X, Size.Y); 115 Image.Picture.Bitmap.PixelFormat := PixelFormat;116 115 Image.Show; 117 116 end; … … 195 194 procedure TDrawMethod.Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); 196 195 begin 197 if (TempBitmap.Width <> Size.X) or (TempBitmap.Height <> Size.Y) then198 TempBitmap.SetSize(Size.X, Size.Y);199 196 end; 200 197 … … 206 203 constructor TDrawMethod.Create; 207 204 begin 208 TempBitmap := TBitmap.Create;209 205 Description := TStringList.Create; 210 206 end; … … 213 209 begin 214 210 FreeAndNil(Description); 215 FreeAndNil(TempBitmap); 216 inherited Destroy; 211 inherited; 217 212 end; 218 213 -
GraphicTest/UMainForm.pas
r454 r459 114 114 115 115 const 116 DrawMethodClasses: array[0.. 9{$IFDEF opengl}+2{$ENDIF}] of TDrawMethodClass = (116 DrawMethodClasses: array[0..8{$IFDEF opengl}+2{$ENDIF}{$IFDEF gr32}+1{$ENDIF}] of TDrawMethodClass = ( 117 117 TCanvasPixels, TCanvasPixelsUpdateLock, TLazIntfImageColorsCopy, 118 118 TLazIntfImageColorsNoCopy, TBitmapRawImageData, TBitmapRawImageDataPaintBox, 119 TBitmapRawImageDataMove, TBGRABitmapPaintBox, TGraphics32Method{$IFDEF opengl}, TOpenGLMethod, TOpenGLPBOMethod{$ENDIF} 119 TBitmapRawImageDataMove, TBGRABitmapPaintBox 120 {$IFDEF gr32}, TGraphics32Method{$ENDIF} 121 {$IFDEF opengl}, TOpenGLMethod, TOpenGLPBOMethod{$ENDIF} 120 122 ,TDummyMethod); 121 123
Note:
See TracChangeset
for help on using the changeset viewer.