Dmitry Timoshkov : gdiplus: GdipMeasureString operates internally in pixels but in/ out rectangles are in device units.

Vincent Povirk madewokherd at gmail.com
Wed Jul 18 13:39:36 CDT 2012


> gdiplus: GdipMeasureString operates internally in pixels but in/out rectangles are in device units.

I still don't understand this patch.

Your subject implies that device units and pixels are not the same
thing, but my understanding is that except for metafile HDCs (which we
don't handle correctly anyway, and I suspect native doesn't either),
they are.

You're scaling sizes based on graphics->unit. Yet the conversion in
get_graphics_transform (which we were already using in
GdipMeasureString to convert between world and device units,
indirectly through GdipTransformPoints) already takes graphics->unit
into account.

So I'm concerned that the original conversion apparently wasn't
sufficient, and that you've added more code instead of fixing it.

And I'm still concerned about whether the sizes returned by
GdipMeasureString will match the size of the strings rendered by
GdipDrawString with this patch applied.



More information about the wine-devel mailing list