View previous topic - View next topic |
Author |
Message |
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Mon Aug 24, 2009 3:34 pm Post subject: Drawing unbroken freehand lines with the mouse |
[quote] |
|
How is it done?
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
|
Back to top |
|
|
Ninkazu Demon Hunter
Joined: 08 Aug 2002 Posts: 945 Location: Location:
|
Posted: Mon Aug 24, 2009 5:43 pm Post subject: |
[quote] |
|
The man speaks truth.
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Mon Aug 24, 2009 5:44 pm Post subject: |
[quote] |
|
How does Windows do it? I swear the Z-Soft algorithm is superior. MS Paint doesn't use lines, I don't think.
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Mon Aug 24, 2009 11:03 pm Post subject: |
[quote] |
|
LordGalbalan wrote: | How does Windows do it? I swear the Z-Soft algorithm is superior. MS Paint doesn't use lines, I don't think. |
#1 As I said above.
#2 what are you talking about Z-Soft algorithm?
#3 Yes it does. Run mspaint.exe through Boomerang and spend about a week reading the code. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Wed Aug 26, 2009 6:28 pm Post subject: |
[quote] |
|
Well then, I would have thought it'd use a curve algorithm, but I guess not. Thanks for looking that up, though.
|
|
Back to top |
|
|
Malignus Scholar
Joined: 12 May 2009 Posts: 198
|
Posted: Wed Aug 26, 2009 9:29 pm Post subject: |
[quote] |
|
Most modern graphics programs let you draw in a straight line by simply holding down Shift while you draw.
In Paint Shop Pro (which I use), you click once, hold down Shift, then click a second time, and a line will be generated with those clicks as its endpoints using your current brush settings as if you had drawn it by hand.
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Thu Aug 27, 2009 2:45 am Post subject: |
[quote] |
|
he was asking as a programmer..not as a user.
He wanted to know how it was implemented, and also, he wanted freehand lines, not straight lines.
I'm guessing he wanted to know how to avoid the "spattering" of pixels that you get when you write your first drawing program that draws a pixel at the mouse's position on the drawing surface bitmap. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Fri Aug 28, 2009 1:26 am Post subject: |
[quote] |
|
Exactly.
|
|
Back to top |
|
|
Malignus Scholar
Joined: 12 May 2009 Posts: 198
|
Posted: Fri Aug 28, 2009 5:35 pm Post subject: |
[quote] |
|
Ah, okay. N/m.
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Sun Aug 30, 2009 6:04 pm Post subject: |
[quote] |
|
How fast is the timer kernel Windows uses for that stuff? I know the normal mouse rate is 18 discrete positions per sec. Does Windows use a better rate?
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
|
Back to top |
|
|