austinenglish at gmail.com
Mon Jun 1 23:25:08 CDT 2009
On Mon, Jun 1, 2009 at 11:23 PM, Stephan Rose <kermos at somrek.net> wrote:
> On Mon, 2009-06-01 at 13:03 -0400, Stephan Rose wrote:
>> >I don't know why gdiplus does its own linebreaks. I haven't really
>> >done any work in that area.
>> >If I had to guess, I'd say it's because StringFormatFlagsNoWrap has no
>> >equivalent flag for DrawText. That probably means you can't pass it
>> >off to DrawText.
>> >Since they'll probably have to be done differently, it's best to
>> >implement one direction at a time. When you're happy with horizontal
>> >alignment, you can send a patch for that regardless of the status of
>> >vertical alignment.
>> >You should be able to use GdipMeasureString to get the size of the
>> >text. In fact, the alignments will need to be implemented there too,
>> >and it may be better to start there.
>> Hmm the only way I can see alignments having any influence on MeasureString would be if the boundingBox of the text is to be aligned to the layoutRect based on the alignment flags. Should just be able to then take the calculated bounding rect and align that to the layout based on the flags.
>> And you're right, if I use MeasureString I solve my issue where I don't know the height of the text ahead of time. Perfect.]
> My initial implementation for the string alignment stuff seems to be
> working. Haven't done anything inside MeasureString yet (that'll be next
> Here's a screenshot comparing the windows version from the bug report
> against my implementation.
> Now how do I go about creating the patch and trying to get this
> committed? =)
More information about the wine-devel