Ignore:
Timestamp:
Jan 21, 2018, 10:01:14 PM (7 years ago)
Author:
chronos
Message:
  • Added: Resize virtual screen according form size.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Kernel/UDevice.pas

    r13 r17  
    2424    function GetBytesPerLine: Integer;
    2525    function GetBytesPerImage: Integer;
     26    procedure Assign(Source: TVideoMode);
    2627  end;
    2728
     
    2930
    3031  TDeviceVideo = class(TDevice)
     32  private
     33    FVideoMode: TVideoMode;
     34  protected
     35    procedure SetVideoMode(Mode: TVideoMode); virtual;
     36    function GetVideoMemory: PByte; virtual;
     37  public
    3138    constructor Create; override;
    32     procedure SetMode(Mode: TVideoMode); virtual;
    3339    procedure GetSupportedModes(Modes: TObjectList); virtual;
    34     function GetVideoMemory: PByte; virtual;
    3540    procedure VideoMemoryChange; virtual;
     41    property VideoMode: TVideoMode read FVideoMode write SetVideoMode;
     42    property VideoMemory: PByte read GetVideoMemory;
    3643  end;
    3744
     
    6471end;
    6572
     73procedure TVideoMode.Assign(Source: TVideoMode);
     74begin
     75  Size := Source.Size;
     76  ColorFormat := ColorFormat;
     77end;
     78
    6679{ TDeviceSerial }
    6780
     
    90103  inherited Create;
    91104  ClassName := 'Video device';
     105  FVideoMode := TVideoMode.Create;
    92106end;
    93107
    94 procedure TDeviceVideo.SetMode(Mode: TVideoMode);
     108procedure TDeviceVideo.SetVideoMode(Mode: TVideoMode);
    95109begin
    96110end;
Note: See TracChangeset for help on using the changeset viewer.