mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[WIN32K]
Only scale characters with the world-to-device transform, when the graphics mode is GM_ADVANCED. Fixes Petzold's WhatSize testapp. CORE-7154 #resolve svn path=/trunk/; revision=69782
This commit is contained in:
parent
ee7e189a4e
commit
9eddb5e906
2 changed files with 25 additions and 8 deletions
|
@ -17,7 +17,7 @@
|
||||||
PSURFACE psurfDefaultBitmap = NULL;
|
PSURFACE psurfDefaultBitmap = NULL;
|
||||||
PBRUSH pbrDefaultBrush = NULL;
|
PBRUSH pbrDefaultBrush = NULL;
|
||||||
|
|
||||||
static const MATRIX gmxWorldToDeviceDefault =
|
const MATRIX gmxWorldToDeviceDefault =
|
||||||
{
|
{
|
||||||
FLOATOBJ_16, FLOATOBJ_0,
|
FLOATOBJ_16, FLOATOBJ_0,
|
||||||
FLOATOBJ_0, FLOATOBJ_16,
|
FLOATOBJ_0, FLOATOBJ_16,
|
||||||
|
@ -25,7 +25,7 @@ static const MATRIX gmxWorldToDeviceDefault =
|
||||||
0, 0, 0x4b
|
0, 0, 0x4b
|
||||||
};
|
};
|
||||||
|
|
||||||
static const MATRIX gmxDeviceToWorldDefault =
|
const MATRIX gmxDeviceToWorldDefault =
|
||||||
{
|
{
|
||||||
FLOATOBJ_1_16, FLOATOBJ_0,
|
FLOATOBJ_1_16, FLOATOBJ_0,
|
||||||
FLOATOBJ_0, FLOATOBJ_1_16,
|
FLOATOBJ_0, FLOATOBJ_1_16,
|
||||||
|
@ -33,7 +33,7 @@ static const MATRIX gmxDeviceToWorldDefault =
|
||||||
0, 0, 0x53
|
0, 0, 0x53
|
||||||
};
|
};
|
||||||
|
|
||||||
static const MATRIX gmxWorldToPageDefault =
|
const MATRIX gmxWorldToPageDefault =
|
||||||
{
|
{
|
||||||
FLOATOBJ_1, FLOATOBJ_0,
|
FLOATOBJ_1, FLOATOBJ_0,
|
||||||
FLOATOBJ_0, FLOATOBJ_1,
|
FLOATOBJ_0, FLOATOBJ_1,
|
||||||
|
|
|
@ -30,6 +30,12 @@
|
||||||
((DWORD)(BYTE)(ch2) << 8) | (DWORD)(BYTE)(ch3) )
|
((DWORD)(BYTE)(ch2) << 8) | (DWORD)(BYTE)(ch3) )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern const MATRIX gmxWorldToDeviceDefault;
|
||||||
|
extern const MATRIX gmxWorldToPageDefault;
|
||||||
|
|
||||||
|
// HACK!! Fix XFORMOBJ then use 1:16 / 16:1
|
||||||
|
#define gmxWorldToDeviceDefault gmxWorldToPageDefault
|
||||||
|
|
||||||
FT_Library library;
|
FT_Library library;
|
||||||
|
|
||||||
typedef struct _FONT_ENTRY
|
typedef struct _FONT_ENTRY
|
||||||
|
@ -3520,16 +3526,27 @@ GreExtTextOutW(
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dc->dcattr.iGraphicsMode == GM_ADVANCED)
|
||||||
|
{
|
||||||
pmxWorldToDevice = DC_pmxWorldToDevice(dc);
|
pmxWorldToDevice = DC_pmxWorldToDevice(dc);
|
||||||
FtSetCoordinateTransform(face, pmxWorldToDevice);
|
FtSetCoordinateTransform(face, pmxWorldToDevice);
|
||||||
|
|
||||||
|
fixAscender = ScaleLong(face->size->metrics.ascender, &pmxWorldToDevice->efM22);
|
||||||
|
fixDescender = ScaleLong(face->size->metrics.descender, &pmxWorldToDevice->efM22);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pmxWorldToDevice = (PMATRIX)&gmxWorldToDeviceDefault;
|
||||||
|
FtSetCoordinateTransform(face, pmxWorldToDevice);
|
||||||
|
|
||||||
|
fixAscender = face->size->metrics.ascender;
|
||||||
|
fixDescender = face->size->metrics.descender;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process the vertical alignment and determine the yoff.
|
* Process the vertical alignment and determine the yoff.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
fixAscender = ScaleLong(face->size->metrics.ascender, &pmxWorldToDevice->efM22);
|
|
||||||
fixDescender = ScaleLong(face->size->metrics.descender, &pmxWorldToDevice->efM22);
|
|
||||||
|
|
||||||
if (pdcattr->lTextAlign & TA_BASELINE)
|
if (pdcattr->lTextAlign & TA_BASELINE)
|
||||||
yoff = 0;
|
yoff = 0;
|
||||||
else if (pdcattr->lTextAlign & TA_BOTTOM)
|
else if (pdcattr->lTextAlign & TA_BOTTOM)
|
||||||
|
|
Loading…
Reference in a new issue