Drawing a Shaded Rectangle by using GradientFill

Tutorials Shared by the Internet Community

Advertisements


Synopsis

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

Statistics

  • Total Hits - 27500

  • Total Votes - 110 votes

  • Vote Up - 48 votes

  • Vote Down - 62 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. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements