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

Legend:

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

    r16 r17  
    2525
    2626  TScreen = class
     27  private
     28    function GetBytesPerLine: Integer;
     29    function GetBytesPerPixel: Integer;
     30    function GetVideoMemory: PByte;
     31  public
    2732    Device: TObject; // TDeviceVideo;
    2833    Size: TPoint;
    2934    DPI: Integer;
    3035    ColorFormat: TColorFormat;
    31     BytesPerPixel: Integer;
    32     BytesPerLine: Integer;
    33     VideoMemory: PByte;
    3436    Canvas: TCanvas;
    3537    procedure VideoMemoryUpdated;
     38    property BytesPerPixel: Integer read GetBytesPerPixel;
     39    property BytesPerLine: Integer read GetBytesPerLine;
     40    property VideoMemory: PByte read GetVideoMemory;
    3641  end;
    3742
     
    99104{ TScreen }
    100105
     106function TScreen.GetBytesPerLine: Integer;
     107begin
     108  Result := TDeviceVideo(Device).VideoMode.GetBytesPerLine;
     109end;
     110
     111function TScreen.GetBytesPerPixel: Integer;
     112begin
     113  Result := TDeviceVideo(Device).VideoMode.GetBytesPerPixel;
     114end;
     115
     116function TScreen.GetVideoMemory: PByte;
     117begin
     118  Result := TDeviceVideo(Device).VideoMemory;
     119end;
     120
    101121procedure TScreen.VideoMemoryUpdated;
    102122begin
Note: See TracChangeset for help on using the changeset viewer.