Ignore:
Timestamp:
Dec 21, 2016, 3:49:27 PM (8 years ago)
Author:
chronos
Message:
  • Modified: For single class layer TPixmap and TColor is used. They have TBPixmap and TBColor backends pairs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gbitmap/GPixmap.pas

    r18 r20  
    5353    FData: PByte;
    5454    FSize: TPoint;
     55    FCanvas: TGCanvas<TGColor>;
    5556    function GetPixel(X, Y: Integer): TGColor; virtual;
    5657    function GetSize: TPoint; virtual;
     
    6061    procedure CheckLimits(X, Y: Integer);
    6162  public
    62     Canvas: TGCanvas<TGColor>;
    6363    constructor Create;
    6464    destructor Destroy; override;
     
    6767    procedure Fill(Func: TGGetColor); overload;
    6868    function GetDataSize: Int64; virtual;
     69    property Canvas: TGCanvas<TGColor> read FCanvas;
    6970    property Pixels[X, Y: Integer]: TGColor read GetPixel write SetPixel;
    7071    property Size: TPoint read GetSize write SetSize;
     
    120121constructor TGPixmap<TGColor>.Create;
    121122begin
    122   Canvas := TGCanvas<TGColor>.Create;
    123   Canvas.Bitmap := Self;
     123  FCanvas := TGCanvas<TGColor>.Create;
     124  FCanvas.Bitmap := Self;
    124125end;
    125126
     
    127128begin
    128129  Size := Point(0, 0);
     130  FreeAndNil(FCanvas);
    129131end;
    130132
Note: See TracChangeset for help on using the changeset viewer.