|
Sets fill and stroke colors.
Delphi 語法:
procedure SetRGBColor ( Value: TColor );
C++ 語法:
void __fastcall SetRGBColor ( Graphics::TColor Value );
描述:
呼叫 SetRGBColor 會同時設定填色與描邊色,等同以相同的值呼叫兩個函式:SetRGBFillColor 與 SetRGBStrokeColor
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.
請參閱: SetGrayColor, SetGrayFillColor, SetGrayStrokeColor, SetRGBFillColor, SetRGBStrokeColor.
|