2.9.1 Function Coordinates

Line-output functions require coordinates in logical units, which GDI uses to draw a line in logical space. The use of logical units ensures device independence in Windows. GDI maps this line from the logical space to the physical space on the device. The number of logical units that GDI maps to a pixel depends on the current mapping mode. When GDI draws a line, it excludes the last specified point. For example, if the LineTo function is given the arguments (X1, Y1) and (X2, Y2), the line will be drawn from (X1, Y1) to (X2 – 1, Y2 – 1).