Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.183 Beiträge
 
Delphi 12 Athens
 
#8

Re: private function aufrufen/Graphics.Fileformats

  Alt 30. Mär 2009, 17:10
Delphi-Quellcode:
type TMyPicture = class(TPicture)
    procedure Save;
  end;

procedure TMyPicture.Save;
  begin
    //LoadFromStream
    SaveToStream(...);
  end;



// var Picture: TPicture;

TMyPicture(Picture).Save;
[add]
wobei FGraphic ja SaveToStream/LoadFromStream ja frei zugänglich hat

Picture.Graphic.SaveToStream(...);
Delphi-Quellcode:
type TMyGraphic = class(TGraphic)
    procedure Save;
  end;

procedure TMyGraphic.Save;
  begin
    //ReadData(Stream);
    WriteData(Stream);
  end;



// var Picture: TPicture;

TMyGraphic(Picture.Graphic).Save;
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat