THPDFPage.SetGrayColor

THPDFPage

 

トップへ  前へ  次へ

塗りつぶしとストロークの色を設定します。

 

Delphi 構文:

procedure SetGrayColor ( GrayColor: Extended );

 

C++ 構文:

void __fastcall SetGrayColor ( Extended GrayColor);

 

説明:

SetGrayColor の呼び出しは、塗りつぶしとストロークの色の値を設定します。この関数は、同じ値で SetGrayFillColor と SetGrayStrokeColor の2つの関数を呼び出すことと同じです。

GrayColor value from 0( black )  to  1( white ).

 

コード例

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.File名前 := '\Rectangle.pdf';                   // Set PDF filename
        HPDF.BeginDoc;                                               // Create PDF file
        HPDF.CurrentPage.SetGrayColor ( 0.525 );          // Set gray color
        HPDF.CurrentPage.Rectangle( 10, 10, 100, 100 ); // Draw rectangle
        HPDF.CurrentPage.FillAndStroke;                       // and fill and stroke
        HPDF.EndDoc;                                                  // Close PDF file
    finally
        HPDF.Free;
    end;
end.

 

See also: SetGrayFillColor, SetGrayStrokeColor, SetRGBColor, SetRGBFillColor, SetRGBStrokeColor.