Draw Grid

Find quick help here to get you started with Hollywood
Flinx
Posts: 342
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: Draw Grid

Post by Flinx »

jPV wrote: Mon Nov 18, 2024 9:42 am It would be a good practise to do as little calculations as possible inside loops always
+2 :)

Yes, I wanted to do an example like that too, but I didn't have the time.
The last multiplication can be replaced by a Step in the Next loop, and the grid doesn't actually need two function calls.
User avatar
jPV
Posts: 734
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Draw Grid

Post by jPV »

Flinx wrote: Mon Nov 18, 2024 10:08 am The last multiplication can be replaced by a Step in the Next loop, and the grid doesn't actually need two function calls.
Ah right, of course. Something like this:

Code: Select all

	For Local x = 1 To GH Step GS
		Line (0, x, dw, x, GC, {Thickness = LT})
	Next
oceanarts
Posts: 111
Joined: Mon May 27, 2024 10:42 pm

Re: Draw Grid

Post by oceanarts »

Thanks for the pointers, guys. Much appreciated. :)
Development System : Imac G5, MorphOs 3.19
Post Reply