Look at GitHub.This is a variation of an older script. You may use the function to fill a GUI Picture control with a linear gradient bitmap. At the best all you have to do is:
Optional parameters:
- Create a Picture control and get it's HWND (e.g. with the option hwndOutputVarHwnd).
- Create an array of (at least two) integer RGB color values in left/right respectively top/bottom order.
- Call the function passing the control's HWND and the color array.
- Get a horizontal linear gradient as shown in the image.
- oPositions:
By default colors are evenly distributed from left to right / top to bottom. If you want to set the positions manually, pass an array containing the position of each color as a floating-point value starting with 0.0 (left/top) for the first color and ending with 1.0 (right/bottom) for the last color.- D (Direction):
By default (0) the function creates a horizontal gradient. For other options look at the inline documentation, please.- GC (Gamma Correction):
By default (0) gamma correction is turned off. You can pass 1 to turn it on.- BW / BH:
By default the line gradient brush has the same size as the control's client area. You may play around with smaller values for the width (BW) and/or the height (BH) to get some "special effects".
Download from GitHub.