Let say I have this image,
I need to fill the rectangles of fixed size inside Outer Rectangle. How to make that small Rectangles inside Outer Rectangle is always on a straight line(in red color). I am placing rectangles in a particular order, starting at a particular point. I can start placing rectangle at any point. I know I need some transformation at start point of rectangle place. But fail to find a solution.