# Finding the pixel positions for the straight line joining two points [duplicate]

a P1 + (1-a) P2 for 0 < a < 1.