I have a mesh of cells in memory. I know the width and height of the cells, X0,Y0, X1,Y1, X2,Y2. Given a line connecting (X1,Y1) to (X2,Y2) I would like a way to determine the cells crossed by this line. I have hashed the cells that should get sellected in my drawing. I would like an idea on how to solve this and i will build the implementation in PHP.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):