⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cfbteblt8.c

📁 远程桌面连接工具
💻 C
📖 第 1 页 / 共 2 页
字号:
			    Loop \		    	} \		    	break; \		    }#ifdef FAST_CONSTANT_OFFSET_MODE#define StorePixels(o,p)    dst[o] = p#define Loop		    dst += widthDst;#else#define StorePixels(o,p)    *dst++ = (p)#define Loop		    dst += widthLeft;#endif#define Step		    NextBitGroup(c);#if (BITMAP_BIT_ORDER == MSBFirst)#define StoreBits(o)	StorePixels(o,GetPixelGroup(c));#define FirstStep	Step#else#if PGSZ == 64#define StoreBits(o)	StorePixels(o,cfb8Pixels[(c) & PGSZBMSK]);#define FirstStep	Step#else /* PGSZ == 32 */#define StoreBits(o)	StorePixels(o,*((unsigned long *) (((char *) cfb8Pixels) + (c & 0x3c))));#define FirstStep	c = BitLeft (c, 2);#endif /* PGSZ */#endif /* BITMAP_BIT_ORDER */voidCFBTEGBLT8 (pDrawable, pGC, xInit, yInit, nglyph, ppci, pglyphBase)    DrawablePtr pDrawable;    GC 		*pGC;    int 	xInit, yInit;    unsigned int nglyph;    CharInfoPtr *ppci;		/* array of character info */    pointer	pglyphBase;	/* start of array of glyphs */{    register unsigned long  c;    register unsigned long  *dst;    register unsigned long  leftMask, rightMask;    register int	    hTmp;    register int	    xoff1;    register glyphPointer   char1;    register glyphPointer   char2;#if NGLYPHS >= 3    register glyphPointer   char3;#endif#if NGLYPHS >= 4    register glyphPointer   char4;#endif#if NGLYPHS >= 5    register glyphPointer   char5;#endif#ifdef ALL_LEFTBITS    int xoff2, xoff3, xoff4, xoff5;#endif    FontPtr		pfont = pGC->font;    unsigned long	*dstLine;    glyphPointer	oldRightChar;    unsigned long	*pdstBase;    glyphPointer	leftChar;    int			widthDst, widthLeft;    int			widthGlyph;    int			h;    int			ew;    int			x, y;    BoxRec		bbox;		/* for clipping */    int			lshift;    int			widthGlyphs;#ifdef USE_LEFTBITS    register unsigned long  glyphMask;    register unsigned long  tmpSrc;    register int	    glyphBytes;#endif    widthGlyph = FONTMAXBOUNDS(pfont,characterWidth);    h = FONTASCENT(pfont) + FONTDESCENT(pfont);    if (!h)	return;    x = xInit + FONTMAXBOUNDS(pfont,leftSideBearing) + pDrawable->x;    y = yInit - FONTASCENT(pfont) + pDrawable->y;    bbox.x1 = x;    bbox.x2 = x + (widthGlyph * nglyph);    bbox.y1 = y;    bbox.y2 = y + h;    switch (RECT_IN_REGION(pGC->pScreen,  cfbGetCompositeClip(pGC), &bbox))    {      case rgnPART:	cfbImageGlyphBlt8(pDrawable, pGC, xInit, yInit, nglyph, ppci, pglyphBase);      case rgnOUT:	return;    }    if (!cfb8CheckPixels (pGC->fgPixel, pGC->bgPixel))	cfb8SetPixels (pGC->fgPixel, pGC->bgPixel);    leftChar = 0;    cfbGetLongWidthAndPointer(pDrawable, widthDst, pdstBase)#if NGLYPHS == 2    widthGlyphs = widthGlyph << 1;#else#if NGLYPHS == 4    widthGlyphs = widthGlyph << 2;#else    widthGlyphs = widthGlyph * NGLYPHS;#endif#endif#ifdef USE_LEFTBITS    glyphMask = endtab[widthGlyph];    glyphBytes = GLYPHWIDTHBYTESPADDED(*ppci);#endif    pdstBase += y * widthDst;#ifdef DO_COMMON    if (widthGlyphs <= 32)#endif    	while (nglyph >= NGLYPHS)    	{	    nglyph -= NGLYPHS;	    hTmp = h;	    dstLine = pdstBase + (x >> PWSH);	    xoff1 = x & PIM;	    char1 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++);	    char2 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++);#ifdef ALL_LEFTBITS	    xoff2 = xoff1 + widthGlyph;#endif#if NGLYPHS >= 3	    char3 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++);#ifdef ALL_LEFTBITS	    xoff3 = xoff2 + widthGlyph;#endif#endif#if NGLYPHS >= 4	    char4 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++);#ifdef ALL_LEFTBITS	    xoff4 = xoff3 + widthGlyph;#endif#endif#if NGLYPHS >= 5	    char5 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++);#ifdef ALL_LEFTBITS	    xoff5 = xoff4 + widthGlyph;#endif#endif	    oldRightChar = LastChar;	    dst = dstLine;	    if (xoff1)	    {		ew = ((widthGlyphs - (PGSZB - xoff1)) >> PWSH) + 1;#ifndef FAST_CONSTANT_OFFSET_MODE		widthLeft = widthDst - ew;#endif	    	if (!leftChar)	    	{		    leftMask = cfbendtab[xoff1];		    rightMask = cfbstarttab[xoff1];#define StoreBits0	StorePixels (0,dst[0] & leftMask | \				       GetPixelGroup(c) & rightMask);#define GetBits GetBitsNS		    SwitchEm#undef GetBits#undef StoreBits0	    	}	    	else	    	{		    lshift = widthGlyph - xoff1;    #define StoreBits0  StorePixels (0,GetPixelGroup(c));#define GetBits GetBitsNL    		    SwitchEm    #undef GetBits#undef StoreBits0    	    	}	    }	    else	    {#if NGLYPHS == 4 && PGSZ == 32	    	ew = widthGlyph;    /* widthGlyphs >> 2 */#else	    	ew = widthGlyphs >> PWSH;#endif#ifndef FAST_CONSTANT_OFFSET_MODE		widthLeft = widthDst - ew;#endif#define StoreBits0  StorePixels (0,GetPixelGroup(c));#define GetBits	GetBitsNU	    	SwitchEm#undef GetBits#undef StoreBits0	    }	    x += widthGlyphs;	    leftChar = oldRightChar;    	}    while (nglyph--)    {	xoff1 = x & PIM;	char1 = (glyphPointer) FONTGLYPHBITS(pglyphBase, *ppci++);	hTmp = h;	dstLine = pdstBase + (x >> PWSH);	oldRightChar = char1;	dst = dstLine;	if (xoff1)	{	    ew = ((widthGlyph - (PGSZB - xoff1)) >> PWSH) + 1;#ifndef FAST_CONSTANT_OFFSET_MODE	    widthLeft = widthDst - ew;#endif	    if (!leftChar)	    {		leftMask = cfbendtab[xoff1];		rightMask = cfbstarttab[xoff1];#define StoreBits0	StorePixels (0,dst[0] & leftMask | GetPixelGroup(c) & rightMask);#define GetBits	WGetBits1S		SwitchEm#undef GetBits#undef StoreBits0	    }	    else	    {		lshift = widthGlyph - xoff1;#define StoreBits0  StorePixels (0,GetPixelGroup(c));#define GetBits WGetBits1L		SwitchEm#undef GetBits#undef StoreBits0	    }	}	else	{	    ew = widthGlyph >> PWSH;#ifndef FAST_CONSTANT_OFFSET_MODE	    widthLeft = widthDst - ew;#endif#define StoreBits0  StorePixels (0,GetPixelGroup(c));#define GetBits	WGetBits1U	    SwitchEm#undef GetBits#undef StoreBits0	}	x += widthGlyph;	leftChar = oldRightChar;    }    /*     * draw the tail of the last character     */    xoff1 = x & PIM;    if (xoff1)    {	rightMask = cfbstarttab[xoff1];	leftMask = cfbendtab[xoff1];	lshift = widthGlyph - xoff1;	dst = pdstBase + (x >> PWSH);	hTmp = h;	while (hTmp--)	{	    GetBitsL;	    *dst = (*dst & rightMask) | (GetPixelGroup(c) & leftMask);	    dst += widthDst;	}    }}#endif /* PSZ == 8 */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -