I would like to use gflAddText to automatically place and center text at the bottom of images. In order to do this, I need to be able to calculate the rendered width and height of the text string. Is there a way to determine what the dimensions are of a rendered text string before placing it into the image? I have thought about using the Windows API call DrawText or similar to calculate these dimensions, but wanted to make sure that the returned values would be relevant to the way that the gfl sdk does things.
Thanks
Mark
gflAddText: Width and height of text
Moderators: helmut, XnTriq, xnview
-
- Author of XnView
- Posts: 45870
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: gflAddText: Width and height of text
Yes, currently no way to get these values, you can use DrawText...plamark wrote:I would like to use gflAddText to automatically place and center text at the bottom of images. In order to do this, I need to be able to calculate the rendered width and height of the text string. Is there a way to determine what the dimensions are of a rendered text string before placing it into the image? I have thought about using the Windows API call DrawText or similar to calculate these dimensions, but wanted to make sure that the returned values would be relevant to the way that the gfl sdk does things.
Pierre.