THPDFPage.SetGrayFillColor

THPDFPage

Top  Previous  Next

Sets fill color.

 

Delphi syntax:

procedure SetGrayFillColor ( GrayColor: Extended );

 

C++ syntax:

void __fastcall SetGrayFillColor ( Extended GrayColor);

 

Description:

DeviceGray fill 성분을 소수 둘째 자리를 넘는 소수 정밀도로 씁니다

유한하지 않은 입력은 캐시된 색이나 페이지 콘텐츠를 바꾸기 전에 EConvertError를 일으킵니다

Call SetGrayFillColor to sets fill color value.

 

GrayColor 값의 범위는 0( 검정 )  ~  1( 흰색 )입니다

 

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.

 

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