Ignore:
Timestamp:
Apr 7, 2024, 11:26:09 PM (6 weeks ago)
Author:
chronos
Message:
  • Modified: Remove U prefix from unit names.
File:
1 moved

Legend:

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

    r59 r60  
    1 unit UGraphics;
    2 
    3 {$mode delphi}
     1unit Kernel.Graphics;
    42
    53interface
    64
    75uses
    8   SysUtils, fgl;
     6  SysUtils, Generics.Collections;
    97
    108type
     
    1614    X: Integer;
    1715    Y: Integer;
    18     function Create(X, Y: Integer): TPoint; inline;
     16    class function Create(X, Y: Integer): TPoint; inline; static;
    1917    function Add(P: TPoint): TPoint;
    2018  end;
     
    3634    Size: TPoint;
    3735    function PointInside(P: TPoint): Boolean;
    38     function Create(Left, Top, Width, Height: Integer): TRectangle; overload; inline;
    39     function Create(Position, Size: TPoint): TRectangle; overload; inline;
     36    class function Create(Left, Top, Width, Height: Integer): TRectangle; overload; inline; static;
     37    class function Create(Position, Size: TPoint): TRectangle; overload; inline; static;
    4038    function AddPoint(P: TPoint): TRectangle;
    4139    property Left: Integer read GetLeft write SetLeft;
     
    8886
    8987  TRaster = class(TGraphicObject)
    90 
    9188  end;
    9289
    9390  TFont = class(TGraphicObject)
    94 
    9591  end;
    9692
     
    10298    CanvasLastId: Integer;
    10399  public
    104     Objects: TFPGObjectList<TGraphicObject>;
    105     Canvases: TFPGObjectList<TCanvas>;
     100    Objects: TObjectList<TGraphicObject>;
     101    Canvases: TObjectList<TCanvas>;
    106102    ParentCanvas: TCanvas;
    107103    function CreateWindow: TWindow;
     
    114110  end;
    115111
     112
    116113implementation
    117114
     
    164161end;
    165162
    166 function TRectangle.Create(Left, Top, Width, Height: Integer): TRectangle;
     163class function TRectangle.Create(Left, Top, Width, Height: Integer): TRectangle;
    167164begin
    168165  Result.Position.X := Left;
     
    172169end;
    173170
    174 function TRectangle.Create(Position, Size: TPoint): TRectangle;
     171class function TRectangle.Create(Position, Size: TPoint): TRectangle;
    175172begin
    176173  Result.Position := Position;
     
    186183{ TPoint }
    187184
    188 function TPoint.Create(X, Y: Integer): TPoint;
     185class function TPoint.Create(X, Y: Integer): TPoint;
    189186begin
    190187  Result.X := X;
     
    263260destructor TWindow.Destroy;
    264261begin
    265   inherited Destroy;
     262  inherited;
    266263end;
    267264
     
    317314constructor TDesktop.Create;
    318315begin
    319   Objects := TFPGObjectList<TGraphicObject>.Create;
    320   Canvases := TFPGObjectList<TCanvas>.Create;
     316  Objects := TObjectList<TGraphicObject>.Create;
     317  Canvases := TObjectList<TCanvas>.Create;
    321318end;
    322319
     
    325322  FreeAndNil(Canvases);
    326323  FreeAndNil(Objects);
    327   inherited Destroy;
     324  inherited;
    328325end;
    329326
Note: See TracChangeset for help on using the changeset viewer.