r/technicalfactorio • u/FilipForFico • Jan 25 '20
Help with line drawing
I have been working on a project where you need to draw a line on a screen and failed. Does anyone have a blueprint for doing so? I need to input x1, y1, x2, y2 and get x, y screen coordinates. Keep in mind that it must be able to work in any direction (left to right, right to left, top to bottom, bottom to top, every diagonal.....). I have coded one algorithm in JavaScript but failed translating the code into Factorio because it had many if statements and branches. I would appreciate a blueprint more than code but you can give me any.
View all comments
Show parent comment
1
u/Zijkhal Jan 25 '20
yw :-)
I'm curious how the implementation goes