gdiplus: add support for string alignment to GdipDrawString (try 2)

Stephan Rose kermos at
Tue Jun 2 11:06:14 CDT 2009

>(reply didn't go to list as I expected, grr..)
>> Naw, it should still work normally. I've done aligned & rotated text under 
>windows before with DrawTextW, you still pass the rect like you would if it 
>wasn't rotated and set the alignment flags. The world transform should take 
>care of getting it all rotated to where it is supposed to be with the 
>alignments in the right place.
>Maybe, but builtin gdiplus has its own world transform and doesn't use
>the gdi32 one. That's what transform_and_round_points is for.

True but you're still using the GDI32 DrawText to actually render the text. transform_and_round_points is only doing what it says, transforming the coordinates. If you rotate the text by 90 degrees, DrawText is still going to have to be aware that the text is to be rotated 90 degrees to draw it correctly or else you'll get your text at the right position, but the text direction will be wrong. Unless I'm overlooking something?

>> Ok question then, how do I separate this into two patches? Never done 
>anything with patches like this before so this is a first for me.
>Just make two commits in Git, and format-patch will create two patch files.

That makes sense but, one question there. Does this mean I'm going to have to restore the file to it's original state, then add the one change, commit, add the other change, then commit again? With a change of this size, that isn't that big a deal. But on larger changes I could see that being a bit problematic. But maybe I'm just not used to it. =)



More information about the wine-devel mailing list