THPDFPage.SetRGBColor

THPDFPage

 

Arriba  Anterior  Siguiente

Sets fill and stroke colors.

 

Sintaxis Delphi:

procedure SetRGBColor ( Value: TColor );

 

Sintaxis C++:

void __fastcall SetRGBColor ( Graphics::TColor Value );

 

Descripción:

Llamar a SetRGBColor establece el valor de los colores de relleno y de trazo. Esta función equivale a llamar a las dos funciones SetRGBFillColor y SetRGBStrokeColor con el mismo valor.

 

Ejemplo de código

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.

 

Véase también: SetGrayColor, SetGrayFillColor, SetGrayStrokeColor, SetRGBFillColor, SetRGBStrokeColor.