THPDFPage.SetGrayStrokeColor

THPDFPage

 

Вверх  Назад  Далее

Sets stroke color

 

Синтаксис Delphi:

procedure SetGrayStrokeColor ( GrayColor: Extended );

 

C++ syntax:

void __fastcall SetGrayStrokeColor ( Extended GrayColor);

 

Description:

Записывает компоненты обводки DeviceGray с дробной точностью за пределами двух знаков после запятой

Нечисловой вход выбрасывает EConvertError до изменения кэшированного цвета или содержимого страницы

Вызовите SetGrayStrokeColor, чтобы задать значение цвета обводки

 

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

 

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.

 

См. также: SetGrayColor, SetGrayFillColor, SetRGBColor, SetRGBFillColor, SetRGBStrokeColor