Drawing a Shaded Rectangle by using GradientFill

Tutorials Shared by the Internet Community

Advertisements


Drawing a Shaded Rectangle by using GradientFill

This Delphi source code shows how the GradientFill function can be used to add smooth shading to a triangle or rectangle.

Statistics

  • Total Hits - 37010

  • Total Votes - 112 votes

  • Vote Up - 48 votes

  • Vote Down - 64 votes

  • Domain - www.delphi-central.com

  • Category - Delphi/Image Processing

  • Submitted By - Shekhar

  • Submitted on - 2008-04-16 06:37:02

Description

This Delphi source code shows how the GradientFill function can be used to add smooth shading to a triangle or rectangle. For a triangle call the GradientFill function with the three triangle endpoints. GDI will linearly interpolate and fill the triangle.

To add smooth shading to a rectangle, call GradientFill with the upper-left and lower-right coordinates of the rectangle.

Source Website

Please use the following link to visit the site. There is a possibility that this content has been removed from the given URL or may be this site has been shut down completely.

http://www.delphi-central.com/tutorials/DelphiGradientFill.aspx

Broken  |   Save  |   Liked  |   Down

Advertisements