mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:35:41 +00:00
[NTGDI:FREETYPE] IntExtTextOutW: Renaming variables (#7851)
JIRA issue: CORE-19898 This PR is simply trivial renaming. In IntExtTextOutW function: s/SurfObj/psoDest/ s/SourceGlyphSurf/psoGlyph/ s/HSourceGlyph/hbmGlyph/ s/bitSize/glyphSize/
This commit is contained in:
parent
769462faaa
commit
87cd66a577
1 changed files with 25 additions and 25 deletions
|
@ -6785,7 +6785,7 @@ IntExtTextOutW(
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PDC_ATTR pdcattr;
|
PDC_ATTR pdcattr;
|
||||||
SURFOBJ *SurfObj, *SourceGlyphSurf;
|
SURFOBJ *psoDest, *psoGlyph;
|
||||||
SURFACE *psurf;
|
SURFACE *psurf;
|
||||||
INT glyph_index, i;
|
INT glyph_index, i;
|
||||||
FT_Face face;
|
FT_Face face;
|
||||||
|
@ -6793,8 +6793,8 @@ IntExtTextOutW(
|
||||||
LONGLONG X64, Y64, RealXStart64, RealYStart64, DeltaX64, DeltaY64;
|
LONGLONG X64, Y64, RealXStart64, RealYStart64, DeltaX64, DeltaY64;
|
||||||
ULONG previous;
|
ULONG previous;
|
||||||
RECTL DestRect, MaskRect;
|
RECTL DestRect, MaskRect;
|
||||||
HBITMAP HSourceGlyph;
|
HBITMAP hbmGlyph;
|
||||||
SIZEL bitSize;
|
SIZEL glyphSize;
|
||||||
FONTOBJ *FontObj;
|
FONTOBJ *FontObj;
|
||||||
PFONTGDI FontGDI;
|
PFONTGDI FontGDI;
|
||||||
PTEXTOBJ TextObj = NULL;
|
PTEXTOBJ TextObj = NULL;
|
||||||
|
@ -6858,7 +6858,7 @@ IntExtTextOutW(
|
||||||
MaskRect.top = 0;
|
MaskRect.top = 0;
|
||||||
|
|
||||||
psurf = dc->dclevel.pSurface;
|
psurf = dc->dclevel.pSurface;
|
||||||
SurfObj = &psurf->SurfObj;
|
psoDest = &psurf->SurfObj;
|
||||||
|
|
||||||
if (pdcattr->iGraphicsMode == GM_ADVANCED)
|
if (pdcattr->iGraphicsMode == GM_ADVANCED)
|
||||||
pmxWorldToDevice = DC_pmxWorldToDevice(dc);
|
pmxWorldToDevice = DC_pmxWorldToDevice(dc);
|
||||||
|
@ -7073,23 +7073,23 @@ IntExtTextOutW(
|
||||||
DPRINT("X64, Y64: %I64d, %I64d\n", X64, Y64);
|
DPRINT("X64, Y64: %I64d, %I64d\n", X64, Y64);
|
||||||
DPRINT("Advance: %d, %d\n", realglyph->root.advance.x, realglyph->root.advance.y);
|
DPRINT("Advance: %d, %d\n", realglyph->root.advance.x, realglyph->root.advance.y);
|
||||||
|
|
||||||
bitSize.cx = realglyph->bitmap.width;
|
glyphSize.cx = realglyph->bitmap.width;
|
||||||
bitSize.cy = realglyph->bitmap.rows;
|
glyphSize.cy = realglyph->bitmap.rows;
|
||||||
|
|
||||||
/* Do chars > space & not DEL & not nbsp have a bitSize.cx of zero? */
|
/* Do chars > space & not DEL & not nbsp have a glyphSize.cx of zero? */
|
||||||
if (ch0 > L' ' && ch0 != del && ch0 != nbsp && bitSize.cx == 0)
|
if (ch0 > L' ' && ch0 != del && ch0 != nbsp && glyphSize.cx == 0)
|
||||||
DPRINT1("WARNING: WChar 0x%04x has a bitSize.cx of zero\n", ch0);
|
DPRINT1("WARNING: WChar 0x%04x has a glyphSize.cx of zero\n", ch0);
|
||||||
|
|
||||||
/* Don't ignore spaces or non-breaking spaces when computing offset.
|
/* Don't ignore spaces or non-breaking spaces when computing offset.
|
||||||
* This completes the fix of CORE-11787. */
|
* This completes the fix of CORE-11787. */
|
||||||
if ((pdcattr->flTextAlign & TA_UPDATECP) && bitSize.cx == 0 &&
|
if ((pdcattr->flTextAlign & TA_UPDATECP) && glyphSize.cx == 0 &&
|
||||||
(ch0 == L' ' || ch0 == nbsp)) // Space chars needing x-dim widths
|
(ch0 == L' ' || ch0 == nbsp)) // Space chars needing x-dim widths
|
||||||
{
|
{
|
||||||
IntUnLockFreeType();
|
IntUnLockFreeType();
|
||||||
/* Get the width of the space character */
|
/* Get the width of the space character */
|
||||||
TextIntGetTextExtentPoint(dc, TextObj, L" ", 1, 0, NULL, 0, &spaceWidth, 0);
|
TextIntGetTextExtentPoint(dc, TextObj, L" ", 1, 0, NULL, 0, &spaceWidth, 0);
|
||||||
IntLockFreeType();
|
IntLockFreeType();
|
||||||
bitSize.cx = spaceWidth.cx;
|
glyphSize.cx = spaceWidth.cx;
|
||||||
realglyph->left = 0;
|
realglyph->left = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7097,32 +7097,32 @@ IntExtTextOutW(
|
||||||
MaskRect.bottom = realglyph->bitmap.rows;
|
MaskRect.bottom = realglyph->bitmap.rows;
|
||||||
|
|
||||||
DestRect.left = ((X64 + 32) >> 6) + realglyph->left;
|
DestRect.left = ((X64 + 32) >> 6) + realglyph->left;
|
||||||
DestRect.right = DestRect.left + bitSize.cx;
|
DestRect.right = DestRect.left + glyphSize.cx;
|
||||||
DestRect.top = ((Y64 + 32) >> 6) - realglyph->top;
|
DestRect.top = ((Y64 + 32) >> 6) - realglyph->top;
|
||||||
DestRect.bottom = DestRect.top + bitSize.cy;
|
DestRect.bottom = DestRect.top + glyphSize.cy;
|
||||||
|
|
||||||
/* Check if the bitmap has any pixels */
|
/* Check if the bitmap has any pixels */
|
||||||
if ((bitSize.cx != 0) && (bitSize.cy != 0))
|
if ((glyphSize.cx != 0) && (glyphSize.cy != 0))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* We should create the bitmap out of the loop at the biggest possible
|
* We should create the bitmap out of the loop at the biggest possible
|
||||||
* glyph size. Then use memset with 0 to clear it and sourcerect to
|
* glyph size. Then use memset with 0 to clear it and sourcerect to
|
||||||
* limit the work of the transbitblt.
|
* limit the work of the transbitblt.
|
||||||
*/
|
*/
|
||||||
HSourceGlyph = EngCreateBitmap(bitSize, realglyph->bitmap.pitch,
|
hbmGlyph = EngCreateBitmap(glyphSize, realglyph->bitmap.pitch,
|
||||||
BMF_8BPP, BMF_TOPDOWN,
|
BMF_8BPP, BMF_TOPDOWN,
|
||||||
realglyph->bitmap.buffer);
|
realglyph->bitmap.buffer);
|
||||||
if (!HSourceGlyph)
|
if (!hbmGlyph)
|
||||||
{
|
{
|
||||||
DPRINT1("WARNING: EngCreateBitmap() failed!\n");
|
DPRINT1("WARNING: EngCreateBitmap() failed!\n");
|
||||||
bResult = FALSE;
|
bResult = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SourceGlyphSurf = EngLockSurface((HSURF)HSourceGlyph);
|
psoGlyph = EngLockSurface((HSURF)hbmGlyph);
|
||||||
if (!SourceGlyphSurf)
|
if (!psoGlyph)
|
||||||
{
|
{
|
||||||
EngDeleteSurface((HSURF)HSourceGlyph);
|
EngDeleteSurface((HSURF)hbmGlyph);
|
||||||
DPRINT1("WARNING: EngLockSurface() failed!\n");
|
DPRINT1("WARNING: EngLockSurface() failed!\n");
|
||||||
bResult = FALSE;
|
bResult = FALSE;
|
||||||
break;
|
break;
|
||||||
|
@ -7149,8 +7149,8 @@ IntExtTextOutW(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IntEngMaskBlt(SurfObj,
|
if (!IntEngMaskBlt(psoDest,
|
||||||
SourceGlyphSurf,
|
psoGlyph,
|
||||||
(CLIPOBJ *)&dc->co,
|
(CLIPOBJ *)&dc->co,
|
||||||
&exloRGB2Dst.xlo,
|
&exloRGB2Dst.xlo,
|
||||||
&exloDst2RGB.xlo,
|
&exloDst2RGB.xlo,
|
||||||
|
@ -7162,8 +7162,8 @@ IntExtTextOutW(
|
||||||
DPRINT1("Failed to MaskBlt a glyph!\n");
|
DPRINT1("Failed to MaskBlt a glyph!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
EngUnlockSurface(SourceGlyphSurf);
|
EngUnlockSurface(psoGlyph);
|
||||||
EngDeleteSurface((HSURF)HSourceGlyph);
|
EngDeleteSurface((HSURF)hbmGlyph);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DoBreak)
|
if (DoBreak)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue