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

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

?? gdk-pixbuf-xlib-drawable.c

?? linux下電話本所依賴的一些圖形庫
?? C
?? 第 1 頁 / 共 3 頁
字號:
		orow += rowstride;	}}static voidrgb888amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap){	int xx, yy;	int width, height;	int bpl;	guint8 *srow = image->data, *orow = pixels;#ifdef LITTLE	guint32 *o;	guint32 *s;#else	guint8 *s;	/* for byte order swapping */	guint8 *o;#endif	d (printf ("32 bit, msb, with alpha\n"));	width = image->width;	height = image->height;	bpl = image->bytes_per_line;	/* msb data */	for (yy = 0; yy < height; yy++) {#ifdef LITTLE		s = (guint32 *) srow;		o = (guint32 *) orow;#else		s = srow;		o = orow;#endif		for (xx = 0; xx < width; xx++) {#ifdef LITTLE			*o++ = s[1];			*o++ = s[2];			*o++ = s[3];			*o++ = 0xff;			s += 4;#else			*o++ = (*s << 8) | 0xff; /* untested */			s++;#endif		}		srow += bpl;		orow += rowstride;	}}static voidrgb888msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap){	int xx, yy;	int width, height;	int bpl;	guint8 *srow = image->data, *orow = pixels;	guint8 *s;	guint8 *o;	d (printf ("32 bit, msb, no alpha\n"));	width = image->width;	height = image->height;	bpl = image->bytes_per_line;	for (yy = 0; yy < height; yy++) {		s = srow;		o = orow;		for (xx = 0; xx < width; xx++) {			*o++ = s[1];			*o++ = s[2];			*o++ = s[3];			s += 4;		}		srow += bpl;		orow += rowstride;	}}/*  This should work correctly with any display/any endianness, but will probably  run quite slow*/static voidconvert_real_slow (XImage *image, guchar *pixels, int rowstride, xlib_colormap *cmap, int alpha){	int xx, yy;	int width, height;	int bpl;	guint8 *srow = image->data, *orow = pixels;	guint8 *s;	guint8 *o;	guint32 pixel;	Visual *v;	guint8 component;	int i;	int red_shift, red_prec, green_shift, green_prec, blue_shift, blue_prec;	width = image->width;	height = image->height;	bpl = image->bytes_per_line;	v = cmap->visual;	visual_decompose_mask (v->red_mask, &red_shift, &red_prec);	visual_decompose_mask (v->green_mask, &green_shift, &green_prec);	visual_decompose_mask (v->blue_mask, &blue_shift, &blue_prec);	d(printf("rgb  mask/shift/prec = %x:%x:%x %d:%d:%d  %d:%d:%d\n",		 v->red_mask, v->green_mask, v->blue_mask,		 red_shift, green_shift, blue_shift,		 red_prec, green_prec, blue_prec));	for (yy = 0; yy < height; yy++) {		s = srow;		o = orow;		for (xx = 0; xx < width; xx++) {			pixel = XGetPixel (image, xx, yy);			switch (v->class) {				/* I assume this is right for static & greyscale's too? */			case StaticGray:			case GrayScale:			case StaticColor:			case PseudoColor:				*o++ = cmap->colors[pixel].red;				*o++ = cmap->colors[pixel].green;				*o++ = cmap->colors[pixel].blue;				break;			case TrueColor:				/* This is odd because it must sometimes shift left (otherwise				   I'd just shift >> (*_shift - 8 + *_prec + <0-7>). This logic				   should work for all bit sizes/shifts/etc. */				component = 0;				for (i = 24; i < 32; i += red_prec)					component |= ((pixel & v->red_mask) << (32 - red_shift - red_prec)) >> i;				*o++ = component;				component = 0;				for (i = 24; i < 32; i += green_prec)					component |= ((pixel & v->green_mask) << (32 - green_shift - green_prec)) >> i;				*o++ = component;				component = 0;				for (i = 24; i < 32; i += blue_prec)					component |= ((pixel & v->blue_mask) << (32 - blue_shift - blue_prec)) >> i;				*o++ = component;				break;			case DirectColor:				*o++ = cmap->colors[((pixel & v->red_mask) << (32 - red_shift - red_prec)) >> 24].red;				*o++ = cmap->colors[((pixel & v->green_mask) << (32 - green_shift - green_prec)) >> 24].green;				*o++ = cmap->colors[((pixel & v->blue_mask) << (32 - blue_shift - blue_prec)) >> 24].blue;				break;			}			if (alpha)				*o++ = 0xff;		}		srow += bpl;		orow += rowstride;	}}typedef void (* cfunc) (XImage *image, guchar *pixels, int rowstride, xlib_colormap *cmap);static cfunc convert_map[] = {	rgb1,rgb1,rgb1a,rgb1a,	rgb8,rgb8,rgb8a,rgb8a,	rgb555lsb,rgb555msb,rgb555alsb,rgb555amsb,	rgb565lsb,rgb565msb,rgb565alsb,rgb565amsb,	rgb888lsb,rgb888msb,rgb888alsb,rgb888amsb};/*  perform actual conversion  If we can, try and use the optimised code versions, but as a default  fallback, and always for direct colour, use the generic/slow but complete  conversion function.*/static voidrgbconvert (XImage *image, guchar *pixels, int rowstride, int alpha, xlib_colormap *cmap){	int index = (image->byte_order == MSBFirst) | (alpha != 0) << 1;	int bank=5;		/* default fallback converter */	Visual *v = cmap->visual;	d(printf("masks = %x:%x:%x\n", v->red_mask, v->green_mask, v->blue_mask));	d(printf("image depth = %d, bpp = %d\n", image->depth, image->bits_per_pixel));	switch (v->class) {				/* I assume this is right for static & greyscale's too? */	case StaticGray:	case GrayScale:	case StaticColor:	case PseudoColor:		switch (image->bits_per_pixel) {		case 1:			bank = 0;			break;		case 8:			bank = 1;			break;		}		break;	case TrueColor:		switch (image->depth) {		case 15:			if (v->red_mask == 0x7c00 && v->green_mask == 0x3e0 && v->blue_mask == 0x1f			    && image->bits_per_pixel == 16)				bank = 2;			break;		case 16:			if (v->red_mask == 0xf800 && v->green_mask == 0x7e0 && v->blue_mask == 0x1f			    && image->bits_per_pixel == 16)				bank = 3;			break;		case 24:		case 32:			if (v->red_mask == 0xff0000 && v->green_mask == 0xff00 && v->blue_mask == 0xff			    && image->bits_per_pixel == 32)				bank = 4;			break;		}		break;	case DirectColor:		/* always use the slow version */		break;	}	d(printf("converting using conversion function in bank %d\n", bank));	if (bank==5) {		convert_real_slow(image, pixels, rowstride, cmap, alpha);	} else {		index |= bank << 2;		(* convert_map[index]) (image, pixels, rowstride, cmap);	}}static gbooleanxlib_window_is_viewable (Window w){	XWindowAttributes wa;	while (w != 0) {		Window parent, root, *children;		int nchildren;		XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa);		if (wa.map_state != IsViewable)			return FALSE;		if (!XQueryTree (gdk_pixbuf_dpy, w, &root,				 &parent, &children, &nchildren))			return FALSE;		if (nchildren > 0)			XFree (children);		if ((parent == root) || (w == root))			return TRUE;		w = parent;	}	return FALSE;}static gintxlib_window_get_origin (Window w, gint *x, gint *y){	Window child;	return XTranslateCoordinates (gdk_pixbuf_dpy, w,				      RootWindow (gdk_pixbuf_dpy,						  gdk_pixbuf_screen),				      0, 0, x, y, &child);}/* Exported functions *//** * gdk_pixbuf_xlib_get_from_drawable: * @dest: Destination pixbuf, or NULL if a new pixbuf should be created. * @src: Source drawable. * @cmap: A colormap if @src is a pixmap.  If it is a window, this argument will * be ignored. * @visual: A visual if @src is a pixmap.  If it is a window, this argument will * be ignored. * @src_x: Source X coordinate within drawable. * @src_y: Source Y coordinate within drawable. * @dest_x: Destination X coordinate in pixbuf, or 0 if @dest is NULL. * @dest_y: Destination Y coordinate in pixbuf, or 0 if @dest is NULL. * @width: Width in pixels of region to get. * @height: Height in pixels of region to get. * * Transfers image data from a Gdk drawable and converts it to an RGB(A) * representation inside a GdkPixbuf. * * If the drawable @src is a pixmap, then a suitable colormap must be specified, * since pixmaps are just blocks of pixel data without an associated colormap. * If the drawable is a window, the @cmap argument will be ignored and the * window's own colormap will be used instead. * * If the specified destination pixbuf @dest is #NULL, then this function will * create an RGB pixbuf with 8 bits per channel and no alpha, with the same size * specified by the @width and @height arguments.  In this case, the @dest_x and * @dest_y arguments must be specified as 0, otherwise the function will return * #NULL.  If the specified destination pixbuf is not NULL and it contains alpha * information, then the filled pixels will be set to full opacity. * * If the specified drawable is a pixmap, then the requested source rectangle * must be completely contained within the pixmap, otherwise the function will * return #NULL. * * If the specified drawable is a window, then it must be viewable, i.e. all of * its ancestors up to the root window must be mapped.  Also, the specified * source rectangle must be completely contained within the window and within * the screen.  If regions of the window are obscured by noninferior windows, the * contents of those regions are undefined.  The contents of regions obscured by * inferior windows of a different depth than that of the source window will also * be undefined. * * Return value: The same pixbuf as @dest if it was non-NULL, or a newly-created * pixbuf with a reference count of 1 if no destination pixbuf was specified; in * the latter case, NULL will be returned if not enough memory could be * allocated for the pixbuf to be created. **/GdkPixbuf *gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,				   Drawable src,				   Colormap cmap, Visual *visual,				   int src_x, int src_y,				   int dest_x, int dest_y,				   int width, int height){	int src_width, src_height;	XImage *image;	int rowstride, bpp, alpha;	XWindowAttributes wa;	xlib_colormap *x_cmap;	gboolean is_pixmap;	/* General sanity checks */	g_return_val_if_fail (src != 0, NULL);	is_pixmap = drawable_is_pixmap (src);	if (is_pixmap) {		g_return_val_if_fail (cmap != 0, NULL);		g_return_val_if_fail (visual != NULL, NULL);	}	else		g_return_val_if_fail (xlib_window_is_viewable (src), NULL);	if (!dest)		g_return_val_if_fail (dest_x == 0 && dest_y == 0, NULL);	else {		g_return_val_if_fail (dest->colorspace == GDK_COLORSPACE_RGB, NULL);		g_return_val_if_fail (dest->n_channels == 3				      || dest->n_channels == 4, NULL);		g_return_val_if_fail (dest->bits_per_sample == 8, NULL);	}	/* Coordinate sanity checks */	if (!is_pixmap) {	    XGetWindowAttributes (gdk_pixbuf_dpy, src, &wa);	    src_width = wa.width;	    src_height = wa.height;	} else {	    Window root;	    int tx, ty, bwidth, depth;	    XGetGeometry (gdk_pixbuf_dpy, src, &root, &tx, &ty,			  &src_width, &src_height, &bwidth, &depth);	}	g_return_val_if_fail (src_x >= 0 && src_y >= 0, NULL);	g_return_val_if_fail (src_x + width <= src_width			      && src_y + height <= src_height, NULL);	if (dest) {		g_return_val_if_fail (dest_x >= 0 && dest_y >= 0, NULL);		g_return_val_if_fail (dest_x + width <= dest->width, NULL);		g_return_val_if_fail (dest_y + height <= dest->height, NULL);	}	if (!is_pixmap) {		int ret;		int src_xorigin, src_yorigin;		int screen_width, screen_height;		int screen_srcx, screen_srcy;		ret = xlib_window_get_origin (src, &src_xorigin, &src_yorigin);		g_return_val_if_fail (ret != FALSE, NULL);		screen_width = DisplayWidth (gdk_pixbuf_dpy, gdk_pixbuf_screen);		screen_height = DisplayHeight (gdk_pixbuf_dpy, gdk_pixbuf_screen);		screen_srcx = src_xorigin + src_x;		screen_srcy = src_yorigin + src_y;		g_return_val_if_fail (screen_srcx >= 0 && screen_srcy >= 0, NULL);		g_return_val_if_fail (screen_srcx + width <= screen_width, NULL);		g_return_val_if_fail (screen_srcy + height <= screen_height, NULL);	}	/* Get Image in ZPixmap format (packed bits). */	image = XGetImage (gdk_pixbuf_dpy, src, src_x, src_y,			   width, height, AllPlanes, ZPixmap);	g_return_val_if_fail (image != NULL, NULL);	/* Create the pixbuf if needed */	if (!dest) {		dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB,				       FALSE, 8, width, height);		if (!dest) {			XDestroyImage (image);			return NULL;		}	}	/* Get the colormap if needed */	if (!is_pixmap)	{		cmap = wa.colormap;		visual = wa.visual;	}	x_cmap = xlib_get_colormap (cmap, visual);	alpha = dest->has_alpha;	rowstride = dest->rowstride;	bpp = alpha ? 4 : 3;	/* we offset into the image data based on the position we are retrieving from */	rgbconvert (image, dest->pixels +		    (dest_y * rowstride) + (dest_x * bpp),		    rowstride,		    alpha,		    x_cmap);	xlib_colormap_free (x_cmap);	XDestroyImage (image);	return dest;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩高清一区在线| 色婷婷国产精品| 在线亚洲+欧美+日本专区| 欧美电影免费观看高清完整版在 | 国产成人精品www牛牛影视| 欧美日韩国产一二三| 国产精品国产馆在线真实露脸 | 亚洲美女屁股眼交| 久草中文综合在线| 欧美日韩大陆在线| 亚洲精品日韩专区silk| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 韩国av一区二区三区在线观看| 欧美在线观看一二区| 国产精品欧美久久久久一区二区| 美女视频黄 久久| 91官网在线观看| 亚洲色图欧美激情| 99精品欧美一区二区三区小说| 久久久亚洲午夜电影| 黄色成人免费在线| 中文字幕一区二区在线播放| 国产尤物一区二区| 精品国内二区三区| 蜜桃视频在线一区| 欧美一区二区播放| 日本不卡高清视频| 3d动漫精品啪啪1区2区免费| 午夜精品久久久久久久99樱桃| 97久久人人超碰| 一区在线观看视频| 99国产精品99久久久久久| 中文字幕av免费专区久久| 岛国一区二区在线观看| 亚洲国产高清aⅴ视频| av电影在线观看不卡 | 久久综合久久99| 国产美女一区二区三区| 精品久久久三级丝袜| 狠狠狠色丁香婷婷综合久久五月| 日韩欧美高清一区| 国产精品18久久久久久vr| 国产精品全国免费观看高清| 99国产精品久| 亚洲一级二级三级在线免费观看| 欧美性猛交xxxxxxxx| 婷婷成人激情在线网| 精品电影一区二区| 成人av在线一区二区| 亚洲一线二线三线视频| 7777女厕盗摄久久久| 国产盗摄一区二区| 亚洲一区二区三区在线看 | 欧美日韩一区二区三区不卡| 日韩 欧美一区二区三区| 久久久99精品免费观看不卡| 成人黄色在线网站| 视频一区在线视频| 欧美国产日韩一二三区| 色婷婷av一区二区三区软件| 日韩成人午夜精品| 国产精品天美传媒| 欧美日韩综合不卡| 高清在线成人网| 亚洲一区二区免费视频| 久久青草国产手机看片福利盒子| 99精品视频一区| 精品一区二区三区视频在线观看 | 99热精品一区二区| 蜜桃在线一区二区三区| 亚洲欧美在线视频观看| 日韩欧美黄色影院| 色欧美日韩亚洲| 国产成人综合亚洲91猫咪| 亚洲一二三四在线| 国产女主播一区| 欧美一二三四在线| 欧美乱妇15p| av一区二区久久| 国产精品自拍一区| 日本不卡一区二区三区高清视频| 国产精品护士白丝一区av| 91精品久久久久久久久99蜜臂| 99久久精品费精品国产一区二区| 久久成人免费网站| 天堂午夜影视日韩欧美一区二区| 国产精品麻豆99久久久久久| 精品国产乱码久久久久久1区2区 | 精品成人私密视频| 欧美一区二区三区免费在线看| 91小宝寻花一区二区三区| 国产精品一区二区在线观看网站 | 欧美www视频| 欧美久久久久久久久| 色综合激情五月| 99国产麻豆精品| 成人性色生活片| 国产精一区二区三区| 九色porny丨国产精品| 日本人妖一区二区| 日韩精品国产精品| 污片在线观看一区二区| 午夜精品久久久久久久蜜桃app| 亚洲黄色录像片| 亚洲少妇中出一区| 亚洲美女视频在线| 亚洲免费观看高清在线观看| 亚洲特级片在线| 亚洲美女视频在线| 亚洲午夜在线电影| 亚洲国产精品人人做人人爽| 亚洲一区二区精品3399| 亚洲成人综合在线| 日韩国产高清影视| 日韩成人伦理电影在线观看| 另类调教123区| 国产资源在线一区| 成人一级视频在线观看| 99久久久免费精品国产一区二区| 成人免费视频免费观看| av激情成人网| 欧美一a一片一级一片| 欧美精品 日韩| 精品久久久网站| 欧美国产日韩亚洲一区| 自拍偷拍国产亚洲| 婷婷六月综合网| 久久99精品久久久久久国产越南 | 欧美经典三级视频一区二区三区| 中文字幕精品在线不卡| 亚洲视频免费在线观看| 国产精品 欧美精品| 国产精品12区| 色妹子一区二区| 91精品国产综合久久久久久久 | 一区二区三区欧美视频| 午夜精品在线看| 国产麻豆精品在线| 色综合久久综合| 91精品国产乱| 中文字幕一区二区日韩精品绯色| 一区二区三区久久| 伦理电影国产精品| bt7086福利一区国产| 欧美亚洲综合色| 国产午夜精品久久久久久久| 亚洲人午夜精品天堂一二香蕉| 亚洲一区二区四区蜜桃| 国产一区二区三区蝌蚪| 色噜噜夜夜夜综合网| 精品国产人成亚洲区| 亚洲女厕所小便bbb| 麻豆极品一区二区三区| 色诱亚洲精品久久久久久| 精品三级在线看| 亚洲一区二区三区视频在线| 国产精品一区二区久久精品爱涩| 欧洲亚洲国产日韩| 中文字幕不卡一区| 乱一区二区av| 欧美伊人久久久久久久久影院| 国产三级三级三级精品8ⅰ区| 亚洲一区自拍偷拍| 成人午夜视频在线观看| 日韩一区二区在线观看视频播放| 亚洲欧洲99久久| 黄色精品一二区| 这里只有精品视频在线观看| 亚洲欧洲精品一区二区三区不卡| 蜜桃av一区二区在线观看| 欧美视频在线一区| 亚洲欧洲日韩女同| 国产精品1区二区.| 日韩欧美中文字幕公布| 亚洲午夜精品17c| 99国产精品久久| 中文字幕av在线一区二区三区| 久久精品久久精品| 欧美一区二区啪啪| 亚洲成av人片在www色猫咪| 色综合久久综合网97色综合| 亚洲国产成人在线| 国产精品白丝jk黑袜喷水| 精品久久人人做人人爰| 日本中文字幕不卡| 欧美一二三在线| 免费看日韩精品| 欧美一二三四区在线| 三级不卡在线观看| 欧美日韩中文字幕精品| 亚洲制服丝袜av| 在线观看av一区二区| 尤物视频一区二区| 欧洲一区二区三区在线| 一区二区日韩av| 欧美在线视频不卡| 无码av免费一区二区三区试看| 欧美自拍丝袜亚洲| 国产成人午夜精品影院观看视频| 久久一夜天堂av一区二区三区|