Changeset 543 for GraphicTest


Ignore:
Timestamp:
May 14, 2020, 11:10:24 AM (5 years ago)
Author:
chronos
Message:
  • Modified: Removed drawing methods files and classes to use Method prefix.
  • Added: TBitmap.Scanline and Move draw methods.
Location:
GraphicTest
Files:
14 added
12 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Forms/UFormMain.pas

    r524 r543  
    118118
    119119uses
    120   UFormDraw, ULazIntfImageColorsCopy, ULazIntfImageColorsNoCopy, UCanvasPixels,
    121   UCanvasPixelsUpdateLock, UBGRABitmapPaintBox, UBitmapRawImageDataPaintBox,
    122   UBitmapRawImageData, UBitmapRawImageDataMove, UDummyMethod, UOpenGLMethod,
    123   UOpenGLPBOMethod{$IFDEF GRAPHICS32}, UGraphics32Method{$ENDIF};
     120  UFormDraw, UMethodLazIntfImageColorsCopy, UMethodLazIntfImageColorsNoCopy, UMethodCanvasPixels,
     121  UMethodCanvasPixelsUpdateLock, UMethodBGRABitmap, UMethodBitmapRawImageDataPaintBox,
     122  UMethodBitmapRawImageData, UMethodBitmapRawImageDataMove, UMethodDummy, UMethodOpenGL,
     123  UMethodOpenGLPBO{$IFDEF GRAPHICS32}, UGraphics32Method{$ENDIF},
     124  UMethodBitmapScanline, UMethodMove;
    124125
    125126{ TFormMain }
     
    404405procedure TFormMain.RegisterDrawMethods;
    405406begin
    406   RegisterDrawMethod(TCanvasPixels);
    407   RegisterDrawMethod(TCanvasPixelsUpdateLock);
    408   RegisterDrawMethod(TLazIntfImageColorsCopy);
    409   RegisterDrawMethod(TLazIntfImageColorsNoCopy);
    410   RegisterDrawMethod(TBitmapRawImageData);
    411   RegisterDrawMethod(TBitmapRawImageDataPaintBox);
    412   RegisterDrawMethod(TBitmapRawImageDataMove);
    413   RegisterDrawMethod(TBGRABitmapPaintBox);
     407  RegisterDrawMethod(TMethodCanvasPixels);
     408  RegisterDrawMethod(TMethodCanvasPixelsUpdateLock);
     409  RegisterDrawMethod(TMethodLazIntfImageColorsCopy);
     410  RegisterDrawMethod(TMethodLazIntfImageColorsNoCopy);
     411  RegisterDrawMethod(TMethodBitmapRawImageData);
     412  RegisterDrawMethod(TMethodBitmapRawImageDataPaintBox);
     413  RegisterDrawMethod(TMethodBitmapRawImageDataMove);
     414  RegisterDrawMethod(TMethodBitmapScanline);
     415  RegisterDrawMethod(TMethodBGRABitmap);
    414416  {$IFDEF GRAPHICS32}
    415   RegisterDrawMethod(TGraphics32Method);
     417  RegisterDrawMethod(TMethodGraphics32);
    416418  {$ENDIF}
    417419  {$IFDEF OPENGL}
    418   RegisterDrawMethod(TOpenGLMethod);
    419   RegisterDrawMethod(TOpenGLPBOMethod);
     420  RegisterDrawMethod(TMethodOpenGL);
     421  RegisterDrawMethod(TMethodOpenGLPBO);
    420422  {$ENDIF}
    421   RegisterDrawMethod(TDummyMethod);
     423  RegisterDrawMethod(TMethodMove);
     424  RegisterDrawMethod(TMethodDummy);
    422425end;
    423426
  • GraphicTest/GraphicTest.lpi

    r524 r543  
    7474      </Modes>
    7575    </RunParams>
    76     <RequiredPackages Count="5">
     76    <RequiredPackages Count="4">
    7777      <Item1>
    78         <PackageName Value="GR32_Lazarus"/>
    79         <DefaultFilename Value="Packages/Graphics32/Packages/GR32_Lazarus.lpk" Prefer="True"/>
     78        <PackageName Value="lazopenglcontext"/>
    8079      </Item1>
    8180      <Item2>
    82         <PackageName Value="lazopenglcontext"/>
     81        <PackageName Value="BGRABitmapPack"/>
     82        <DefaultFilename Value="Packages/bgrabitmap/bgrabitmappack.lpk" Prefer="True"/>
    8383      </Item2>
    8484      <Item3>
    85         <PackageName Value="BGRABitmapPack"/>
    86         <DefaultFilename Value="Packages/bgrabitmap/bgrabitmappack.lpk" Prefer="True"/>
     85        <PackageName Value="SynEdit"/>
    8786      </Item3>
    8887      <Item4>
    89         <PackageName Value="SynEdit"/>
     88        <PackageName Value="LCL"/>
    9089      </Item4>
    91       <Item5>
    92         <PackageName Value="LCL"/>
    93       </Item5>
    9490    </RequiredPackages>
    95     <Units Count="18">
     91    <Units Count="20">
    9692      <Unit0>
    9793        <Filename Value="GraphicTest.lpr"/>
     
    125121      </Unit5>
    126122      <Unit6>
    127         <Filename Value="Methods/UCanvasPixels.pas"/>
     123        <Filename Value="Methods/UMethodCanvasPixels.pas"/>
    128124        <IsPartOfProject Value="True"/>
    129125      </Unit6>
    130126      <Unit7>
    131         <Filename Value="Methods/UCanvasPixelsUpdateLock.pas"/>
     127        <Filename Value="Methods/UMethodCanvasPixelsUpdateLock.pas"/>
    132128        <IsPartOfProject Value="True"/>
    133129      </Unit7>
    134130      <Unit8>
    135         <Filename Value="Methods/ULazIntfImageColorsCopy.pas"/>
     131        <Filename Value="Methods/UMethodLazIntfImageColorsCopy.pas"/>
    136132        <IsPartOfProject Value="True"/>
    137133      </Unit8>
    138134      <Unit9>
    139         <Filename Value="Methods/ULazIntfImageColorsNoCopy.pas"/>
     135        <Filename Value="Methods/UMethodLazIntfImageColorsNoCopy.pas"/>
    140136        <IsPartOfProject Value="True"/>
    141137      </Unit9>
    142138      <Unit10>
    143         <Filename Value="Methods/UBGRABitmapPaintBox.pas"/>
     139        <Filename Value="Methods/UMethodBGRABitmap.pas"/>
    144140        <IsPartOfProject Value="True"/>
    145141      </Unit10>
    146142      <Unit11>
    147         <Filename Value="Methods/UBitmapRawImageDataPaintBox.pas"/>
     143        <Filename Value="Methods/UMethodBitmapRawImageDataPaintBox.pas"/>
    148144        <IsPartOfProject Value="True"/>
    149145      </Unit11>
    150146      <Unit12>
    151         <Filename Value="Methods/UBitmapRawImageData.pas"/>
     147        <Filename Value="Methods/UMethodBitmapRawImageData.pas"/>
    152148        <IsPartOfProject Value="True"/>
    153149      </Unit12>
    154150      <Unit13>
    155         <Filename Value="Methods/UDummyMethod.pas"/>
     151        <Filename Value="Methods/UMethodDummy.pas"/>
    156152        <IsPartOfProject Value="True"/>
    157153      </Unit13>
    158154      <Unit14>
    159         <Filename Value="Methods/UBitmapRawImageDataMove.pas"/>
     155        <Filename Value="Methods/UMethodBitmapRawImageDataMove.pas"/>
    160156        <IsPartOfProject Value="True"/>
    161157      </Unit14>
    162158      <Unit15>
    163         <Filename Value="Methods/UOpenGLMethod.pas"/>
     159        <Filename Value="Methods/UMethodOpenGL.pas"/>
    164160        <IsPartOfProject Value="True"/>
    165161      </Unit15>
    166162      <Unit16>
    167         <Filename Value="Methods/UOpenGLPBOMethod.pas"/>
     163        <Filename Value="Methods/UMethodOpenGLPBO.pas"/>
    168164        <IsPartOfProject Value="True"/>
    169165      </Unit16>
    170166      <Unit17>
    171         <Filename Value="Methods/UGraphics32Method.pas"/>
     167        <Filename Value="Methods/UMethodGraphics32.pas"/>
    172168        <IsPartOfProject Value="True"/>
    173169      </Unit17>
     170      <Unit18>
     171        <Filename Value="Methods/UMethodBitmapScanline.pas"/>
     172        <IsPartOfProject Value="True"/>
     173      </Unit18>
     174      <Unit19>
     175        <Filename Value="Methods/UMethodMove.pas"/>
     176        <IsPartOfProject Value="True"/>
     177      </Unit19>
    174178    </Units>
    175179  </ProjectOptions>
  • GraphicTest/GraphicTest.lpr

    r524 r543  
    88  {$ENDIF}{$ENDIF}
    99  Interfaces, // this includes the LCL widgetset
    10   Forms, SysUtils, openglcontext, UFormMain, UPlatform, UDrawMethod, UFastBitmap,
    11   UFormDraw, bgrabitmappack,
    12   UCanvasPixels, UCanvasPixelsUpdateLock,
    13   ULazIntfImageColorsCopy, ULazIntfImageColorsNoCopy, UBGRABitmapPaintBox,
    14   UBitmapRawImageDataPaintBox, UBitmapRawImageData, UDummyMethod,
    15   UBitmapRawImageDataMove, UOpenGLMethod, UOpenGLPBOMethod, UGraphics32Method;
     10  Forms, SysUtils, openglcontext, UFormMain, UPlatform, UDrawMethod,
     11  UFastBitmap, UFormDraw, bgrabitmappack, UMethodCanvasPixels,
     12  UMethodCanvasPixelsUpdateLock, UMethodLazIntfImageColorsCopy, UMethodLazIntfImageColorsNoCopy,
     13  UMethodBGRABitmap, UMethodBitmapRawImageDataPaintBox, UMethodBitmapRawImageData,
     14  UMethodDummy, UMethodBitmapRawImageDataMove, UMethodOpenGL, UMethodOpenGLPBO,
     15  UMethodGraphics32, UMethodBitmapScanline;
    1616
    1717{$R *.res}
  • GraphicTest/UDrawMethod.pas

    r472 r543  
    77uses
    88  Classes, SysUtils, ExtCtrls, UPlatform, UFastBitmap, Graphics, Controls,
    9   LCLType, IntfGraphics, fpImage, GraphType, DateUtils,
     9  LCLType, IntfGraphics, fpImage, GraphType, DateUtils, Forms,
    1010  {$IFDEF OPENGL}GL, GLExt, OpenGLContext,{$ENDIF}
    1111  LclIntf;
    1212
    1313type
    14   TPaintObject = (poImage, poPaintBox, poOpenGL);
     14  TPaintObject = (poImage, poPaintBox, poOpenGL, poCanvas);
    1515
    1616
     
    6565  end;
    6666
     67  { TDrawMethodCanvas }
     68
     69  TDrawMethodCanvas = class(TDrawMethod)
     70    Canvas: TCanvas;
     71    procedure UpdateSettings; override;
     72    procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override;
     73    procedure Done; override;
     74  end;
     75
    6776  {$IFDEF OPENGL}
    6877
     
    8493
    8594implementation
     95
     96{ TDrawMethodCanvas }
     97
     98procedure TDrawMethodCanvas.UpdateSettings;
     99begin
     100  inherited UpdateSettings;
     101end;
     102
     103procedure TDrawMethodCanvas.Init(Parent: TWinControl; Size: TPoint;
     104  PixelFormat: TPixelFormat);
     105begin
     106  Canvas := TForm(Parent).Canvas;
     107end;
     108
     109procedure TDrawMethodCanvas.Done;
     110begin
     111  inherited Done;
     112end;
    86113
    87114
Note: See TracChangeset for help on using the changeset viewer.