Placeholder for topic body

program CanvasDraw;

{$APPTYPE CONSOLE}

uses

SysUtils, Graphics, Classes, HPDFDoc;

 

var

I, Y: Integer;

HPDF: THotPDF;

 

begin

HPDF:= THotPDF.Create(nil);

   try

         Randomize;

HPDF.AutoLaunch := true;// PDF-fil vil blive vist automatisk

HPDF.FileName := 'Canvas Drawing.pdf';

HPDF.BeginDoc;// Opret PDF-fil

HPDF.Canvas.Font.Size := 15;// Indstil skrifttypestørrelse for canvas

I :=20;

Y := 40;

HPDF.Canvas.TextOut(10, 10, 'Canvas Ellipses');//  Udskriv tekst

         whileI <= 520 do//  Tegn farvede

        begin                                                                    //    ellipser

HPDF.Canvas.Brush.Color := random($FFFFFF)   //

HPDF.Canvas.Ellipse(I, Y, I+90, Y + 160);

Inc(I, 30);

Inc( Y, 3 );

         end;

HPDF.EndDoc;// Luk PDF-fil

   finally

HPDF.Free;

   end;

end.