Difference between revisions of "Gradient Filler"

From Lazarus wiki
Jump to navigationJump to search
(New page: == Usage == <delphi>// Gradientfiller for the form background It's a 50/50 scale so both gradients meet in the middle. gfPaint := TGradientFiller.Create(gdHorizontal); gfPaint.AddGr...)
 
Line 2: Line 2:
  
 
<delphi>// Gradientfiller for the form background   
 
<delphi>// Gradientfiller for the form background   
It's a 50/50 scale so both gradients meet in the middle.   
+
//It's a 50/50 scale so both gradients meet in the middle.   
 
gfPaint := TGradientFiller.Create(gdHorizontal);   
 
gfPaint := TGradientFiller.Create(gdHorizontal);   
 
gfPaint.AddGradient(clYellow, clBlue, gdHorizontal, 50);   
 
gfPaint.AddGradient(clYellow, clBlue, gdHorizontal, 50);   
Line 8: Line 8:
 
//...   
 
//...   
 
// Form paint:   
 
// Form paint:   
gfPaint.Draw(self.Canvas, self.ClientRect);</delphi>
+
gfPaint.Draw(self.Canvas, self.ClientRect);</delphi>
  
 
== Screenshots ==
 
== Screenshots ==

Revision as of 17:54, 19 February 2011

Usage

<delphi>// Gradientfiller for the form background //It's a 50/50 scale so both gradients meet in the middle. gfPaint := TGradientFiller.Create(gdHorizontal); gfPaint.AddGradient(clYellow, clBlue, gdHorizontal, 50); gfPaint.AddGradient(clBlue, clGreen, gdHorizontal, 50); //... // Form paint: gfPaint.Draw(self.Canvas, self.ClientRect);</delphi>

Screenshots

oogd.png

Downloads

Gradient Filler 1.0 OOGradient.zip (6.13 KB)