Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DRAW sequence m option
#13
(11-14-2022, 06:49 PM)CharlieJV Wrote:
(11-14-2022, 08:47 AM)PhilOfPerth Wrote: Can someone please elaborate a bit on the m x,y (and its related +/- options)  in the draw command? It doesn't get a mention (that I can find) in the Help file, and the Wiki one is pretty unclear. How is it fitted into a draw string, and does it need parentheses, or commas etc?  Confused

Sample code if you want to play around:

Code: (Select All)
screen _newimage(200, 200, 12)

xf = 150
yf = 150

do
x = int(rnd*200)
y = int(rnd*200)
draw "B M" + str$(x) + "," + str$(y)
draw "d15 r15 u15 l15 m " + str$(xf) + "," + str$(yf)
_display
_delay 1.25
loop

And now, for the giggles, try the same program with a little tweak so that the second M command is a relative coordinate instead of a fixed coordinate:

Code: (Select All)
screen _newimage(200, 200, 12)

xf = 150
yf = 150

do
x = int(rnd*200)
y = int(rnd*200)
draw "B M" + str$(x) + "," + str$(y)
draw "d15 r15 u15 l15 m -" + str$(xf) + ",-" + str$(yf)
_display
_delay 1.25
loop
Reply


Messages In This Thread
DRAW sequence m option - by PhilOfPerth - 11-14-2022, 08:47 AM
RE: DRAW sequence m option - by PhilOfPerth - 11-14-2022, 12:25 PM
RE: DRAW sequence m option - by Pete - 11-14-2022, 04:46 PM
RE: DRAW sequence m option - by mnrvovrfc - 11-14-2022, 05:08 PM
RE: DRAW sequence m option - by Dimster - 11-14-2022, 05:34 PM
RE: DRAW sequence m option - by Pete - 11-14-2022, 05:45 PM
RE: DRAW sequence m option - by Dimster - 11-14-2022, 05:47 PM
RE: DRAW sequence m option - by mnrvovrfc - 11-14-2022, 05:59 PM
RE: DRAW sequence m option - by Pete - 11-14-2022, 05:56 PM
RE: DRAW sequence m option - by Pete - 11-14-2022, 06:24 PM
RE: DRAW sequence m option - by CharlieJV - 11-14-2022, 06:49 PM
RE: DRAW sequence m option - by CharlieJV - 11-14-2022, 08:41 PM
RE: DRAW sequence m option - by Dimster - 11-14-2022, 08:16 PM
RE: DRAW sequence m option - by mnrvovrfc - 11-14-2022, 11:00 PM
RE: DRAW sequence m option - by PhilOfPerth - 11-14-2022, 10:45 PM
RE: DRAW sequence m option - by bplus - 11-14-2022, 10:49 PM
RE: DRAW sequence m option - by Pete - 11-14-2022, 10:54 PM
RE: DRAW sequence m option - by PhilOfPerth - 11-14-2022, 10:59 PM
RE: DRAW sequence m option - by Pete - 11-14-2022, 11:08 PM
RE: DRAW sequence m option - by PhilOfPerth - 11-15-2022, 01:27 AM
RE: DRAW sequence m option - by Pete - 11-15-2022, 03:25 AM
RE: DRAW sequence m option - by PhilOfPerth - 11-15-2022, 04:47 AM
RE: DRAW sequence m option - by Pete - 11-15-2022, 05:22 AM



Users browsing this thread: 3 Guest(s)