[3/3] gdiplus: get_log_fontW helper requires a valid graphics object.

Vincent Povirk madewokherd at gmail.com
Sun Aug 26 23:40:58 CDT 2012


>> > +        GdipFree(backup);
>>
>> I think you want GdipDeletePath.
>
> Other places of GdipAddPathString implementation need this fixed as well then.

Nope, the existing use of GdipFree on backup is correct because the
extra data associated with it has been copied to the original path
(which had its data freed). Not the clearest way of doing things but
it works.

>> This seems very convoluted. Couldn't we just skip the size conversion
>> in get_log_fontW when graphics is NULL? Any cases where the scaling
>> would produce a size other than the em size need to be fixed in
>> GdipAddPathString anyway.
>
> GdipAddPathString already creates an HDC to select hfont into it, so using
> graphics object created from it seems pretty straightforward.

Fair enough. On closer inspection, it looks like the behavior should
be the same as before, so it doesn't really matter. I just prefer less
memory management, all other things being equal.



More information about the wine-devel mailing list