Fixed image matching.
This commit is contained in:
parent
f1341a0485
commit
f92c83992e
|
@ -112,8 +112,9 @@ IWICBitmap *uiprivImageAppropriateForDC(uiImage *i, HDC dc)
|
||||||
m.best = NULL;
|
m.best = NULL;
|
||||||
m.distX = INT_MAX;
|
m.distX = INT_MAX;
|
||||||
m.distY = INT_MAX;
|
m.distY = INT_MAX;
|
||||||
m.targetX = i->width * GetDeviceCaps(dc, LOGPIXELSX);
|
// TODO explain this
|
||||||
m.targetY = i->height * GetDeviceCaps(dc, LOGPIXELSY);
|
m.targetX = MulDiv(i->width, GetDeviceCaps(dc, LOGPIXELSX), 96);
|
||||||
|
m.targetY = MulDiv(i->height, GetDeviceCaps(dc, LOGPIXELSY), 96);
|
||||||
m.foundLarger = false;
|
m.foundLarger = false;
|
||||||
for (IWICBitmap *b : *(i->bitmaps))
|
for (IWICBitmap *b : *(i->bitmaps))
|
||||||
match(b, &m);
|
match(b, &m);
|
||||||
|
|
Loading…
Reference in New Issue