Create a gradient picture for backgrounds and fills

Dim pWidth,pHeight as integer pWidth = w pHeight = h Dim p as New Picture(pWidth,pHeight) Dim i As Integer Dim samt,eamt As Double For i = 0 To h samt = 1 - (i / h) eamt = i / h p.graphics.forecolor = rgb((s.red * samt) + (e.red * eamt),(s.green *samt) + (e.green * eamt),(s.blue * samt) + (e.blue * eamt)) p.graphics.drawline -1,i,w+1,i Next Return p

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.