THPDFPage.SetRGBColor

THPDFPage

Ylös Edellinen Seuraava

Asettaa täyttö- ja viivavärit

Delphi syntax:

procedure SetRGBColor ( Value: TColor );

C++ syntax:

void __fastcall SetRGBColor ( Graphics::TColor Value );

Description:

Kutsu SetRGBColor asettaa täyttö- ja viivavärien arvon. Tämä funktio vastaa kahden funktion SetRGBFillColor ja SetRGBStrokeColor kutsumista samalla arvolla

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.SetRGBColor ( clGreen );       // Set fill and stroke 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.

 

Katso myös: SetGrayColor, SetGrayFillColor, SetGrayStrokeColor, SetRGBFillColor, SetRGBStrokeColor