by JJJJJJJJ (41 Submissions)
Category: Graphics
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(4 Votes)

I am sure that this is the 'Fastest' routine in VBC to render 'Positioned' - 'Repeated' gradients. The gradients are 'Smoother' than the same implimentation using 'DIB sections', because it uses 'GradientFill' API. The code is so 'Compact' and 'Simple' because it is based on an excellent thought by 'paul_turcksin' to use 'CopyMemory' to bypass color Bytes to TRIVERTEX Structure used in 'GradientFill' API. The code can draw 'Horizontal' and 'Vertical' gradients with any number of 'Repeats'. Hope you enjoy!! and please leave your comments!!!, Jim Jose ;)