Why Delphi drawing functions draw one pixel short?



Why Delphi drawing functions draw one pixel short?..

Answer / Lokesh Kumar

In Delphi, some drawing functions like `Canvas.TextWidth` and `Canvas.TextHeight` return the width and height of a string excluding the last pixel due to rounding issues when calculating the text size. To account for this, you can add one pixel to the calculated width or height as needed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Delphi Interview Questions

What are IDAPI and SQL links ?

1 Answers  


Where is "View | Project Source" ?

1 Answers  


Does Delphi 5 include Resource Workshop and InstallShield Express?

1 Answers  


How to Change delphi default directory?

1 Answers  


How to Convert 16bit resource to 32bit?

1 Answers   Wipro,


How to change a specific IDAPI configuration setting?

1 Answers  


How to draw directly on the Windows Desktop?

1 Answers   Infosys,


How to Migrate a project from Delphi 1 or 2 to Delphi 3 ?

1 Answers  


Write a program to show the memory leak?

1 Answers  


How to Trapp non client areas ?

1 Answers  


How to Get the filename and path of a local table?

1 Answers  


Explain Drag and Drop with Files?

1 Answers  


Categories