THotPDF.Canvas プロパティ

 

THotPDF.Canvas

THotPDF

 

トップへ  前へ  次へ

ドキュメントキャンバスへのアクセスを提供します。

 

Delphi 構文:

property Canvas: TCanvas;

 

C++ 構文:

__property Graphics::TCanvas* Canvas;

 

説明

TCanvas 描画メソッド中に PDF ドキュメントにペイントするには、Canvas プロパティを使用します。

 

コード例

var
  Bitmap: TBitmap;

begin
  Bitmap := TBitmap.Create;
  try
    Bitmap.Width := 200;
    Bitmap.Height := 200;
    Bitmap.Canvas.Brush.Color := clRed;
    Bitmap.Canvas.FillRect( Rect( 0, 0, 200, 200 ) );
    Bitmap.Canvas.Brush.Color := clBlue;
    Bitmap.Canvas.Ellipse( 50, 50, 150, 150 );

    HPDF.Canvas := Bitmap.Canvas;              // Assign Delphi Canvas to HotPDF
    HPDF.CurrentPage.ShowImage( 0, 100, 100, 200, 200 );
  finally
    Bitmap.Free;
  end;
end;