THPDFPage.SetGrayStrokeColor

THPDFPage

 

Haut  Précédent  Suivant

Sets stroke color.

 

Syntaxe Delphi :

procedure SetGrayStrokeColor ( GrayColor: Extended );

 

Syntaxe C++ :

void __fastcall SetGrayStrokeColor ( Extended GrayColor);

 

Description:

Appelez SetGrayStrokeColor pour définir la valeur de la couleur de tracé

 

Valeur GrayColor de 0 (noir) à 1 (blanc)

 

Exemple de code

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

var
    HPDF: THotPDF;

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

        HPDF.CurrentPage.SetGrayStrokeColor ( 0.252 ); // Set gray stroke color
        HPDF.CurrentPage.SetGrayFillColor ( 0.525 );       // Set gray fill color

        HPDF.CurrentPage.Rectangle( 10, 10, 100, 100 ); // Draw rectangle
        HPDF.CurrentPage.FillAndStroke;                       // and color fill and stroke

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

 

Voir aussi: SetGrayColor, SetGrayFillColor, SetRGBColor, SetRGBFillColor, SetRGBStrokeColor.