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.

Author
Message
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 9th Jun 2013 08:42
I found quite an elegant method for drawing lines.



Here's the function again, a bit more compact and with internal rounding:


The difficulty in learning is not acquiring new knowledge but relinquishing the old.
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 9th Jun 2013 12:42 Edited at: 9th Jun 2013 12:46
I see your line function, and I raise you my line function

Note that you'll need Advanced 2D DLL to run my function.

Pos_X & Pos_Y are the starting point, then simply state your length and in what angle you'd like to draw. Centre is a toggle, that when active, Pos_X & Pos_Y will be the centre of the line. Pretty cool eh?



Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia

Login to post a reply

Server time is: 2026-07-07 15:10:21
Your offset time is: 2026-07-07 15:10:21