BASIC

Author Topic: Gradient fill  (Read 2892 times)

MrTAToad

  • Guest
Gradient fill
« on: 2008-Dec-29 »
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 :)

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1750
    • View Profile
    • Homepage
Re: Gradient fill
« Reply #1 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
 

MrTAToad

  • Guest
Re: Gradient fill
« Reply #2 on: 2008-Dec-29 »
Sounds like the job!

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1750
    • View Profile
    • Homepage
Re: Gradient fill
« Reply #3 on: 2008-Dec-29 »
You can even do it to a bitmap, making it different colors where the lighter areas of the bitmap is.

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4966
  • O Rly?
    • View Profile
Re: Gradient fill
« Reply #4 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 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard