Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Point doesnt work right

Author
Message
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 14th Dec 2003 18:12
How does point() work?

Ive got a white square on the screen (50,50,720,720)
and when I draw a black line on it (50,50,720,720)
I use point to get the color of all pixels near the line
to blur it, by using point() 8 times and dividing the number
by 8 and then using RGB blurcolor, 0 to draw the blurred line
but I get strange colors (red, green, purple) etc

How should I use point() with RGB?
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 15th Dec 2003 00:40
You need to extract the separate red, green and blue colour values from that colour values, then divide them.

col = point(x,y)
red = rgbr(col)
grn = rgbg(col)
blu = rgbb(col)

redBlur=red/2
etc...

Anyway, those functions extract the colours from the over all colour value. Hope I helped.

Do you bite your thumb at me sir?

Athelon XP 1600 Plus - Nvidia Geforce MX400 - 256mb RAM
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 15th Dec 2003 00:49
Thanks, im making a texture maker/generator for my RTS game "DarkTimes"

Everything I made to make DarkTimes with will be included with my game,
Q&QTGM (Quality&Quick Texture Generator/Maker)
MS&ME (Mission Script & Map Editor)

Login to post a reply

Server time is: 2025-05-22 03:32:38
Your offset time is: 2025-05-22 03:32:38