THPDFPage.SetGrayStrokeColor

THPDFPage

 

Oben  Zurück  Weiter

Legt die Umrandungsfarbe fest

 

Delphi-Syntax:

procedure SetGrayStrokeColor ( GrayColor: Extended );

 

C++-Syntax:

void __fastcall SetGrayStrokeColor ( Extended GrayColor);

 

Beschreibung:

Schreibt DeviceGray-Strichkomponenten mit bruchzahler Präzision jenseits von zwei Dezimalstellen

Nicht finite Eingabe löst EConvertError aus, bevor die zwischengespeicherte Farbe oder der Seiteninhalt geändert wird

Rufen Sie SetGrayStrokeColor auf, um den Umrandungsfarbwert festzulegen

 

GrayColor-Wert von 0 (Schwarz) bis 1 (Weiß)

 

Code Example

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.

 

Siehe auch: SetGrayColor, SetGrayFillColor, SetRGBColor, SetRGBFillColor, SetRGBStrokeColor