Gradient fill

Previous topic - Next topic

MrTAToad

DBPro has, with its BOX command, the ability to do a gradient fill of colour based on the colour for each corner.   It looks nice and would be worth putting into GLBasic :)

Moru

You mean like this:

Code (glbasic) Select
STARTPOLY 0 // Bitmap = No.0
  POLYVECTOR  0,   0,  0,  0, RGB(255, 255, 255)
  POLYVECTOR   0, 300,  0, 64, RGB (255, 255, 255)
  POLYVECTOR 300, 300, 64, 64, RGB(255, 255, 255)
  POLYVECTOR 250,  50, 64,  0, RGB(  0, 255,   0)
ENDPOLY

MrTAToad

Sounds like the job!

Moru

You can even do it to a bitmap, making it different colors where the lighter areas of the bitmap is.

Schranz0r

Quote from: Moru on 2008-Dec-29
You mean like this:

Code (glbasic) Select
STARTPOLY 0 // Bitmap = No.0
  POLYVECTOR  0,   0,  0,  0, RGB(255, 255, 255)
  POLYVECTOR   0, 300,  0, 64, RGB (255, 255, 255)
  POLYVECTOR 300, 300, 64, 64, RGB(255, 255, 255)
  POLYVECTOR 250,  50, 64,  0, RGB(  0, 255,   0)
ENDPOLY


Yepp, thats a powerfull command :P
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard