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

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

?? imagedata.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
	int theByte;	int mask;	int n = putWidth;	int i = startIndex;	int srcX = x, srcY = y;	if (depth == 1) {		index = (y * bytesPerLine) + (x >> 3);		while (n > 0) {			mask = 1 << (7 - (srcX & 0x7));			if ((pixels[i] & 0x1) == 1) {				data[index] = (byte)((data[index] & 0xFF) | mask);			} else {				data[index] = (byte)((data[index] & 0xFF) & (mask ^ -1));			}			i++;			n--;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				srcX = 0;			} else {				if (mask == 1) {					index++;				}			}		}		return;	}	if (depth == 2) {		byte [] masks = { (byte)0xFC, (byte)0xF3, (byte)0xCF, (byte)0x3F };		index = (y * bytesPerLine) + (x >> 2);		int offset = 3 - (x % 4);		while (n > 0) {			theByte = pixels[i] & 0x3;			data[index] = (byte)((data[index] & masks[offset]) | (theByte << (offset * 2)));			i++;			n--;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				offset = 0;				srcX = 0;			} else {				if (offset == 0) {					index++;					offset = 3;				} else {					offset--;				}			}		}		return;	}	if (depth == 4) {		index = (y * bytesPerLine) + (x >> 1);		boolean high = (x & 0x1) == 0;		while (n > 0) {			theByte = pixels[i] & 0x0F;			if (high) {				data[index] = (byte)((data[index] & 0x0F) | (theByte << 4));			} else {				data[index] = (byte)((data[index] & 0xF0) | theByte);			}			i++;			n--;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				high = true;				srcX = 0;			} else {				if (!high) index++;				high = !high;			}		}		return;	}	if (depth == 8) {		index = (y * bytesPerLine) + x;		for (int j = 0; j < putWidth; j++) {			data[index] = (byte)(pixels[i] & 0xFF);			i++;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				srcX = 0;			} else {				index++;			}		}		return;	}	SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);}/** * Sets the pixel values starting at offset <code>x</code> in * scanline <code>y</code> in the receiver's data to the * values from the array <code>pixels</code> starting at * <code>startIndex</code>. * * @param x the x position of the pixel to set * @param y the y position of the pixel to set * @param putWidth the width of the pixels to set * @param pixels the pixels to set * @param startIndex the index at which to begin setting * * @exception IndexOutOfBoundsException if putWidth is too large * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li> *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li> *    <li>ERROR_INVALID_ARGUMENT - if putWidth is negative</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_UNSUPPORTED_DEPTH if the depth is not one of 1, 2, 4, 8, 16, 24 or 32</li> * </ul> */public void setPixels(int x, int y, int putWidth, int[] pixels, int startIndex) {	if (pixels == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	if (putWidth < 0 || x >= width || y >= height || x < 0 || y < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);	if (putWidth == 0) return;	int index;	int theByte;	int mask;	int n = putWidth;	int i = startIndex;	int pixel;	int srcX = x, srcY = y;	if (depth == 1) {		index = (y * bytesPerLine) + (x >> 3);		while (n > 0) {			mask = 1 << (7 - (srcX & 0x7));			if ((pixels[i] & 0x1) == 1) {				data[index] = (byte)((data[index] & 0xFF) | mask);			} else {				data[index] = (byte)((data[index] & 0xFF) & (mask ^ -1));			}			i++;			n--;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				srcX = 0;			} else {				if (mask == 1) {					index++;				}			}		}		return;	}	if (depth == 2) {		byte [] masks = { (byte)0xFC, (byte)0xF3, (byte)0xCF, (byte)0x3F };		index = (y * bytesPerLine) + (x >> 2);		int offset = 3 - (x % 4);		while (n > 0) {			theByte = pixels[i] & 0x3;			data[index] = (byte)((data[index] & masks[offset]) | (theByte << (offset * 2)));			i++;			n--;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				offset = 3;				srcX = 0;			} else {				if (offset == 0) {					index++;					offset = 3;				} else {					offset--;				}			}		}		return;	}	if (depth == 4) {		index = (y * bytesPerLine) + (x >> 1);		boolean high = (x & 0x1) == 0;		while (n > 0) {			theByte = pixels[i] & 0x0F;			if (high) {				data[index] = (byte)((data[index] & 0x0F) | (theByte << 4));			} else {				data[index] = (byte)((data[index] & 0xF0) | theByte);			}			i++;			n--;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				high = true;				srcX = 0;			} else {				if (!high) index++;				high = !high;			}		}		return;	}	if (depth == 8) {		index = (y * bytesPerLine) + x;		for (int j = 0; j < putWidth; j++) {			data[index] = (byte)(pixels[i] & 0xFF);			i++;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				srcX = 0;			} else {				index++;			}		}		return;	}	if (depth == 16) {		index = (y * bytesPerLine) + (x * 2);		for (int j = 0; j < putWidth; j++) {			pixel = pixels[i];			data[index] = (byte)(pixel & 0xFF);			data[index + 1] = (byte)((pixel >> 8) & 0xFF);			i++;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				srcX = 0;			} else {				index += 2;			}		}		return;	}	if (depth == 24) {		index = (y * bytesPerLine) + (x * 3);		for (int j = 0; j < putWidth; j++) {			pixel = pixels[i];			data[index] = (byte)((pixel >> 16) & 0xFF);			data[index + 1] = (byte)((pixel >> 8) & 0xFF);			data[index + 2] = (byte)(pixel & 0xFF);			i++;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				srcX = 0;			} else {				index += 3;			}		}		return;	}	if (depth == 32) {		index = (y * bytesPerLine) + (x * 4);		for (int j = 0; j < putWidth; j++) {			pixel = pixels[i];			data[index] = (byte)((pixel >> 24) & 0xFF);			data[index + 1] = (byte)((pixel >> 16) & 0xFF);			data[index + 2] = (byte)((pixel >> 8) & 0xFF);			data[index + 3] = (byte)(pixel & 0xFF);			i++;			srcX++;			if (srcX >= width) {				srcY++;				index = srcY * bytesPerLine;				srcX = 0;			} else {				index += 4;			}		}		return;	}	SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);}/** * Returns a palette with 2 colors: black & white. */static PaletteData bwPalette() {	return new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)});}/** * Gets the offset of the most significant bit for * the given mask. */static int getMSBOffset(int mask) {	for (int i = 31; i >= 0; i--) {		if (((mask >> i) & 0x1) != 0) return i + 1;	}	return 0;}/** * Finds the closest match. */static int closestMatch(int depth, byte red, byte green, byte blue, int redMask, int greenMask, int blueMask, byte[] reds, byte[] greens, byte[] blues) {	if (depth > 8) {		int rshift = 32 - getMSBOffset(redMask);		int gshift = 32 - getMSBOffset(greenMask);		int bshift = 32 - getMSBOffset(blueMask);		return (((red << 24) >>> rshift) & redMask) |			(((green << 24) >>> gshift) & greenMask) |			(((blue << 24) >>> bshift) & blueMask);	}	int r, g, b;	int minDistance = 0x7fffffff;	int nearestPixel = 0;	int n = reds.length;	for (int j = 0; j < n; j++) {		r = (reds[j] & 0xFF) - (red & 0xFF);		g = (greens[j] & 0xFF) - (green & 0xFF);		b = (blues[j] & 0xFF) - (blue & 0xFF);		int distance = r*r + g*g + b*b;		if (distance < minDistance) {			nearestPixel = j;			if (distance == 0) break;			minDistance = distance;		}	}	return nearestPixel;}static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {	if (pad == newPad) return data;	int stride = (width * depth + 7) / 8;	int bpl = (stride + (pad - 1)) / pad * pad;		int newBpl = (stride + (newPad - 1)) / newPad * newPad;	byte[] newData = new byte[height * newBpl];	int srcIndex = 0, destIndex = 0;	for (int y = 0; y < height; y++) {		System.arraycopy(data, srcIndex, newData, destIndex, stride);		srcIndex += bpl;		destIndex += newBpl;	}	return newData;}/** * Blit operation bits to be OR'ed together to specify the desired operation. */static final int	BLIT_SRC = 1,     // copy source directly, else applies logic operations	BLIT_ALPHA = 2,   // enable alpha blending	BLIT_DITHER = 4;  // enable dithering in low color modes/** * Alpha mode, values 0 - 255 specify global alpha level */static final int	ALPHA_OPAQUE = 255,           // Fully opaque (ignores any alpha data)	ALPHA_TRANSPARENT = 0,        // Fully transparent (ignores any alpha data)	ALPHA_CHANNEL_SEPARATE = -1,  // Use alpha channel from separate alphaData	ALPHA_CHANNEL_SOURCE = -2,    // Use alpha channel embedded in sourceData	ALPHA_MASK_UNPACKED = -3,     // Use transparency mask formed by bytes in alphaData (non-zero is opaque)	ALPHA_MASK_PACKED = -4,       // Use transparency mask formed by packed bits in alphaData	ALPHA_MASK_INDEX = -5,        // Consider source palette indices transparent if in alphaData array	ALPHA_MASK_RGB = -6;          // Consider source RGBs transparent if in RGB888 format alphaData array/** * Byte and bit order constants. */static final int LSB_FIRST = 0;static final int MSB_FIRST = 1;/** * Data types (internal) */private static final int	// direct / true color formats with arbitrary masks & shifts	TYPE_GENERIC_8 = 0,	TYPE_GENERIC_16_MSB = 1,	TYPE_GENERIC_16_LSB = 2,	TYPE_GENERIC_24 = 3,	TYPE_GENERIC_32_MSB = 4,	TYPE_GENERIC_32_LSB = 5,	// palette indexed color formats	TYPE_INDEX_8 = 6,	TYPE_INDEX_4 = 7,	TYPE_INDEX_2 = 8,	TYPE_INDEX_1_MSB = 9,	TYPE_INDEX_1_LSB = 10;/** * Blits a direct palette image into a direct palette image. * <p> * Note: When the source and destination depth, order and masks * are pairwise equal and the blitter operation is BLIT_SRC, * the masks are ignored.  Hence when not changing the image * data format, 0 may be specified for the masks. * </p> *  * @param op the blitter operation: a combination of BLIT_xxx flags *        (see BLIT_xxx constants) * @param srcData the source byte array containing image data * @param srcDepth the source depth: one of 8, 16, 24, 32 * @param srcStride the source number of bytes per line * @param srcOrder the source byte ordering: one of MSB_FIRST or LSB_FIRST; *        ignored if srcDepth is not 16 or 32 * @param srcX the top-left x-coord of the source blit region * @param srcY the top-left y-coord of the source blit region * @param srcWidth the width of the source blit region * @param srcHeight the height of the source blit region * @param srcRedMask the source red channel mask * @param srcGreenMask the source green channel mask * @param srcBlueMask the source blue channel mask * @param alphaMode the alpha blending or mask mode, may be *        an integer 0-255 for global alpha; ignored if BLIT_ALPHA *        not specified in the blitter operations *        (see ALPHA_MODE_xxx constants) * @param alphaData the alpha blending or mask data, varies depending *        on the value of alphaMode and sometimes ignored * @param alphaStride the alpha data number of bytes per line * @param alphaX the top-left x-coord of the alpha blit region * @param alphaY the top-left y-coord of the alpha blit region * @param destData the destination byte array containing image data * @param destDepth the destination depth: one of 8, 16, 24, 32 * @param destStride the destination number of bytes per line

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩中文字幕91| 国产精品网站一区| 日韩欧美高清一区| 欧美色图在线观看| 欧美系列亚洲系列| 精品少妇一区二区三区在线视频 | 欧美国产精品v| 亚洲色图视频网| 亚洲成人免费看| 久久国产精品72免费观看| 国产精品一色哟哟哟| 不卡的av电影| 日韩一区二区免费在线电影| 亚洲精品一区二区三区香蕉| 国产性天天综合网| 亚洲自拍都市欧美小说| 日韩精品亚洲一区| 99久久精品国产网站| 欧美电影一区二区| 国产精品国产三级国产三级人妇 | 一本久久精品一区二区| 欧美老女人在线| 国产精品嫩草久久久久| 视频在线观看国产精品| 99久久精品情趣| 久久久高清一区二区三区| 日韩av一区二| 日本丰满少妇一区二区三区| 国产欧美一二三区| 国产精品三级视频| 亚洲影视在线观看| 91行情网站电视在线观看高清版| 欧美一区二区三区男人的天堂| 日韩欧美色电影| 天天综合网 天天综合色| 91免费观看国产| 久久久久久一二三区| 久久激情五月激情| 国模大尺度一区二区三区| 91蝌蚪porny| 日韩西西人体444www| 日本欧美在线观看| 在线播放视频一区| 亚洲伊人色欲综合网| 欧美日韩国产小视频| 日韩av在线免费观看不卡| 日韩欧美亚洲国产另类| 午夜不卡av免费| 亚洲精品一区二区三区在线观看 | 国产欧美日产一区| 成人精品一区二区三区中文字幕 | 亚洲一区在线视频| 这里只有精品免费| 亚洲第一久久影院| 欧美日韩一区国产| 亚洲动漫第一页| 在线成人av网站| 国产一区二区三区黄视频| 久久久久久久综合日本| 日韩中文欧美在线| 欧美日韩精品一区二区三区蜜桃 | 国产午夜精品久久久久久久 | 日韩成人一区二区| 7777精品伊人久久久大香线蕉完整版 | 99国产欧美另类久久久精品| 亚洲综合色婷婷| 在线观看免费成人| 午夜久久电影网| 国产日韩欧美a| 99re热这里只有精品视频| 一区二区三区精品视频在线| 91麻豆精品国产91久久久久 | 日韩福利视频导航| 国产精品乱子久久久久| 中文字幕亚洲成人| 香蕉加勒比综合久久| 亚洲一区二区三区激情| 国产精品美女久久久久av爽李琼| 欧美日韩在线播放| aaa欧美大片| 国产99久久久久| 欧美精品乱码久久久久久| 7878成人国产在线观看| 成人福利视频在线| 成人黄色综合网站| 91女厕偷拍女厕偷拍高清| 91色.com| 国产日本亚洲高清| 亚洲成人7777| 成人免费av网站| 欧洲在线/亚洲| 777久久久精品| 国产成人在线看| 精品系列免费在线观看| 精品伊人久久久久7777人| 99精品国产91久久久久久| 久久色.com| 亚洲国产精品久久久男人的天堂| 成人激情电影免费在线观看| 久久久精品免费观看| 蜜乳av一区二区| 26uuu久久天堂性欧美| 青青草97国产精品免费观看| 欧美一区中文字幕| 精久久久久久久久久久| 欧美α欧美αv大片| 国产一区二区三区日韩| 久久久精品一品道一区| 久久国产免费看| 欧美变态凌虐bdsm| 成人精品小蝌蚪| 亚洲国产一区二区在线播放| 欧美精品乱码久久久久久| 成人av在线一区二区三区| 国产精品美女久久久久久久久久久| 成人免费视频视频在线观看免费| 国产精品乱人伦中文| 黄色资源网久久资源365| 中文欧美字幕免费| 欧美在线免费播放| 精品一区二区三区视频| 国产精品五月天| 国产精品久久久久毛片软件| 色8久久人人97超碰香蕉987| 国产精品成人免费在线| 日韩av网站免费在线| 91蜜桃免费观看视频| 欧美日韩一区二区不卡| 日日夜夜一区二区| 日韩无一区二区| 中文字幕二三区不卡| av网站免费线看精品| 日韩不卡在线观看日韩不卡视频| 日韩精品最新网址| 色激情天天射综合网| 日本不卡的三区四区五区| 国产精品成人免费| 精品国产乱码久久久久久夜甘婷婷| 成人精品小蝌蚪| 国内精品免费**视频| 亚洲国产精品嫩草影院| 在线播放/欧美激情| 国产成人精品网址| 久色婷婷小香蕉久久| 亚洲国产另类av| 亚洲欧美激情在线| 国产亚洲人成网站| 亚洲精品在线免费播放| 欧美性生交片4| 色狠狠色噜噜噜综合网| 91一区二区三区在线观看| 激情文学综合丁香| 九一九一国产精品| 另类小说视频一区二区| 美脚の诱脚舐め脚责91 | 久久精品亚洲麻豆av一区二区| 精品精品国产高清a毛片牛牛| 久久先锋影音av| 欧美精品第一页| 欧美xxxx老人做受| 亚洲国产精品激情在线观看| 日本一区二区三区高清不卡| 中文一区二区在线观看| 亚洲欧洲一区二区在线播放| 亚洲欧美激情插 | 亚洲综合免费观看高清在线观看| 亚洲制服丝袜一区| 蜜桃视频一区二区| 成人免费电影视频| 欧美老年两性高潮| 久久精品欧美一区二区三区不卡| 日本一区二区久久| 亚洲成av人影院| 99久久免费国产| 欧美成人三级电影在线| 国产精品成人免费| 青青国产91久久久久久 | 久草这里只有精品视频| 国产精品一区二区男女羞羞无遮挡 | 国产成人在线视频播放| 欧美色成人综合| 日韩欧美高清一区| 亚洲成人动漫在线免费观看| 国产专区欧美精品| 色噜噜久久综合| 国产精品久久久久久久久免费桃花 | 国产精品一区二区黑丝| 日韩欧美一卡二卡| 亚洲大片在线观看| 日本电影亚洲天堂一区| 一片黄亚洲嫩模| 91蜜桃视频在线| 亚洲天堂久久久久久久| 成人免费av网站| 国产精品三级电影| caoporn国产精品| 国产精品色呦呦| 99久久国产综合精品女不卡| 日本一区二区三区电影| 国产精品1区二区.|