RAD Studio VCL Reference
|
Specifies the graphic that the picture contains.
property Graphic: TGraphic;
__property TGraphic Graphic;
Use Graphic to specify what graphic the TPicture object contains. The graphic can be a bitmap, icon, metafile, or user-defined graphic class.
C++ Examples:
/* The following code draws the graphic in Picture1 in the top-left corner PaintBox1. Place a TPaintBox in the form and a TImage in the form that contains a picture. */ void __fastcall TForm1::Button1Click(TObject *Sender) { PaintBox1->Canvas->Draw(0,0, Image1->Picture->Graphic); }
Delphi Examples:
{ The following code draws the graphic in Picture1 in the top-left corner PaintBox1. Place a TPaintBox in the form and a TImage in the form that contains a picture. } procedure TForm1.Button1Click(Sender: TObject); begin PaintBox1.Canvas.Draw(0,0, Image1.Picture.Graphic); end;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|