Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators
I have attached my test Visual C++ 6 project again. This time PXC_DrawTextExW outputs a string differently if there is a space at the end of the string or not.
You will notice first write is using a string "Cable ID:" with no space after the colon (':'). Only the "Cable" portion of the string appears in the PDF file. The second write is using a string "Cable ID: " with a space after the colon (':'). The whole string appears in the PDF.
Is this a bug?
- (876.57 KiB) Downloaded 97 times
- Site Admin
- Posts: 8204
- Joined: Tue Jun 29, 2004 10:34 am
- Location: Vancouver Island - Canada
This issue arises because you are using integer based arithmetic and our libraries - use floating point Arithmetic.
For example, our library returns a string width of 30.1 points, then you convert this to an integer value - the result - 30.0.
You then pass this length back to the library and there is not enough space to show the entire string (because the string width is 30.1 and not 30).
Hope that makes things a little clearer