Mega Code Archive

 
Categories / Delphi / VCL
 

Why delphi drawing functions draw one pixel short

Question: Why do line drawing methods like MoveTo and LineTo always draw a pixel short? Answer: This is the way most graphics systems work, including Windows. The VCL simply maps calls to the GDI functions. If you need a given line to go all the way to the last coordinate, then simply add one pixel.