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

Dmitry Timoshkov dmitry at baikal.ru
Wed Aug 22 01:01:02 CDT 2012


Vincent Povirk <madewokherd at gmail.com> wrote:

> >              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?

No, range_size is already in pixels.

-- 
Dmitry.



More information about the wine-devel mailing list