RAD Studio VCL Reference
|
Indicates the color of the brush.
property Color: TColor;
__property TColor Color;
The Color property determines the color of the brush. This is the color that is used to draw the pattern represented by the Style property, not the background color of the brush (unless Style is bsSolid).
C++ Examples:
/* The following example paints a cross-hatched ellipse onto Image1 which is a TImage on the form when the user clicks on Button1. */ void __fastcall TForm1::Button1Click(TObject *Sender) { TCanvas *pCanvas = Image1->Canvas; pCanvas->Brush->Color = clRed; pCanvas->Brush->Style = bsDiagCross; pCanvas->Ellipse(0, 0, Image1->Width, Image1->Height); }
Delphi Examples:
{ The following example paints a cross-hatched ellipse onto Image1 which is a TImage on the form when the user clicks on Button1. } procedure TForm1.Button1Click(Sender: TObject); begin with Image1 do begin Canvas.Brush.Color := clRed; Canvas.Brush.Style := bsDiagCross; Canvas.Ellipse(0, 0, Image1.Width, Image1.Height); end; end;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|