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

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

?? rotated.c

?? 混沌分析工具
?? C
?? 第 1 頁 / 共 3 頁
字號:
    /* by default we draw the rotated bitmap, solid */    bitmap_to_paint=item->bitmap;    /* handle user stippling */#ifndef X11R3    {	GC depth_one_gc;	XGCValues values;	Pixmap new_bitmap, inverse;		/* try and get some GC properties */	if(XGetGCValues(dpy, gc, 			GCStipple|GCFillStyle|GCForeground|GCBackground|			GCTileStipXOrigin|GCTileStipYOrigin,			&values)) {	    /* only do this if stippling requested */	    if((values.fill_style==FillStippled ||		values.fill_style==FillOpaqueStippled) && !bg) {		/* opaque stipple: draw rotated text in background colour */		if(values.fill_style==FillOpaqueStippled) {		    XSetForeground(dpy, my_gc, values.background);		    XSetFillStyle(dpy, my_gc, FillStippled);		    XSetStipple(dpy, my_gc, item->bitmap);		    XSetTSOrigin(dpy, my_gc, xp, yp);		    XFillRectangle(dpy, drawable, my_gc, xp, yp,				   item->cols_out, item->rows_out);		    XSetForeground(dpy, my_gc, values.foreground);		}		/* this will merge the rotated text and the user's stipple */		new_bitmap=XCreatePixmap(dpy, drawable,					 item->cols_out, item->rows_out, 1);		/* create a GC */		depth_one_gc=XCreateGC(dpy, new_bitmap, NULL, 0);		XSetForeground(dpy, depth_one_gc, 1);		XSetBackground(dpy, depth_one_gc, 0);		/* set the relative stipple origin */		XSetTSOrigin(dpy, depth_one_gc, 			     values.ts_x_origin-xp, values.ts_y_origin-yp);		/* fill the whole bitmap with the user's stipple */		XSetStipple(dpy, depth_one_gc, values.stipple);		XSetFillStyle(dpy, depth_one_gc, FillOpaqueStippled);		XFillRectangle(dpy, new_bitmap, depth_one_gc,			       0, 0, item->cols_out, item->rows_out);		/* set stipple origin back to normal */		XSetTSOrigin(dpy, depth_one_gc, 0, 0);		/* this will contain an inverse copy of the rotated text */		inverse=XCreatePixmap(dpy, drawable,				      item->cols_out, item->rows_out, 1);		/* invert text */		XSetFillStyle(dpy, depth_one_gc, FillSolid);		XSetFunction(dpy, depth_one_gc, GXcopyInverted);		XCopyArea(dpy, item->bitmap, inverse, depth_one_gc,			  0, 0, item->cols_out, item->rows_out, 0, 0);		/* now delete user's stipple everywhere EXCEPT on text */                XSetForeground(dpy, depth_one_gc, 0);                XSetBackground(dpy, depth_one_gc, 1);		XSetStipple(dpy, depth_one_gc, inverse);		XSetFillStyle(dpy, depth_one_gc, FillStippled);		XSetFunction(dpy, depth_one_gc, GXcopy);		XFillRectangle(dpy, new_bitmap, depth_one_gc,                               0, 0, item->cols_out, item->rows_out);		/* free resources */		XFreePixmap(dpy, inverse);		XFreeGC(dpy, depth_one_gc);		/* this is the new bitmap */		bitmap_to_paint=new_bitmap;	    }	}    }#endif /*X11R3*/    /* paint text using stipple technique */    XSetFillStyle(dpy, my_gc, FillStippled);    XSetStipple(dpy, my_gc, bitmap_to_paint);    XSetTSOrigin(dpy, my_gc, xp, yp);    XFillRectangle(dpy, drawable, my_gc, xp, yp, 		   item->cols_out, item->rows_out);        /* free our resources */    XFreeGC(dpy, my_gc);    /* stippled bitmap no longer needed */    if(bitmap_to_paint!=item->bitmap)	XFreePixmap(dpy, bitmap_to_paint);#ifdef CACHE_XIMAGES    XFreePixmap(dpy, item->bitmap);#endif /*CACHE_XIMAGES*/    /* if item isn't cached, destroy it completely */    if(!item->cached) 	XRotFreeTextItem(dpy,item);    /* we got to the end OK! */    return 0;}/* ---------------------------------------------------------------------- *//**************************************************************************//*  Draw a horizontal string in a quick fashion                           *//**************************************************************************/static int XRotDrawHorizontalString(dpy, font, drawable, gc, x, y, text, 			     align, bg)    Display *dpy;    XFontStruct *font;    Drawable drawable;    GC gc;    int x, y;    char *text;    int align;    int bg;{    GC my_gc;    int nl=1, i;    int height;    int xp, yp;    char *str1, *str2, *str3;    char *str2_a="\0", *str2_b="\n\0";    int dir, asc, desc;    XCharStruct overall;    DEBUG_PRINT1("**\nHorizontal text.\n");    /* this gc has similar properties to the user's gc (including stipple) */    my_gc=XCreateGC(dpy, drawable, NULL, 0);    XCopyGC(dpy, gc,	    GCForeground|GCBackground|GCFunction|GCStipple|GCFillStyle|	    GCTileStipXOrigin|GCTileStipYOrigin|GCPlaneMask, my_gc);    XSetFont(dpy, my_gc, font->fid);	    /* count number of sections in string */    if(align!=NONE)	for(i=0; i<strlen(text)-1; i++)	    if(text[i]=='\n')		nl++;        /* ignore newline characters if not doing alignment */    if(align==NONE)	str2=str2_a;    else	str2=str2_b;        /* overall font height */    height=font->ascent+font->descent;        /* y position */    if(align==TLEFT || align==TCENTRE || align==TRIGHT)	yp=y+font->ascent;    else if(align==MLEFT || align==MCENTRE || align==MRIGHT)	yp=y-nl*height/2+font->ascent;    else if(align==BLEFT || align==BCENTRE || align==BRIGHT)	yp=y-nl*height+font->ascent;    else	yp=y;        str1=my_strdup(text);    if(str1==NULL)	return 1;        str3=my_strtok(str1, str2);        /* loop through each section in the string */    do {        XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc,                     &overall);	/* where to draw section in x ? */	if(align==TLEFT || align==MLEFT || align==BLEFT || align==NONE)	    xp=x;	else if(align==TCENTRE || align==MCENTRE || align==BCENTRE)	    xp=x-overall.rbearing/2;	else	    xp=x-overall.rbearing;		/* draw string onto bitmap */	if(!bg)	    XDrawString(dpy, drawable, my_gc, xp, yp, str3, strlen(str3));	else	    XDrawImageString(dpy, drawable, my_gc, xp, yp, str3, strlen(str3));		/* move to next line */	yp+=height;		str3=my_strtok((char *)NULL, str2);    }    while(str3!=NULL);        free(str1);    XFreeGC(dpy, my_gc);    return 0;}/* ---------------------------------------------------------------------- *//**************************************************************************//*   Query cache for a match with this font/text/angle/alignment          *//*       request, otherwise arrange for its creation                      *//**************************************************************************/static RotatedTextItem *XRotRetrieveFromCache(dpy, font, angle, text, align)    Display *dpy;    XFontStruct *font;    float angle;    char *text;    int align;{    Font fid;    char *font_name=NULL;    unsigned long name_value;    RotatedTextItem *item=NULL;    RotatedTextItem *i1=first_text_item;        /* get font name, if it exists */    if(XGetFontProperty(font, XA_FONT, &name_value)) {	DEBUG_PRINT1("got font name OK\n");	font_name=XGetAtomName(dpy, name_value);	fid=0;    }#ifdef CACHE_FID    /* otherwise rely (unreliably?) on font ID */    else {	DEBUG_PRINT1("can't get fontname, caching FID\n");	font_name=NULL;	fid=font->fid;    }#else    /* not allowed to cache font ID's */    else {	DEBUG_PRINT1("can't get fontname, can't cache\n");	font_name=NULL;	fid=0;    }#endif /*CACHE_FID*/        /* look for a match in cache */    /* matching formula:       identical text;       identical fontname (if defined, font ID's if not);       angles close enough (<0.00001 here, could be smaller);       HORIZONTAL alignment matches, OR it's a one line string;       magnifications the same */    while(i1 && !item) {	/* match everything EXCEPT fontname/ID */	if(strcmp(text, i1->text)==0 &&	   fabs(angle-i1->angle)<0.00001 &&	   style.magnify==i1->magnify &&	   (i1->nl==1 ||	    ((align==0)?9:(align-1))%3==	      ((i1->align==0)?9:(i1->align-1))%3)) {	    /* now match fontname/ID */	    if(font_name!=NULL && i1->font_name!=NULL) {		if(strcmp(font_name, i1->font_name)==0) {		    item=i1;		    DEBUG_PRINT1("Matched against font names\n");		}		else		    i1=i1->next;	    }#ifdef CACHE_FID	    else if(font_name==NULL && i1->font_name==NULL) {		if(fid==i1->fid) {		    item=i1;		    DEBUG_PRINT1("Matched against FID's\n");                }		else                    i1=i1->next;	    }#endif /*CACHE_FID*/	    else		i1=i1->next;	}	else	    i1=i1->next;    }        if(item)	DEBUG_PRINT1("**\nFound target in cache.\n");    if(!item)	DEBUG_PRINT1("**\nNo match in cache.\n");    /* no match */    if(!item) {	/* create new item */	item=XRotCreateTextItem(dpy, font, angle, text, align);	if(!item)	    return NULL;	/* record what it shows */	item->text=my_strdup(text);	/* fontname or ID */	if(font_name!=NULL) {	    item->font_name=my_strdup(font_name);	    item->fid=0;	}	else {	    item->font_name=NULL;	    item->fid=fid;	}	item->angle=angle;	item->align=align;	item->magnify=style.magnify;	/* cache it */	XRotAddToLinkedList(dpy, item);    }    if(font_name)	XFree(font_name);    /* if XImage is cached, need to recreate the bitmap */#ifdef CACHE_XIMAGES    {	GC depth_one_gc;	/* create bitmap to hold rotated text */	item->bitmap=XCreatePixmap(dpy, DefaultRootWindow(dpy),				   item->cols_out, item->rows_out, 1);		/* depth one gc */	depth_one_gc=XCreateGC(dpy, item->bitmap, NULL, 0);	XSetBackground(dpy, depth_one_gc, 0);	XSetForeground(dpy, depth_one_gc, 1);	/* make the text bitmap from XImage */	XPutImage(dpy, item->bitmap, depth_one_gc, item->ximage, 0, 0, 0, 0,		  item->cols_out, item->rows_out);	XFreeGC(dpy, depth_one_gc);    }#endif /*CACHE_XIMAGES*/        return item;}/* ---------------------------------------------------------------------- *//**************************************************************************//*  Create a rotated text item                                            *//**************************************************************************/static RotatedTextItem *XRotCreateTextItem(dpy, font, angle, text, align)    Display *dpy;    XFontStruct *font;    float angle;    char *text;    int align;{    RotatedTextItem *item=NULL;    Pixmap canvas;    GC font_gc;    XImage *I_in;    register int i, j;    char *str1, *str2, *str3;    char *str2_a="\0", *str2_b="\n\0";    int height;    int byte_w_in, byte_w_out;    int xp, yp;    float sin_angle, cos_angle;    int it, jt;    float di, dj;    int ic=0;    float xl, xr, xinc;    int byte_out;    int dir, asc, desc;    XCharStruct overall;    int old_cols_in=0, old_rows_in=0;        /* allocate memory */    item=(RotatedTextItem *)malloc((unsigned)sizeof(RotatedTextItem));    if(!item)	return NULL;	    /* count number of sections in string */    item->nl=1;    if(align!=NONE)	for(i=0; i<strlen(text)-1; i++)	    if(text[i]=='\n')		item->nl++;        /* ignore newline characters if not doing alignment */    if(align==NONE)	str2=str2_a;    else	str2=str2_b;        /* find width of longest section */    str1=my_strdup(text);    if(str1==NULL)	return NULL;        str3=my_strtok(str1, str2);    XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc,		 &overall);        item->max_width=overall.rbearing;        /* loop through each section */    do {	str3=my_strtok((char *)NULL, str2);	if(str3!=NULL) {	    XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc,			 &overall);	    if(overall.rbearing>item->max_width)		item->max_width=overall.rbearing;	}    }    while(str3!=NULL);        free(str1);        /* overall font height */    height=font->ascent+font->descent;        /* dimensions horizontal text will have */    item->cols_in=item->max_width;    item->rows_in=item->nl*height;        /* bitmap for drawing on */    canvas=XCreatePixmap(dpy, DefaultRootWindow(dpy),			 item->cols_in, item->rows_in, 1);        /* create a GC for the bitmap */    font_gc=XCreateGC(dpy, canvas, NULL, 0);    XSetBackground(dpy, font_gc, 0);    XSetFont(dpy, font_gc, font->fid);        /* make sure the bitmap is blank */    XSetForeground(dpy, font_gc, 0);    XFillRectangle(dpy, canvas, font_gc, 0, 0, 		   item->cols_in+1, item->rows_in+1);    XSetForeground(dpy, font_gc, 1);        /* pre-calculate sin and cos */    sin_angle=sin(angle);    cos_angle=cos(angle);        /* text background will be drawn using XFillPolygon */    item->corners_x=	(float *)malloc((unsigned)(4*item->nl*sizeof(float)));    if(!item->corners_x)	return NULL;        item->corners_y=	(float *)malloc((unsigned)(4*item->nl*sizeof(float)));    if(!item->corners_y)	return NULL;        /* draw text horizontally */        /* start at top of bitmap */    yp=font->ascent;        str1=my_strdup(text);    if(str1==NULL)	return NULL;        str3=my_strtok(str1, str2);        /* loop through each section in the string */    do {	XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc,		&overall);	/* where to draw section in x ? */	if(align==TLEFT || align==MLEFT || align==BLEFT || align==NONE)	    xp=0;	else if(align==TCENTRE || align==MCENTRE || align==BCENTRE)	    xp=(item->max_width-overall.rbearing)/2;	else            xp=item->max_width-overall.rbearing;	/* draw string onto bitmap */	XDrawString(dpy, canvas, font_gc, xp, yp, str3, strlen(str3));		/* keep a note of corner positions of this string */	item->corners_x[ic]=((float)xp-(float)item->cols_in/2)*style.magnify;	item->corners_y[ic]=((float)(yp-font->ascent)-(float)item->rows_in/2)	    *style.magnify;	item->corners_x[ic+1]=item->corners_x[ic];	item->corners_y[ic+1]=item->corners_y[ic]+(float)height*style.magnify;	item->corners_x[item->nl*4-1-ic]=item->corners_x[ic]+	    (float)overall.rbearing*style.magnify;	item->corners_y[item->nl*4-1-ic]=item->corners_y[ic];	item->corners_x[item->nl*4-2-ic]=	    item->corners_x[item->nl*4-1-ic];	item->corners_y[item->nl*4-2-ic]=item->corners_y[ic+1];		ic+=2;		/* move to next line */	yp+=height;		str3=my_strtok((char *)NULL, str2);    }    while(str3!=NULL);    

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆视频观看网址久久| 26uuuu精品一区二区| 国产乱人伦偷精品视频不卡| 午夜视频一区二区| 亚洲男女一区二区三区| 最新久久zyz资源站| 国产精品国模大尺度视频| 亚洲欧洲日本在线| 国产精品白丝在线| 亚洲日穴在线视频| 亚洲大片在线观看| 日韩精品色哟哟| 久久精品国产网站| 国产精品99精品久久免费| 国产成人精品免费| 91美女在线看| 欧美人与禽zozo性伦| 欧美另类z0zxhd电影| 欧美一区二区久久久| 欧美一级久久久| 久久久99久久| 亚洲欧美电影一区二区| 亚洲成人免费电影| 韩国精品久久久| 99综合影院在线| 欧美日韩日日夜夜| 26uuu亚洲综合色| |精品福利一区二区三区| 日韩精品亚洲一区二区三区免费| 蜜臀久久99精品久久久久宅男| 国产乱码精品一区二区三区忘忧草 | 亚洲人成网站影音先锋播放| 亚洲综合在线电影| 免费观看91视频大全| 成人午夜碰碰视频| 欧美欧美午夜aⅴ在线观看| 精品久久99ma| 亚洲精品久久久久久国产精华液| 丝袜a∨在线一区二区三区不卡| 久久国产视频网| 在线精品视频一区二区| 精品粉嫩aⅴ一区二区三区四区| 国产精品福利一区| 久久99精品国产麻豆婷婷洗澡| 国产乱国产乱300精品| 欧美在线看片a免费观看| 久久久青草青青国产亚洲免观| 亚洲精品视频在线看| 日韩经典中文字幕一区| 国产91精品精华液一区二区三区| 91九色02白丝porn| 久久午夜免费电影| 天堂成人免费av电影一区| 不卡欧美aaaaa| 日韩精品中文字幕在线一区| 亚洲精品国产a| 国产成人午夜精品影院观看视频 | 天天影视涩香欲综合网| 成人午夜视频在线| 精品国产免费一区二区三区四区| 一区二区三区四区精品在线视频| 国产一区二区免费在线| 欧美日本不卡视频| 精品在线亚洲视频| 欧美美女一区二区三区| 一区二区激情小说| 99久久99久久免费精品蜜臀| 欧美成人激情免费网| 亚洲一区在线观看免费| 丁香婷婷综合激情五月色| 久久久久久一级片| 久久99精品国产麻豆婷婷洗澡| 91精品啪在线观看国产60岁| 伊人夜夜躁av伊人久久| 91丨国产丨九色丨pron| 国产精品免费aⅴ片在线观看| 国产一区二区在线观看视频| 欧美大度的电影原声| 日韩成人一区二区三区在线观看| 欧美三级日韩在线| 亚洲一区二区高清| 欧美三级视频在线观看| 天天爽夜夜爽夜夜爽精品视频 | 亚洲一区免费在线观看| 色综合久久久久网| 亚洲精品成人天堂一二三| 不卡的看片网站| 亚洲婷婷国产精品电影人久久| 成人免费视频一区| 亚洲三级免费电影| 色欧美片视频在线观看| 一区二区国产视频| 欧美日韩美少妇| 轻轻草成人在线| 2023国产精品视频| 成人18视频在线播放| 亚洲欧美日韩国产一区二区三区| 91网上在线视频| 视频一区视频二区中文| 日韩午夜电影在线观看| 国产美女久久久久| 亚洲欧洲中文日韩久久av乱码| 日本丰满少妇一区二区三区| 天天av天天翘天天综合网 | 亚洲综合免费观看高清完整版在线| 色94色欧美sute亚洲线路一ni| 亚洲成a人v欧美综合天堂| 8x福利精品第一导航| 国产乱码精品一区二区三区av | av激情综合网| 亚洲a一区二区| 久久这里只有精品首页| 99久久久精品免费观看国产蜜| 一区二区久久久久久| 精品不卡在线视频| 99国产精品久久久久久久久久久| 亚洲第一综合色| 国产日产精品1区| 欧美日韩电影在线| 成人免费高清在线观看| 日韩电影一区二区三区四区| 国产午夜精品福利| 国产无遮挡一区二区三区毛片日本| 色成人在线视频| 国产91对白在线观看九色| 午夜视频一区二区| **欧美大码日韩| 久久亚洲综合色一区二区三区| 91麻豆国产福利精品| 韩国精品一区二区| 五月天欧美精品| 亚洲欧美另类久久久精品| 久久久久久一二三区| 欧美日韩国产经典色站一区二区三区| 国产麻豆午夜三级精品| 亚洲va韩国va欧美va精品| 亚洲欧洲成人自拍| 久久蜜桃av一区二区天堂| 777精品伊人久久久久大香线蕉| 成人毛片视频在线观看| 国产美女精品在线| 精品在线一区二区| 日本成人中文字幕在线视频| 亚洲主播在线播放| 亚洲视频你懂的| 国产精品水嫩水嫩| 欧美经典一区二区三区| 精品国产乱码久久久久久图片| 欧美猛男gaygay网站| 欧美视频完全免费看| 色偷偷久久人人79超碰人人澡| 福利一区二区在线观看| 国产成人免费视频一区| 国产高清亚洲一区| 国产精品亚洲一区二区三区在线| 免费久久精品视频| 美腿丝袜亚洲综合| 免费观看一级欧美片| 久久国产精品露脸对白| 麻豆久久一区二区| 老色鬼精品视频在线观看播放| 免费观看久久久4p| 久草精品在线观看| 国产精品一二三| 大胆欧美人体老妇| 99r精品视频| 欧美亚洲国产bt| 在线不卡中文字幕| 日韩欧美国产一区在线观看| 欧美电影免费观看高清完整版在 | 日韩精品一区二区三区老鸭窝| 日韩三级中文字幕| 久久久久久久久蜜桃| 国产精品久久久久久久久免费桃花| 国产精品毛片a∨一区二区三区| 亚洲视频狠狠干| 舔着乳尖日韩一区| 国产精品系列在线观看| 91在线观看美女| 欧美日韩亚州综合| 欧美精品一区二区三区很污很色的 | 国产福利电影一区二区三区| 国产成人激情av| 在线视频亚洲一区| 91精品国产乱| 国产精品网站一区| 夜夜嗨av一区二区三区四季av| 日产欧产美韩系列久久99| 国产自产视频一区二区三区| 成人va在线观看| 欧美精品vⅰdeose4hd| 久久精品一区四区| 一区二区三区美女视频| 久久99这里只有精品| 91麻豆国产福利在线观看| 欧美丰满美乳xxx高潮www| 国产精品嫩草影院av蜜臀| 亚洲丰满少妇videoshd| 国产91精品入口| 日韩欧美自拍偷拍|