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.

2D All the way! / Anti-Aliasing in 2D

Author
Message
Coder
20
Years of Service
User Offline
Joined: 26th Sep 2003
Location:
Posted: 5th Oct 2003 23:13 Edited at: 5th Oct 2003 23:14
Hello all. I'm new to the Dark Basic programming language, but not new to programming. Anyhow, I am working on a 2D graphing program, and would like to add the ability to anti-alias the graph. I am using the LINE command to draw the graph. I was considering drawing the graph using the DOT command and evaluating the point to decide if it should be the true color, or a blend with the backgound. I am afraid however that the current routine I am using is WAY too slow. If anyone has a suggestion to either accelerate the routine or to use a different method altogether, I'd be glad to try it. Also credits to whomever helps.

Thanks.

Loopendless:
Goto Loopendless
Reaperman
20
Years of Service
User Offline
Joined: 9th Sep 2003
Location: Kent, England
Posted: 6th Oct 2003 05:28
the current routine I am using is WAY too slow

Well, I am sure we can help you, but how about posting the routine for us.
las6
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 6th Oct 2003 11:25
If you would have the darkmatter addon for dbc or you would be using DBpro, I'd recommend using memblocks to draw the screen or parts of it. Or better yet, in dbpro you can edit the screen buffers directly.

dot command is very slow, and that's something we'll have to live with. :\

heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 6th Oct 2003 22:47
I'm assuming pie charts and not bar charts since it makes no sense to anti-alias bar charts.

Take your pie image and copy it to a bitmap. Then copy that bitmap to a slightly larger bitmap using the Copy Bitmap command. For example, take a 100 square bitmap and copy it to a 105 square bitmap, then cut your anti-aliased image from the scaled bitmap.

The more you see, the more you know.
The more you know, the more you see.
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 7th Oct 2003 01:26
Theres also BLUR BITMAP.

Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
DrakeX
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 10th Oct 2003 09:11
this works pretty well.



stop looking at me!
Coder
20
Years of Service
User Offline
Joined: 26th Sep 2003
Location:
Posted: 11th Oct 2003 20:38
Is this a DBP code or DBC?
I use DBC.

Loopendless:
Goto Loopendless

Login to post a reply

Server time is: 2024-05-05 10:51:18
Your offset time is: 2024-05-05 10:51:18