Advertisement
4_2005-2006 Graphics #168430

OmniGradient v1.00 - Gradient generation and display module

Almost all the code in this module was written by one of the VB gurus on PSC, Carles P.V. His original submission can be found on PSC at txtCodeId=60580. In that submission he has two modules. One is for linear gradients that can be displayed at any angle, and the other is for circular gradients. My meager contributions to his excellence: - The linear and circular gradient generating routines have been merged into one routine that handles both gradient styles. - Linear gradients can be generated in a "middle-out" fashion - that is, from Color1 to Color2 back to Color1. Makes a nice 3D effect. - The code that actually displays the gradient has been removed from Carles' gradient generating routines and placed in a separate procedure. The reason for that is simple - speed. If you need to refresh the gradient background of a usercontrol often, why recalculate the background gradient information every time? Calculate it ONCE, cache it, and redraw it as needed with a simple PaintGradient call. A demo showing the module's capabilities is included. Feedback is welcome but if you wish to vote, please vote not for this but for Carles' submission at txtCodeId=60580. Thanks.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Upload
Original Comments (3)
Recovered from Wayback Machine