While drawing these point you should not sleep or drag the mouse, otherwise it will give you curve.
To draw right angle Select Spline Tool, follow these steps.
Choose Spline tool and Click on top left corner, and then click on left bottom corner and then go towards right bottom corner of canvas and then come towards first node top left corner. mouse right click and then select loop spline.
To get a straight line, just click and move the mouse. Do not hold and drag, it creates a curved