THPDFPage.ShowImage

THPDFPage

 

Top  Previous  Next

Shows image at specified coordinates.

 

Delphi syntax:

procedure ShowImage ( ImageIndex: Integer; X, Y, W, H, Angle: Extended );

 

C++ syntax:

void __fastcall ShowImage ( int ImageIndex, Extended x, Extended y, Extended w, Extended h, Extended Angle );

 

Description:

ShowImage를 호출해 인덱스( THotPDF.AddImage가 반환한 ImageIndex ), 좌표( X, Y ), 폭과 높이( W, H ), 각도( Angle )로 지정한 이미지를 그립니다

 

Code Example

program ImageDemo;
{$APPTYPE CONSOLE}
uses
  SysUtils,
  Graphics,
  Classes,
  HPDFDoc;

var
   I: Integer;
   HPDF: THotPDF;
   Index: Integer;

begin
  HPDF:= THotPDF.Create( nil );
  try
    HPDF.AutoLaunch := true;                     // PDF file will be shown automatically
    HPDF.FileName := '\ImageDemo.pdf';     // Set PDF filename

    HPDF.BeginDoc;                    // Create PDF file

    Index := HPDF.AddImage( '\Image.jpg', icJpeg );                     // Add image to the document
    HPDF.CurrentPage.ShowImage( Index, 10, 10, 390, 300, 0 );   // Show image with sizes 390 x 300

    HPDF.EndDoc;                       // Close PDF file
  finally
      HPDF.Free;
  end;
end.