[3/3] gdiplus: GdipMeasureCharacterRanges should respect device units and transformations.

Vincent Povirk madewokherd at gmail.com
Wed Aug 22 00:49:24 CDT 2012


>              GetTextExtentExPointW(hdc, string + index, range_start - index,
>                                    INT_MAX, NULL, NULL, &range_size);
> -            range_rect.X = bounds->X + range_size.cx;
> +            range_rect.X = bounds->X / args->rel_width + range_size.cx;
>
>              GetTextExtentExPointW(hdc, string + index, range_end - index,
>                                    INT_MAX, NULL, NULL, &range_size);
> -            range_rect.Width = (bounds->X + range_size.cx) - range_rect.X;
> +            range_rect.Width = (bounds->X / args->rel_width + range_size.cx) - range_rect.X;

Shouldn't you be scaling range_size.cx as well?



More information about the wine-devel mailing list