亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tkmacdraw.c

?? linux系統下的音頻通信
?? C
?? 第 1 頁 / 共 2 頁
字號:
void XFillPolygon(    Display* display,		/* Display. */    Drawable d,			/* Draw on this. */    GC gc,			/* Use this GC. */    XPoint* points,		/* Array of points. */    int npoints,		/* Number of points. */    int shape,			/* Shape to draw. */    int mode)			/* Drawing mode. */{    MacDrawable *macWin = (MacDrawable *) d;    PolyHandle polygon;    CGrafPtr saveWorld;    GDHandle saveDevice;    GWorldPtr destPort;    int i;    destPort = TkMacGetDrawablePort(d);    display->request++;    GetGWorld(&saveWorld, &saveDevice);    SetGWorld(destPort, NULL);    TkMacSetUpClippingRgn(d);        TkMacSetUpGraphicsPort(gc);    PenNormal();    polygon = OpenPoly();    MoveTo((short) (macWin->xOff + points[0].x),	    (short) (macWin->yOff + points[0].y));    for (i = 1; i < npoints; i++) {	if (mode == CoordModePrevious) {	    Line((short) (macWin->xOff + points[i].x),		    (short) (macWin->yOff + points[i].y));	} else {	    LineTo((short) (macWin->xOff + points[i].x),		    (short) (macWin->yOff + points[i].y));	}    }    ClosePoly();    FillCPoly(polygon, gPenPat);    KillPoly(polygon);    SetGWorld(saveWorld, saveDevice);}/* *---------------------------------------------------------------------- * * XDrawRectangle -- * *	Draws a rectangle. * * Results: *	None. * * Side effects: *	Draws a rectangle on the specified drawable. * *---------------------------------------------------------------------- */void XDrawRectangle(    Display* display,		/* Display. */    Drawable d,			/* Draw on this. */    GC gc,			/* Use this GC. */    int x,			/* Upper left corner. */    int y,    unsigned int width,		/* Width & height of rect. */    unsigned int height){    MacDrawable *macWin = (MacDrawable *) d;    Rect theRect;    CGrafPtr saveWorld;    GDHandle saveDevice;    GWorldPtr destPort;    destPort = TkMacGetDrawablePort(d);    display->request++;    GetGWorld(&saveWorld, &saveDevice);    SetGWorld(destPort, NULL);    TkMacSetUpClippingRgn(d);    TkMacSetUpGraphicsPort(gc);    theRect.left = (short) (macWin->xOff + x);    theRect.top = (short) (macWin->yOff + y);    theRect.right = (short) (theRect.left + width);    theRect.bottom = (short) (theRect.top + height);	    ShowPen();    PenPixPat(gPenPat);    FrameRect(&theRect);    SetGWorld(saveWorld, saveDevice);}/* *---------------------------------------------------------------------- * * XDrawArc -- * *	Draw an arc. * * Results: *	None. * * Side effects: *	Draws an arc on the specified drawable. * *---------------------------------------------------------------------- */void XDrawArc(    Display* display,		/* Display. */    Drawable d,			/* Draw on this. */    GC gc,			/* Use this GC. */    int x,			/* Upper left of */    int y,			/* bounding rect. */    unsigned int width,		/* Width & height. */    unsigned int height,    int angle1,			/* Staring angle of arc. */    int angle2)			/* Ending angle of arc. */{    MacDrawable *macWin = (MacDrawable *) d;    Rect theRect;    short start, extent;    CGrafPtr saveWorld;    GDHandle saveDevice;    GWorldPtr destPort;    destPort = TkMacGetDrawablePort(d);    display->request++;    GetGWorld(&saveWorld, &saveDevice);    SetGWorld(destPort, NULL);    TkMacSetUpClippingRgn(d);    TkMacSetUpGraphicsPort(gc);    theRect.left = (short) (macWin->xOff + x);    theRect.top = (short) (macWin->yOff + y);    theRect.right = (short) (theRect.left + width);    theRect.bottom = (short) (theRect.top + height);    start = (short) (90 - (angle1 / 64));    extent = (short) (-(angle2 / 64));    ShowPen();    PenPixPat(gPenPat);    FrameArc(&theRect, start, extent);    SetGWorld(saveWorld, saveDevice);}/* *---------------------------------------------------------------------- * * XFillArc -- * *	Draw a filled arc. * * Results: *	None. * * Side effects: *	Draws a filled arc on the specified drawable. * *---------------------------------------------------------------------- */voidXFillArc(    Display* display,		/* Display. */    Drawable d,			/* Draw on this. */    GC gc,			/* Use this GC. */    int x,			/* Upper left of */    int y,			/* bounding rect. */    unsigned int width,		/* Width & height. */    unsigned int height,    int angle1,			/* Staring angle of arc. */    int angle2)			/* Ending angle of arc. */{    MacDrawable *macWin = (MacDrawable *) d;    Rect theRect;    short start, extent;    PolyHandle polygon;    double sin1, cos1, sin2, cos2, angle;    double boxWidth, boxHeight;    double vertex[2], center1[2], center2[2];    CGrafPtr saveWorld;    GDHandle saveDevice;    GWorldPtr destPort;    destPort = TkMacGetDrawablePort(d);    display->request++;    GetGWorld(&saveWorld, &saveDevice);    SetGWorld(destPort, NULL);    TkMacSetUpClippingRgn(d);    TkMacSetUpGraphicsPort(gc);    theRect.left = (short) (macWin->xOff + x);    theRect.top = (short) (macWin->yOff + y);    theRect.right = (short) (theRect.left + width);    theRect.bottom = (short) (theRect.top + height);    start = (short) (90 - (angle1 / 64));    extent = (short) (- (angle2 / 64));    if (gc->arc_mode == ArcChord) {    	boxWidth = theRect.right - theRect.left;    	boxHeight = theRect.bottom - theRect.top;    	angle = -(angle1/64.0)*PI/180.0;    	sin1 = sin(angle);    	cos1 = cos(angle);    	angle -= (angle2/64.0)*PI/180.0;    	sin2 = sin(angle);    	cos2 = cos(angle);    	vertex[0] = (theRect.left + theRect.right)/2.0;    	vertex[1] = (theRect.top + theRect.bottom)/2.0;    	center1[0] = vertex[0] + cos1*boxWidth/2.0;    	center1[1] = vertex[1] + sin1*boxHeight/2.0;    	center2[0] = vertex[0] + cos2*boxWidth/2.0;    	center2[1] = vertex[1] + sin2*boxHeight/2.0;	polygon = OpenPoly();	MoveTo((short) ((theRect.left + theRect.right)/2),		(short) ((theRect.top + theRect.bottom)/2));		LineTo((short) (center1[0] + 0.5), (short) (center1[1] + 0.5));	LineTo((short) (center2[0] + 0.5), (short) (center2[1] + 0.5));	ClosePoly();	ShowPen();	FillCArc(&theRect, start, extent, gPenPat);	FillCPoly(polygon, gPenPat);	KillPoly(polygon);    } else {	ShowPen();	FillCArc(&theRect, start, extent, gPenPat);    }    SetGWorld(saveWorld, saveDevice);}/* *---------------------------------------------------------------------- * * TkScrollWindow -- * *	Scroll a rectangle of the specified window and accumulate *	a damage region. * * Results: *	Returns 0 if the scroll genereated no additional damage. *	Otherwise, sets the region that needs to be repainted after *	scrolling and returns 1. * * Side effects: *	Scrolls the bits in the window. * *---------------------------------------------------------------------- */intTkScrollWindow(    Tk_Window tkwin,		/* The window to be scrolled. */    GC gc,			/* GC for window to be scrolled. */    int x,			/* Position rectangle to be scrolled. */    int y,    int width,    int height,    int dx,			/* Distance rectangle should be moved. */    int dy,    TkRegion damageRgn)		/* Region to accumulate damage in. */{    MacDrawable *destDraw = (MacDrawable *) Tk_WindowId(tkwin);    RgnHandle rgn = (RgnHandle) damageRgn;    CGrafPtr saveWorld;    GDHandle saveDevice;    GWorldPtr destPort;    Rect srcRect, scrollRect;        destPort = TkMacGetDrawablePort(Tk_WindowId(tkwin));    GetGWorld(&saveWorld, &saveDevice);    SetGWorld(destPort, NULL);    TkMacSetUpClippingRgn(Tk_WindowId(tkwin));    /*     * Due to the implementation below the behavior may be differnt     * than X in certain cases that should never occur in Tk.  The      * scrollRect is the source rect extended by the offset (the union      * of the source rect and the offset rect).  Everything     * in the extended scrollRect is scrolled.  On X, it's possible     * to "skip" over an area if the offset makes the source and     * destination rects disjoint and non-aligned.     */           SetRect(&srcRect, (short) (destDraw->xOff + x),	    (short) (destDraw->yOff + y),	    (short) (destDraw->xOff + x + width),	    (short) (destDraw->yOff + y + height));    scrollRect = srcRect;    if (dx < 0) {	scrollRect.left += dx;    } else {	scrollRect.right += dx;    }    if (dy < 0) {	scrollRect.top += dy;    } else {	scrollRect.bottom += dy;    }    /*     * Adjust clip region so that we don't copy any windows     * that may overlap us.     */    RectRgn(rgn, &srcRect);    DiffRgn(rgn, destPort->visRgn, rgn);    OffsetRgn(rgn, dx, dy);    DiffRgn(destPort->clipRgn, rgn, destPort->clipRgn);    SetEmptyRgn(rgn);        /*     * When a menu is up, the Mac does not expect drawing to occur and     * does not clip out the menu. We have to do it ourselves. This     * is pretty gross.     */    if (tkUseMenuCascadeRgn == 1) {    	Point scratch = {0, 0};    	MacDrawable *macDraw = (MacDrawable *) Tk_WindowId(tkwin);	LocalToGlobal(&scratch);	CopyRgn(tkMenuCascadeRgn, rgn);	OffsetRgn(rgn, -scratch.h, -scratch.v);	DiffRgn(destPort->clipRgn, rgn, destPort->clipRgn);	SetEmptyRgn(rgn);	macDraw->toplevel->flags |= TK_DRAWN_UNDER_MENU;    }	    ScrollRect(&scrollRect, dx, dy, rgn);        SetGWorld(saveWorld, saveDevice);        /*     * Fortunantly, the region returned by ScrollRect is symanticlly     * the same as what we need to return in this function.  If the     * region is empty we return zero to denote that no damage was     * created.     */    if (EmptyRgn(rgn)) {	return 0;    } else {	return 1;    }}/* *---------------------------------------------------------------------- * * TkMacSetUpGraphicsPort -- * *	Set up the graphics port from the given GC. * * Results: *	None. * * Side effects: *	The current port is adjusted. * *---------------------------------------------------------------------- */voidTkMacSetUpGraphicsPort(    GC gc)		/* GC to apply to current port. */{    RGBColor macColor;    if (gPenPat == NULL) {	gPenPat = NewPixPat();    }        if (TkSetMacColor(gc->foreground, &macColor) == true) {        /* TODO: cache RGBPats for preformace - measure gains...  */	MakeRGBPat(gPenPat, &macColor);    }        PenNormal();    if(gc->function == GXxor) {	PenMode(patXor);    }    if (gc->line_width > 1) {	PenSize(gc->line_width, gc->line_width);    }}/* *---------------------------------------------------------------------- * * TkMacSetUpClippingRgn -- * *	Set up the clipping region so that drawing only occurs on the *	specified X subwindow. * * Results: *	None. * * Side effects: *	The clipping region in the current port is changed. * *---------------------------------------------------------------------- */voidTkMacSetUpClippingRgn(    Drawable drawable)		/* Drawable to update. */{    MacDrawable *macDraw = (MacDrawable *) drawable;    if (macDraw->winPtr != NULL) {	if (macDraw->flags & TK_CLIP_INVALID) {	    TkMacUpdateClipRgn(macDraw->winPtr);	}	/*	 * When a menu is up, the Mac does not expect drawing to occur and	 * does not clip out the menu. We have to do it ourselves. This	 * is pretty gross.	 */	if (macDraw->clipRgn != NULL) {	    if (tkUseMenuCascadeRgn == 1) {	    	Point scratch = {0, 0};	    	GDHandle saveDevice;	    	GWorldPtr saveWorld;	    		    	GetGWorld(&saveWorld, &saveDevice);	    	SetGWorld(TkMacGetDrawablePort(drawable), NULL);	    	LocalToGlobal(&scratch);	    	SetGWorld(saveWorld, saveDevice);	    	if (tmpRgn == NULL) {	    	    tmpRgn = NewRgn();	    	}	    	CopyRgn(tkMenuCascadeRgn, tmpRgn);	    	OffsetRgn(tmpRgn, -scratch.h, -scratch.v);	    	DiffRgn(macDraw->clipRgn, tmpRgn, tmpRgn);	    	SetClip(tmpRgn);	    	macDraw->toplevel->flags |= TK_DRAWN_UNDER_MENU;	    } else {	    	SetClip(macDraw->clipRgn);	    }	}    }}/* *---------------------------------------------------------------------- * * TkMacMakeStippleMap -- * *	Given a drawable and a stipple pattern this function draws the *	pattern repeatedly over the drawable.  The drawable can then *	be used as a mask for bit-bliting a stipple pattern over an *	object. * * Results: *	A BitMap data structure. * * Side effects: *	None. * *---------------------------------------------------------------------- */BitMapPtrTkMacMakeStippleMap(    Drawable drawable,		/* Window to apply stipple. */    Drawable stipple)		/* The stipple pattern. */{    MacDrawable *destDraw = (MacDrawable *) drawable;    GWorldPtr destPort;    BitMapPtr bitmapPtr;    int width, height, stippleHeight, stippleWidth;    int i, j;    char * data;    Rect bounds;    destPort = TkMacGetDrawablePort(drawable);    width = destPort->portRect.right - destPort->portRect.left;    height = destPort->portRect.bottom - destPort->portRect.top;        bitmapPtr = (BitMap *) ckalloc(sizeof(BitMap));    data = (char *) ckalloc(height * ((width / 8) + 1));    bitmapPtr->bounds.top = bitmapPtr->bounds.left = 0;    bitmapPtr->bounds.right = (short) width;    bitmapPtr->bounds.bottom = (short) height;    bitmapPtr->baseAddr = data;    bitmapPtr->rowBytes = (width / 8) + 1;    destPort = TkMacGetDrawablePort(stipple);    stippleWidth = destPort->portRect.right - destPort->portRect.left;    stippleHeight = destPort->portRect.bottom - destPort->portRect.top;    for (i = 0; i < height; i += stippleHeight) {	for (j = 0; j < width; j += stippleWidth) {	    bounds.left = j;	    bounds.top = i;	    bounds.right = j + stippleWidth;	    bounds.bottom = i + stippleHeight;	    	    CopyBits(&((GrafPtr) destPort)->portBits, bitmapPtr, 		&((GrafPtr) destPort)->portRect, &bounds, srcCopy, NULL);	}    }    return bitmapPtr;}/* *---------------------------------------------------------------------- * * InvertByte -- * *      This function reverses the bits in the passed in Byte of data. * * Results: *      The incoming byte in reverse bit order. * * Side effects: *      None. * *---------------------------------------------------------------------- */static unsigned charInvertByte(    unsigned char data)		/* Byte of data. */{    unsigned char i;    unsigned char mask = 1, result = 0;     for (i = (1 << 7); i != 0; i /= 2) {        if (data & mask) {            result |= i;        }        mask = mask << 1;    }    return result;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩免费电影| 欧美色国产精品| 日本aⅴ精品一区二区三区 | 精品99999| 91精品国产入口| 欧美精品亚洲一区二区在线播放| 欧美视频第二页| 在线观看亚洲成人| 欧美日韩国产大片| 欧美日韩精品一区二区三区四区| 欧美久久久久久久久中文字幕| 欧美在线一区二区| 宅男噜噜噜66一区二区66| 91精品国产91综合久久蜜臀| 在线成人小视频| 精品久久久久久综合日本欧美| 日韩精品在线一区| 国产欧美一区二区三区鸳鸯浴| 国产欧美一区二区精品忘忧草| 国产精品系列在线| 亚洲黄色录像片| 同产精品九九九| 国内精品伊人久久久久影院对白| 国产91在线|亚洲| 欧美人动与zoxxxx乱| 91精品欧美一区二区三区综合在| 日韩欧美久久久| 国产精品日韩成人| 亚洲国产精品人人做人人爽| 麻豆专区一区二区三区四区五区| 国产激情视频一区二区三区欧美| 99久久er热在这里只有精品15| 欧美在线观看你懂的| 日韩欧美一区在线观看| 日本一区二区三区四区| 亚洲成va人在线观看| 久久超碰97人人做人人爱| 成人夜色视频网站在线观看| 欧美在线视频不卡| 久久综合久久99| 亚洲午夜激情av| 风间由美一区二区三区在线观看| 欧美亚日韩国产aⅴ精品中极品| 精品国产91久久久久久久妲己| 亚洲精选免费视频| 国内精品免费在线观看| 一本到不卡精品视频在线观看| 精品少妇一区二区三区视频免付费| 国产精品卡一卡二| 久久精品国产网站| 在线免费一区三区| 久久精品夜色噜噜亚洲aⅴ| 亚洲一线二线三线视频| 国产aⅴ综合色| 日韩精品一区二区在线观看| 亚洲一区二区视频在线| 成人黄色免费短视频| 精品国产一二三| 成人免费高清在线| 欧美一区二区三区白人| 亚洲影院理伦片| 91啪亚洲精品| 国产精品久久久久永久免费观看 | 99久久国产免费看| 久久久综合九色合综国产精品| 亚洲一线二线三线久久久| www.日韩精品| 中文字幕av一区 二区| 国产一区日韩二区欧美三区| 欧美一级一区二区| 婷婷开心激情综合| 欧美日本一区二区三区四区| 亚洲午夜免费视频| 在线日韩av片| 亚洲国产精品一区二区www| 色婷婷av一区二区三区gif | 欧美日韩国产综合草草| 亚洲精品国产一区二区三区四区在线| 韩国精品久久久| 久久久久久久精| 国产精品一级黄| 欧美激情在线免费观看| 东方欧美亚洲色图在线| 国产免费久久精品| 成人av电影观看| 亚洲色图另类专区| 99久久精品免费看国产| 亚洲情趣在线观看| 欧美日韩国产一二三| 亚洲va欧美va国产va天堂影院| 欧美三级日本三级少妇99| 午夜国产不卡在线观看视频| 91精品国产综合久久久久| 另类中文字幕网| 欧美韩日一区二区三区四区| 99视频国产精品| 亚洲超碰97人人做人人爱| 91精品中文字幕一区二区三区 | 亚洲精品在线免费播放| 久久99久久99| 国产欧美久久久精品影院| 91麻豆福利精品推荐| 亚洲电影在线播放| 精品国产污污免费网站入口 | 亚洲视频在线一区二区| 成人免费观看av| 午夜精品福利一区二区三区av| 日韩女同互慰一区二区| av网站一区二区三区| 石原莉奈一区二区三区在线观看| 日韩欧美电影一二三| hitomi一区二区三区精品| 丝瓜av网站精品一区二区| 久久久久久久国产精品影院| 91国偷自产一区二区使用方法| 天天免费综合色| 国产精品亲子乱子伦xxxx裸| 欧美日韩一区三区四区| 国产福利91精品一区二区三区| 亚洲愉拍自拍另类高清精品| 久久久久久一二三区| 色综合久久88色综合天天6| 美国欧美日韩国产在线播放| 亚洲激情图片一区| 精品国产91乱码一区二区三区| 欧美在线视频日韩| 不卡一区中文字幕| 美国av一区二区| 性做久久久久久久久| 国产精品久久福利| 精品国产91洋老外米糕| 91.成人天堂一区| 日本精品视频一区二区| 国产一区二区三区观看| 日本aⅴ免费视频一区二区三区| 亚洲日本在线看| 26uuu色噜噜精品一区| 6080yy午夜一二三区久久| 91免费视频大全| 99麻豆久久久国产精品免费优播| 国产一区二区三区国产| 麻豆高清免费国产一区| 视频一区二区三区中文字幕| 亚洲卡通欧美制服中文| 中文字幕精品一区二区三区精品| 精品国产污污免费网站入口 | 日韩精品中文字幕在线一区| 欧美三级三级三级| 在线观看一区日韩| 色综合久久99| 在线亚洲一区二区| 99精品欧美一区二区三区小说| 国产精品一区2区| 国产激情91久久精品导航| 国产一区二区毛片| 国产精品影视天天线| 国产麻豆精品久久一二三| 国产一区二区视频在线| 国产乱子轮精品视频| 国产成人精品一区二| 国产很黄免费观看久久| 国产成人精品影院| 99视频热这里只有精品免费| 99久精品国产| 欧日韩精品视频| 欧美精品久久天天躁| 69精品人人人人| 国产情人综合久久777777| 成人国产亚洲欧美成人综合网| 国产精品一区二区你懂的| 大胆欧美人体老妇| 久久精品夜夜夜夜久久| 欧美一区二区三区思思人| 国内不卡的二区三区中文字幕| 在线免费精品视频| 国产精品色呦呦| 狠狠色丁香婷综合久久| 欧美午夜电影一区| 中文字幕亚洲不卡| 精品亚洲porn| 亚洲精品久久7777| 国产成人午夜精品影院观看视频| 制服丝袜av成人在线看| 亚洲日韩欧美一区二区在线| 国产69精品久久久久毛片| 亚洲精品在线三区| 日韩黄色片在线观看| 欧洲视频一区二区| 亚洲人一二三区| 成人aa视频在线观看| 国产日韩欧美不卡| 久久av老司机精品网站导航| 91精品国产欧美日韩| 亚洲国产va精品久久久不卡综合| 91原创在线视频| 亚洲视频小说图片| 91亚洲男人天堂| 亚洲欧美一区二区三区孕妇| 93久久精品日日躁夜夜躁欧美| 中文字幕+乱码+中文字幕一区|