Ignore:
Timestamp:
Sep 25, 2017, 2:48:08 PM (7 years ago)
Author:
chronos
Message:
  • Added: Drawing relative to Canvas. In case of Window drawing relative to Window.
  • Modified: Use custom TPoint and TRectangle if possible.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r11 r13  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ExtCtrls, Menus, ActnList, UKernel, UMemory, UDevice, UPlatformBase, LCLType;
     9  ExtCtrls, Menus, ActnList, UKernel, UMemory, UDevice, UPlatformBase, LCLType,
     10  UGraphics;
    1011
    1112type
     
    8889  VideoDevice.OnRedraw := VideoDeviceRedraw;
    8990  VideoDevice.DPI := Screen.PixelsPerInch;
    90   VideoDevice.VideoMemorySize := Point(PaintBox1.Width, PaintBox1.Height);
     91  VideoDevice.VideoMemorySize := TPoint.Create(PaintBox1.Width, PaintBox1.Height);
    9192  VideoDevice.OnModeChanged := VideoDeviceRedraw;
    9293  Kernel.Devices.Add(VideoDevice);
     
    156157procedure TFormMain.FormDestroy(Sender: TObject);
    157158begin
    158   Kernel.Free;
     159  FreeAndNil(Kernel);
    159160end;
    160161
Note: See TracChangeset for help on using the changeset viewer.