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! / line drawing code

Author
Message
chunks chunks
19
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 3rd Jan 2007 04:58
can someone help plz

trying to draw lines with mouse for paint program im making
but i get trails following the line

here is my code




txs in advance
Zergei
21
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 3rd Jan 2007 11:30 Edited at: 3rd Jan 2007 11:33
This some old code i did...



Further on my stuff at...
chunks chunks
19
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 3rd Jan 2007 17:38
cheers mate that will help no end
just need to make it into a funtion now


thanx again
Zergei
21
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 3rd Jan 2007 21:34
Somewhat like this?...



Further on my stuff at...
chunks chunks
19
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 3rd Jan 2007 22:57
any ideas how to make this one better its for the paintbrush but if you move the mouse too fast it draws intermittently rather than a solid stroke.


Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 4th Jan 2007 11:53 Edited at: 4th Jan 2007 11:59
Create a line function that calculates each point individually...

I believe I have some code left, let's see...


This is code from my map-maker about a year ago or so...


This is code I used in the challenge thread of Ric (DBP). It draws a line on an image memblock.

[edit]
I have also an algorithm for filled circle (I haven't seen any faster ones), filled ellips, blurring images using memblocks, fading images using memblocks, resizing images using memblocks and the thing ImageTrans does (blend 2 images together using a greyscale map).
If you want my code for the paint program challenge, I could post it here...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
chunks chunks
19
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 6th Jan 2007 04:31
thanx guys for help am working as we speak got enough to be goin on with dont want to go inover my head as im still a newbie.


thanx again chunks

Login to post a reply

Server time is: 2026-07-05 05:01:16
Your offset time is: 2026-07-05 05:01:16