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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? gdk-pixbuf-xlib-drawable.c

?? linux下電話本所依賴的一些圖形庫
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- *//* GdkPixbuf library - convert X drawable information to RGB * * Copyright (C) 1999 Michael Zucchi * * Authors: Michael Zucchi <zucchi@zedzone.mmc.com.au> *          Cody Russell <bratsche@dfw.net> * 	    Federico Mena-Quintero <federico@gimp.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. *//* Ported to Xlib by John Harper <john@dcs.warwick.ac.uk> */#include <config.h>#include <stdio.h>#include <string.h>#include <gdk-pixbuf/gdk-pixbuf-private.h>#include "gdk-pixbuf-xlib-private.h"#include <X11/Xlib.h>#include <X11/Xutil.h>#if (G_BYTE_ORDER == G_LITTLE_ENDIAN)#define LITTLE#endif#define d(x)static guint32 mask_table[] = {	0x00000000, 0x00000001, 0x00000003, 0x00000007,	0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f,	0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff,	0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff,	0x0000ffff, 0x0001ffff, 0x0003ffff, 0x0007ffff,	0x000fffff, 0x001fffff, 0x003fffff, 0x007fffff,	0x00ffffff, 0x01ffffff, 0x03ffffff, 0x07ffffff,	0x0fffffff, 0x1fffffff, 0x3fffffff, 0x7fffffff,	0xffffffff};/* color handling */typedef struct xlib_colormap_struct xlib_colormap;struct xlib_colormap_struct {	int size;	XColor *colors;	Visual *visual;	Colormap colormap;};static xlib_colormap *xlib_get_colormap (Colormap id, Visual *visual){	int i;	xlib_colormap *xc = g_new (xlib_colormap, 1);	xc->size = visual->map_entries;	xc->colors = g_new (XColor, xc->size);	xc->visual = visual;	xc->colormap = id;	for (i = 0; i < xc->size; i++) {		xc->colors[i].pixel = i;		xc->colors[i].flags = DoRed | DoGreen | DoBlue;	}	XQueryColors (gdk_pixbuf_dpy, xc->colormap, xc->colors, xc->size);	return xc;}static voidxlib_colormap_free (xlib_colormap *xc){	g_free (xc->colors);	g_free (xc);}/* from gdkvisual.c */static voidvisual_decompose_mask (gulong  mask,		       gint   *shift,		       gint   *prec){	*shift = 0;	*prec = 0;	while (!(mask & 0x1)) {		(*shift)++;		mask >>= 1;	}	while (mask & 0x1) {		(*prec)++;		mask >>= 1;	}}static gboolean x_error;static inthandle_x_error (Display *dpy, XErrorEvent *ev){	x_error = TRUE;	return 0;}static gbooleandrawable_is_pixmap (Drawable d){	/* copied from Imlib */	XErrorHandler errh;	XWindowAttributes wa;	gboolean is_pixmap;	errh = XSetErrorHandler (handle_x_error);	x_error = FALSE;	XGetWindowAttributes (gdk_pixbuf_dpy, d, &wa);	XSync (gdk_pixbuf_dpy, False);	is_pixmap = x_error;	XSetErrorHandler (errh);	return is_pixmap;}/*  convert 1 bits-pixel data  no alpha*/static voidrgb1 (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap){	int xx, yy;	int width, height;	int bpl;	guint8 *s;	register guint8 data;	guint8 *o;	guint8 *srow = image->data, *orow = pixels;	d (printf ("1 bits/pixel\n"));	/* convert upto 8 pixels/time */	/* its probably not worth trying to make this run very fast, who uses	   1 bit displays anymore? */	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 ++) {			data = srow[xx >> 3] >> (7 - (xx & 7)) & 1;			*o++ = colormap->colors[data].red;			*o++ = colormap->colors[data].green;			*o++ = colormap->colors[data].blue;		}		srow += bpl;		orow += rowstride;	}}/*  convert 1 bits/pixel data  with alpha*/static voidrgb1a (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap){	int xx, yy;	int width, height;	int bpl;	guint8 *s;	register guint8 data;	guint8 *o;	guint8 *srow = image->data, *orow = pixels;	guint32 remap[2];	d (printf ("1 bits/pixel\n"));	/* convert upto 8 pixels/time */	/* its probably not worth trying to make this run very fast, who uses	   1 bit displays anymore? */	width = image->width;	height = image->height;	bpl = image->bytes_per_line;	for (xx = 0; xx < 2; xx++) {#ifdef LITTLE		remap[xx] = 0xff000000			| colormap->colors[xx].blue << 16			| colormap->colors[xx].green << 8			| colormap->colors[xx].red;#else		remap[xx] = 0xff			| colormap->colors[xx].red << 24			| colormap->colors[xx].green << 16			| colormap->colors[xx].blue << 8;#endif	}	for (yy = 0; yy < height; yy++) {		s = srow;		o = orow;		for (xx = 0; xx < width; xx ++) {			data = srow[xx >> 3] >> (7 - (xx & 7)) & 1;			*o++ = remap[data];		}		srow += bpl;		orow += rowstride;	}}/*  convert 8 bits/pixel data  no alpha*/static voidrgb8 (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap){	int xx, yy;	int width, height;	int bpl;	guint32 mask;	register guint32 data;	guint8 *srow = image->data, *orow = pixels;	register guint8 *s;	register guint8 *o;	width = image->width;	height = image->height;	bpl = image->bytes_per_line;	d (printf ("8 bit, no alpha output\n"));	mask = mask_table[image->depth];	for (yy = 0; yy < height; yy++) {		s = srow;		o = orow;		for (xx = 0; xx < width; xx++) {			data = *s++ & mask;			*o++ = colormap->colors[data].red;			*o++ = colormap->colors[data].green;			*o++ = colormap->colors[data].blue;		}		srow += bpl;		orow += rowstride;	}}/*  convert 8 bits/pixel data  with alpha*/static voidrgb8a (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap){	int xx, yy;	int width, height;	int bpl;	guint32 mask;	register guint32 data;	guint32 remap[256];	register guint8 *s;	/* read 2 pixels at once */	register guint32 *o;	guint8 *srow = image->data, *orow = pixels;	width = image->width;	height = image->height;	bpl = image->bytes_per_line;	d (printf ("8 bit, with alpha output\n"));	mask = mask_table[image->depth];	for (xx = 0; xx < colormap->size; xx++) {#ifdef LITTLE		remap[xx] = 0xff000000			| colormap->colors[xx].blue << 16			| colormap->colors[xx].green << 8			| colormap->colors[xx].red;#else		remap[xx] = 0xff			| colormap->colors[xx].red << 24			| colormap->colors[xx].green << 16			| colormap->colors[xx].blue << 8;#endif	}	for (yy = 0; yy < height; yy++) {		s = srow;		o = (guint32 *) orow;		for (xx = 0; xx < width; xx ++) {			data = *s++ & mask;			*o++ = remap[data];		}		srow += bpl;		orow += rowstride;	}}/*  convert 16 bits/pixel data  no alpha  data in lsb format*/static voidrgb565lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap){	int xx, yy;	int width, height;	int bpl;#ifdef LITTLE	register guint32 *s;	/* read 2 pixels at once */#else	register guint8 *s;	/* read 2 pixels at once */#endif	register guint16 *o;	guint8 *srow = image->data, *orow = pixels;	width = image->width;	height = image->height;	bpl = image->bytes_per_line;	for (yy = 0; yy < height; yy++) {#ifdef LITTLE		s = (guint32 *) srow;#else		s = srow;#endif		o = (guint16 *) orow;		for (xx = 1; xx < width; xx += 2) {			register guint32 data;#ifdef LITTLE			data = *s++;			*o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13				| (data & 0x7e0) << 5 | (data & 0x600) >> 1;			*o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2				| (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21;			*o++ = (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25				| (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;#else			/* swap endianness first */			data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24;			s += 4;			*o++ = (data & 0xf800) | (data & 0xe000) >> 5				| (data & 0x7e0) >> 3 | (data & 0x600) >> 9;			*o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6				| (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29;			*o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17				| (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;#endif		}		/* check for last remaining pixel */		if (width & 1) {			register guint16 data;#ifdef LITTLE			data = *((short *) s);#else			data = *((short *) s);			data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);#endif			((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7);			((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3);			((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7);		}		srow += bpl;		orow += rowstride;	}}/*  convert 16 bits/pixel data  no alpha  data in msb format*/static voidrgb565msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap){	int xx, yy;	int width, height;	int bpl;#ifdef LITTLE	register guint8 *s;	/* need to swap data order */#else	register guint32 *s;	/* read 2 pixels at once */#endif	register guint16 *o;	guint8 *srow = image->data, *orow = pixels;	width = image->width;	height = image->height;	bpl = image->bytes_per_line;	for (yy = 0; yy < height; yy++) {#ifdef LITTLE		s = srow;#else		s = (guint32 *) srow;#endif		o = (guint16 *) orow;		for (xx = 1; xx < width; xx += 2) {			register guint32 data;#ifdef LITTLE			/* swap endianness first */			data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24;			s += 4;			*o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13				| (data & 0x7e0) << 5 | (data & 0x600) >> 1;			*o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2				| (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21;			*o++ = (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25				| (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;#else			data = *s++;			*o++ = (data & 0xf800) | (data & 0xe000) >> 5				| (data & 0x7e0) >> 3 | (data & 0x600) >> 9;			*o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6				| (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29;			*o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17				| (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;#endif		}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品看片你懂得| 最新热久久免费视频| 99久免费精品视频在线观看 | 久久精品国产秦先生| 国产视频一区二区三区在线观看| 欧美日韩久久一区| 91丨九色丨尤物| 国产精品一二三四| 天天操天天综合网| 亚洲精品乱码久久久久久久久| 337p粉嫩大胆噜噜噜噜噜91av| 欧美性生活一区| 99精品一区二区| 丁香另类激情小说| 国产原创一区二区| 免费成人美女在线观看.| 亚洲永久免费av| 18成人在线视频| 欧美国产一区视频在线观看| 日韩精品中文字幕一区二区三区| 在线观看三级视频欧美| 99热99精品| jiyouzz国产精品久久| 国产成人精品亚洲日本在线桃色| 黄色资源网久久资源365| 日av在线不卡| 免费高清在线一区| 免费成人性网站| 秋霞午夜鲁丝一区二区老狼| 丝袜a∨在线一区二区三区不卡| 天堂在线一区二区| 亚洲成a人片在线观看中文| 一区二区激情小说| 亚洲综合久久av| 亚洲精品伦理在线| 亚洲综合免费观看高清完整版 | 欧美成人国产一区二区| 欧美三级电影在线看| 欧洲一区二区av| 色欧美乱欧美15图片| 91天堂素人约啪| 日本福利一区二区| 在线一区二区三区四区五区| 色激情天天射综合网| 色综合久久久久| 欧美三级三级三级| 69成人精品免费视频| 日韩欧美亚洲另类制服综合在线| 精品日本一线二线三线不卡| 久久免费视频色| 国产精品三级av| 亚洲欧美区自拍先锋| 亚洲综合免费观看高清在线观看| 亚洲国产日韩在线一区模特| 日韩影视精彩在线| 精油按摩中文字幕久久| 国产成人精品免费网站| www.在线成人| 欧美精品免费视频| 久久久久久久久久久久久女国产乱| 久久久99精品免费观看| 亚洲色大成网站www久久九九| 樱桃视频在线观看一区| 日韩国产高清影视| 国产激情一区二区三区四区 | 亚洲丝袜美腿综合| 香蕉加勒比综合久久| 久草在线在线精品观看| 成人免费视频免费观看| 精品视频在线看| 精品国产乱码久久| 国产精品大尺度| 日产欧产美韩系列久久99| 国产精品一二二区| 欧美视频中文字幕| 精品毛片乱码1区2区3区| 国产精品美女www爽爽爽| 亚洲一级二级在线| 国产精品资源网| 欧美午夜在线一二页| 久久综合九色综合欧美98| 一区二区三区四区视频精品免费| 日韩av一区二区在线影视| 成人精品视频一区| 91精品国产综合久久久久久漫画 | 国产欧美一区二区在线| 亚洲福利视频三区| 国内不卡的二区三区中文字幕| 一本一本大道香蕉久在线精品 | 一区二区三区中文字幕精品精品| 免费一级欧美片在线观看| 99久久亚洲一区二区三区青草| 欧美一级免费大片| 久久精品人人做人人综合| 性感美女极品91精品| 丰满白嫩尤物一区二区| 91精品国产综合久久福利软件 | www.色综合.com| 日韩午夜激情视频| 亚洲一线二线三线久久久| 国产精品1024| 日韩欧美在线观看一区二区三区| 亚洲人午夜精品天堂一二香蕉| 韩国成人在线视频| 欧美日本在线观看| 亚洲激情男女视频| 成人午夜在线视频| 精品国产乱码久久久久久影片| 夜夜嗨av一区二区三区中文字幕| 国产成人自拍网| 精品黑人一区二区三区久久 | 亚洲18女电影在线观看| 99久久国产综合精品女不卡| 久久久蜜桃精品| 日韩国产高清影视| 欧美日韩午夜精品| 一个色在线综合| 色噜噜夜夜夜综合网| 国产精品国产三级国产三级人妇 | 欧美日韩精品二区第二页| 亚洲精品乱码久久久久久黑人 | 日韩av网站在线观看| 欧美性生活大片视频| 一区二区国产盗摄色噜噜| 97se亚洲国产综合自在线观| 国产精品久久久久久久久免费桃花 | 精品国产乱码久久久久久闺蜜| 日本不卡在线视频| 欧美一卡二卡在线观看| 日韩精品欧美精品| 欧美一卡二卡三卡| 青青草97国产精品免费观看无弹窗版 | 国产一区二区在线观看视频| 欧美mv日韩mv| 国产综合成人久久大片91| 欧美成人bangbros| 国产一区二区免费在线| 国产亚洲欧美中文| 粉嫩在线一区二区三区视频| 国产精品天天看| 99久久99久久综合| 亚洲自拍偷拍麻豆| 欧美日韩国产片| 日本中文字幕一区| www成人在线观看| 国产69精品久久久久毛片 | 国产精品高清亚洲| 色婷婷激情久久| 亚洲一区二区三区小说| 91精品国产手机| 精品一区二区综合| 欧美激情在线免费观看| 91日韩在线专区| 亚洲成av人影院在线观看网| 日韩一区二区在线免费观看| 国产精品自拍三区| 亚洲日韩欧美一区二区在线| 欧美日韩美女一区二区| 久久不见久久见免费视频7| 久久久久99精品国产片| 色综合欧美在线视频区| 日韩精彩视频在线观看| 久久男人中文字幕资源站| 91网站黄www| 视频在线在亚洲| 久久精品男人天堂av| 99国产精品一区| 日韩和欧美一区二区| 国产蜜臀av在线一区二区三区| 色域天天综合网| 日本不卡视频一二三区| 国产精品美女久久久久aⅴ国产馆| 色美美综合视频| 精品一区二区精品| 自拍av一区二区三区| 欧美一级黄色录像| 99久久精品费精品国产一区二区| 亚洲福利视频三区| 日本一区二区免费在线 | 欧美日韩精品是欧美日韩精品| 久久精品国产**网站演员| 国产精品传媒入口麻豆| 日韩一区二区麻豆国产| 色综合天天综合| 麻豆国产欧美日韩综合精品二区| 亚洲欧洲无码一区二区三区| 日韩一级完整毛片| 色哟哟精品一区| 黑人精品欧美一区二区蜜桃 | 免费久久99精品国产| 国产精品久久久久久亚洲伦 | 亚洲狼人国产精品| 精品免费日韩av| 欧美亚洲综合在线| 福利一区二区在线| 美脚の诱脚舐め脚责91| 亚洲精品久久7777| 国产精品丝袜黑色高跟| 精品国产一区二区三区久久影院| 在线一区二区三区做爰视频网站|