On Sun, 2009-06-07 at 19:53 -0500, Vincent Povirk wrote:
This looks wrong to me. You're only adjusting the left coordinate, but in case of a rotation in the world transform, you'll need to adjust the top as well.
Also, I think you may still be able to use DT_CENTER and DT_RIGHT rather than measuring the string beforehand. Creating a rectangle something like the original is difficult, but DrawText probably only needs to know the top-center or top-right point to do these other alignments. So it should be able to align things properly if you give it a rectangle where all corners are the point where it anchors the text.
Well it'd have to be top left and top right. Given those two, top center will be determined by DrawText on it's own when given DT_CENTER alignment.
Ok I think that I'm really going to have to do is make a rotated test app to see what happens. Only 'issue' here is that I am not even remotely setup here at home for writing / compiling any kind of native windows software. While I have a windows installation, use it like maybe once every couple weeks for some occasional gaming.
Is there any easy way for me to do this under linux? MingW I suppose?
Thanks,
Stephan