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

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

?? image.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
					ImageData.ALPHA_OPAQUE, null, 0, 0, 0,					img.data, img.depth, img.bytesPerLine, newOrder, 0, 0, img.width, img.height, newPalette.redMask, newPalette.greenMask, newPalette.blueMask,					false, false);			if (i.transparentPixel != -1) {				img.transparentPixel = newPalette.getPixel(palette.getRGB(i.transparentPixel));			}			img.maskPad = i.maskPad;			img.maskData = i.maskData;			img.alpha = i.alpha;			img.alphaData = i.alphaData;			i = img;		}	}	/* Construct bitmap info header by hand */	RGB[] rgbs = i.palette.getRGBs();	boolean useBitfields = OS.IsWinCE && (i.depth == 16 || i.depth == 32);	BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();	bmiHeader.biSize = BITMAPINFOHEADER.sizeof;	bmiHeader.biWidth = i.width;	bmiHeader.biHeight = -i.height;	bmiHeader.biPlanes = 1;	bmiHeader.biBitCount = (short)i.depth;	if (useBitfields) bmiHeader.biCompression = OS.BI_BITFIELDS;	else bmiHeader.biCompression = OS.BI_RGB;	bmiHeader.biClrUsed = rgbs == null ? 0 : rgbs.length;	byte[] bmi;	if (i.palette.isDirect)		bmi = new byte[BITMAPINFOHEADER.sizeof + (useBitfields ? 12 : 0)];	else		bmi = new byte[BITMAPINFOHEADER.sizeof + rgbs.length * 4];	OS.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof);	/* Set the rgb colors into the bitmap info */	int offset = BITMAPINFOHEADER.sizeof;	if (i.palette.isDirect) {		if (useBitfields) {			PaletteData palette = i.palette;			int redMask = palette.redMask;			int greenMask = palette.greenMask;			int blueMask = palette.blueMask;			/*			 * The color masks must be written based on the			 * endianness of the ImageData.			 */			if (i.getByteOrder() == ImageData.LSB_FIRST) {				bmi[offset] = (byte)((redMask & 0xFF) >> 0);				bmi[offset + 1] = (byte)((redMask & 0xFF00) >> 8);				bmi[offset + 2] = (byte)((redMask & 0xFF0000) >> 16);				bmi[offset + 3] = (byte)((redMask & 0xFF000000) >> 24);				bmi[offset + 4] = (byte)((greenMask & 0xFF) >> 0);				bmi[offset + 5] = (byte)((greenMask & 0xFF00) >> 8);				bmi[offset + 6] = (byte)((greenMask & 0xFF0000) >> 16);				bmi[offset + 7] = (byte)((greenMask & 0xFF000000) >> 24);				bmi[offset + 8] = (byte)((blueMask & 0xFF) >> 0);				bmi[offset + 9] = (byte)((blueMask & 0xFF00) >> 8);				bmi[offset + 10] = (byte)((blueMask & 0xFF0000) >> 16);				bmi[offset + 11] = (byte)((blueMask & 0xFF000000) >> 24);			} else {				bmi[offset] = (byte)((redMask & 0xFF000000) >> 24);				bmi[offset + 1] = (byte)((redMask & 0xFF0000) >> 16);				bmi[offset + 2] = (byte)((redMask & 0xFF00) >> 8);				bmi[offset + 3] = (byte)((redMask & 0xFF) >> 0);				bmi[offset + 4] = (byte)((greenMask & 0xFF000000) >> 24);				bmi[offset + 5] = (byte)((greenMask & 0xFF0000) >> 16);				bmi[offset + 6] = (byte)((greenMask & 0xFF00) >> 8);				bmi[offset + 7] = (byte)((greenMask & 0xFF) >> 0);				bmi[offset + 8] = (byte)((blueMask & 0xFF000000) >> 24);				bmi[offset + 9] = (byte)((blueMask & 0xFF0000) >> 16);				bmi[offset + 10] = (byte)((blueMask & 0xFF00) >> 8);				bmi[offset + 11] = (byte)((blueMask & 0xFF) >> 0);			}		}	} else {		for (int j = 0; j < rgbs.length; j++) {			bmi[offset] = (byte)rgbs[j].blue;			bmi[offset + 1] = (byte)rgbs[j].green;			bmi[offset + 2] = (byte)rgbs[j].red;			bmi[offset + 3] = 0;			offset += 4;		}	}	int[] pBits = new int[1];	int hDib = OS.CreateDIBSection(0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);	if (hDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);	/* In case of a scanline pad other than 4, do the work to convert it */	byte[] data = i.data;	if (i.scanlinePad != 4 && (i.bytesPerLine % 4 != 0)) {		data = ImageData.convertPad(data, i.width, i.height, i.depth, i.scanlinePad, 4);	}	OS.MoveMemory(pBits[0], data, data.length);		int[] result = null;	if (i.getTransparencyType() == SWT.TRANSPARENCY_MASK) {		/* Get the HDC for the device */		int hDC = device.internal_new_GC(null);					/* Create the color bitmap */		int hdcSrc = OS.CreateCompatibleDC(hDC);		OS.SelectObject(hdcSrc, hDib);		int hBitmap = OS.CreateCompatibleBitmap(hDC, i.width, i.height);		if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);		int hdcDest = OS.CreateCompatibleDC(hDC);		OS.SelectObject(hdcDest, hBitmap);		OS.BitBlt(hdcDest, 0, 0, i.width, i.height, hdcSrc, 0, 0, OS.SRCCOPY);				/* Release the HDC for the device */			device.internal_dispose_GC(hDC, null);					/* Create the mask. Windows requires icon masks to have a scanline pad of 2. */		byte[] maskData = ImageData.convertPad(i.maskData, i.width, i.height, 1, i.maskPad, 2);		int hMask = OS.CreateBitmap(i.width, i.height, 1, 1, maskData);		if (hMask == 0) SWT.error(SWT.ERROR_NO_HANDLES);			OS.SelectObject(hdcSrc, hMask);		OS.PatBlt(hdcSrc, 0, 0, i.width, i.height, OS.DSTINVERT);		OS.DeleteDC(hdcSrc);		OS.DeleteDC(hdcDest);		OS.DeleteObject(hDib);				if (image == null) {			result = new int[]{hBitmap, hMask}; 		} else {			/* Create the icon */			ICONINFO info = new ICONINFO();			info.fIcon = true;			info.hbmColor = hBitmap;			info.hbmMask = hMask;			int hIcon = OS.CreateIconIndirect(info);			if (hIcon == 0) SWT.error(SWT.ERROR_NO_HANDLES);			OS.DeleteObject(hBitmap);			OS.DeleteObject(hMask);			image.handle = hIcon;			image.type = SWT.ICON;			if (OS.IsWinCE) image.data = i;		}	} else {		if (image == null) {			result = new int[]{hDib};		} else {			image.handle = hDib;			image.type = SWT.BITMAP;			image.transparentPixel = i.transparentPixel;			if (image.transparentPixel == -1) {				image.alpha = i.alpha;				if (i.alpha == -1 && i.alphaData != null) {					int length = i.alphaData.length;					image.alphaData = new byte[length];					System.arraycopy(i.alphaData, 0, image.alphaData, 0, length);				}			}		}	}	return result;}static int[] init(Device device, Image image, ImageData source, ImageData mask) {	/* Create a temporary image and locate the black pixel */	ImageData imageData;	int blackIndex = 0;	if (source.palette.isDirect) {		imageData = new ImageData(source.width, source.height, source.depth, source.palette);	} else {		RGB black = new RGB(0, 0, 0);		RGB[] rgbs = source.getRGBs();		if (source.transparentPixel != -1) {			/*			 * The source had transparency, so we can use the transparent pixel			 * for black.			 */			RGB[] newRGBs = new RGB[rgbs.length];			System.arraycopy(rgbs, 0, newRGBs, 0, rgbs.length);			if (source.transparentPixel >= newRGBs.length) {				/* Grow the palette with black */				rgbs = new RGB[source.transparentPixel + 1];				System.arraycopy(newRGBs, 0, rgbs, 0, newRGBs.length);				for (int i = newRGBs.length; i <= source.transparentPixel; i++) {					rgbs[i] = new RGB(0, 0, 0);				}			} else {				newRGBs[source.transparentPixel] = black;				rgbs = newRGBs;			}			blackIndex = source.transparentPixel;			imageData = new ImageData(source.width, source.height, source.depth, new PaletteData(rgbs));		} else {			while (blackIndex < rgbs.length) {				if (rgbs[blackIndex].equals(black)) break;				blackIndex++;			}			if (blackIndex == rgbs.length) {				/*				 * We didn't find black in the palette, and there is no transparent				 * pixel we can use.				 */				if ((1 << source.depth) > rgbs.length) {					/* We can grow the palette and add black */					RGB[] newRGBs = new RGB[rgbs.length + 1];					System.arraycopy(rgbs, 0, newRGBs, 0, rgbs.length);					newRGBs[rgbs.length] = black;					rgbs = newRGBs;				} else {					/* No room to grow the palette */					blackIndex = -1;				}			}			imageData = new ImageData(source.width, source.height, source.depth, new PaletteData(rgbs));		}	}	if (blackIndex == -1) {		/* There was no black in the palette, so just copy the data over */		System.arraycopy(source.data, 0, imageData.data, 0, imageData.data.length);	} else {		/* Modify the source image to contain black wherever the mask is 0 */		int[] imagePixels = new int[imageData.width];		int[] maskPixels = new int[mask.width];		for (int y = 0; y < imageData.height; y++) {			source.getPixels(0, y, imageData.width, imagePixels, 0);			mask.getPixels(0, y, mask.width, maskPixels, 0);			for (int i = 0; i < imagePixels.length; i++) {				if (maskPixels[i] == 0) imagePixels[i] = blackIndex;			}			imageData.setPixels(0, y, source.width, imagePixels, 0);		}	}	imageData.maskPad = mask.scanlinePad;	imageData.maskData = mask.data;		return init(device, image, imageData);}void init(Device device, ImageData i) {	if (i == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	init(device, this, i);}/**	  * Invokes platform specific functionality to allocate a new GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public * API for <code>Image</code>. It is marked public only so that it * can be shared within the packages provided by SWT. It is not * available on all platforms, and should never be called from * application code. * </p> * * @param data the platform specific GC data  * @return the platform specific GC handle */public int internal_new_GC (GCData data) {	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);	/*	* Create a new GC that can draw into the image.	* Only supported for bitmaps.	*/	if (type != SWT.BITMAP || memGC != null) {		SWT.error(SWT.ERROR_INVALID_ARGUMENT);	}		/* Create a compatible HDC for the device */	int hDC = device.internal_new_GC(null);	int imageDC = OS.CreateCompatibleDC(hDC);	device.internal_dispose_GC(hDC, null);	if (imageDC == 0) SWT.error(SWT.ERROR_NO_HANDLES);	if (data != null) {		/* Set the GCData fields */		int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;		if ((data.style & mask) != 0) {			data.layout = (data.style & SWT.RIGHT_TO_LEFT) != 0 ? OS.LAYOUT_RTL : 0;		} else {			data.style |= SWT.LEFT_TO_RIGHT;		}		data.device = device;		data.image = this;		data.hFont = device.systemFont;	}	return imageDC;}/**	  * Invokes platform specific functionality to dispose a GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public * API for <code>Image</code>. It is marked public only so that it * can be shared within the packages provided by SWT. It is not * available on all platforms, and should never be called from * application code. * </p> * * @param hDC the platform specific GC handle * @param data the platform specific GC data  */public void internal_dispose_GC (int hDC, GCData data) {	OS.DeleteDC(hDC);}/** * Returns <code>true</code> if the image has been disposed, * and <code>false</code> otherwise. * <p> * This method gets the dispose state for the image. * When an image has been disposed, it is an error to * invoke any other method using the image. * * @return <code>true</code> when the image is disposed and <code>false</code> otherwise */public boolean isDisposed() {	return handle == 0;}/** * Sets the color to which to map the transparent pixel. * <p> * There are certain uses of <code>Images</code> that do not support * transparency (for example, setting an image into a button or label). * In these cases, it may be desired to simulate transparency by using * the background color of the widget to paint the transparent pixels * of the image. This method specifies the color that will be used in * these cases. For example: * <pre> *    Button b = new Button(); *    image.setBackground(b.getBackground()); *    b.setImage(image); * </pre> * </p><p> * The image may be modified by this operation (in effect, the * transparent regions may be filled with the supplied color).  Hence * this operation is not reversible and it is not legal to call * this function twice or with a null argument. * </p><p> * This method has no effect if the receiver does not have a transparent * pixel value. * </p> * * @param color the color to use when a transparent pixel is specified * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the color is null</li> *    <li>ERROR_INVALID_ARGUMENT - if the color has been disposed</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public void setBackground(Color color) {	/*	* Note.  Not implemented on WinCE.	*/	if (OS.IsWinCE) return;	if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);	if (color == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);	if (transparentPixel == -1) return;	/* Get the HDC for the device */	int hDC = device.internal_new_GC(null);		/* Change the background color in the image */	BITMAP bm = new BITMAP();			OS.GetObject(handle, BITMAP.sizeof, bm);	int hdcMem = OS.CreateCompatibleDC(hDC);	OS.SelectObject(hdcMem, handle);	int maxColors = 1 << bm.bmBitsPixel;	byte[] colors = new byte[maxColors * 4];	if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);	int num

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
东方欧美亚洲色图在线| 久久久久久久久久美女| 免费成人av在线| 综合激情成人伊人| 欧美一区二区三区在线| 不卡的av电影| 九九精品视频在线看| 亚洲综合小说图片| 精品国精品国产| 欧美视频完全免费看| 波多野结衣中文字幕一区 | 久久综合狠狠综合久久激情| 91一区二区在线观看| 青青草成人在线观看| 亚洲精选视频在线| 欧美国产欧美亚州国产日韩mv天天看完整| 一本大道久久a久久综合婷婷 | 99视频一区二区| 狠狠色丁香久久婷婷综合丁香| 国产精品免费人成网站| 欧美电视剧免费全集观看| 欧美日韩国产综合视频在线观看| 在线精品视频小说1| 99在线视频精品| 菠萝蜜视频在线观看一区| 国产成+人+日韩+欧美+亚洲| 蜜桃久久精品一区二区| 五月天一区二区| 美洲天堂一区二卡三卡四卡视频| 亚洲男女毛片无遮挡| 一区二区在线观看视频| 国产精品不卡在线| 亚洲激情校园春色| 亚洲最新在线观看| 亚洲成人综合网站| 老司机精品视频一区二区三区| 日韩电影在线观看一区| 老司机午夜精品| 成年人网站91| 777xxx欧美| 国产精品无人区| 国产精品乱子久久久久| 亚洲精品伦理在线| 人人爽香蕉精品| 岛国精品一区二区| 欧美高清精品3d| 久久久综合视频| 欧美mv日韩mv| 久久综合九色综合欧美亚洲| 欧美日韩情趣电影| 国产欧美一区二区三区鸳鸯浴 | 欧美三级三级三级| 欧美日韩不卡一区二区| 国产人久久人人人人爽| 亚洲电影视频在线| 亚洲综合色婷婷| 国产激情视频一区二区三区欧美 | 中文字幕欧美日韩一区| 亚洲日本va午夜在线影院| 极品美女销魂一区二区三区免费| 在线看不卡av| 国产精品视频免费看| 国精产品一区一区三区mba视频 | 在线91免费看| 中文字幕欧美一| 国产成都精品91一区二区三| 91精品蜜臀在线一区尤物| 一区二区免费在线播放| 色综合久久中文字幕| 国产欧美日韩三级| 久久99热国产| 欧美午夜在线观看| 亚洲国产精品欧美一二99| 99re热这里只有精品视频| 2022国产精品视频| 久久99国产乱子伦精品免费| 91精品婷婷国产综合久久性色| 亚洲综合一区二区三区| 欧洲精品视频在线观看| 国产精品免费视频观看| 国产成人av影院| 国产精品视频第一区| 成人av在线资源| 亚洲人成精品久久久久| 成人app在线观看| 亚洲精品一二三| 欧美精品一二三| 亚洲综合另类小说| 欧美主播一区二区三区美女| 午夜视频在线观看一区二区三区| 欧美国产乱子伦| 91麻豆国产福利精品| 亚洲综合色丁香婷婷六月图片| 欧美在线高清视频| 在线视频你懂得一区| 亚洲一区二区偷拍精品| 精品久久久久久久久久久院品网| 国产精品伊人色| 亚洲一区二区三区中文字幕 | 日韩国产在线观看| 国产亚洲综合性久久久影院| 在线免费观看日本欧美| 毛片一区二区三区| 专区另类欧美日韩| 欧美日韩精品欧美日韩精品一 | av不卡免费在线观看| 首页综合国产亚洲丝袜| 中文字幕精品一区| 欧美一区二区在线免费播放| 99久久99精品久久久久久 | 久久影院视频免费| 在线观看一区日韩| www.日韩大片| 亚洲午夜激情网页| 国产精品初高中害羞小美女文| 日韩欧美色综合网站| 91啦中文在线观看| 不卡av在线网| 不卡av在线网| 丁香婷婷综合色啪| 国产aⅴ综合色| 亚洲影院理伦片| 亚洲一区自拍偷拍| 依依成人精品视频| 国产精品麻豆网站| 亚洲柠檬福利资源导航| 国产精品乱码一区二区三区软件 | 日韩欧美卡一卡二| 欧美精品色综合| 精品视频在线看| 欧美日韩第一区日日骚| 91精彩视频在线| 94-欧美-setu| 成人午夜激情影院| 成人免费观看视频| 粉嫩久久99精品久久久久久夜| 日韩激情视频网站| 亚洲色图丝袜美腿| 亚洲一区在线免费观看| 一区二区三区欧美日韩| 国产精品久久久久久久蜜臀| 日韩精品一区二区三区四区视频| 欧美日高清视频| 欧美日韩另类国产亚洲欧美一级| 在线影院国内精品| 欧美网站大全在线观看| 在线一区二区三区做爰视频网站| 色婷婷综合在线| 欧洲av在线精品| 欧美一区二区福利在线| 日韩视频一区二区| 欧美一区二区高清| 国产日韩高清在线| 久久婷婷久久一区二区三区| 亚洲欧美影音先锋| 天天综合天天综合色| 黄网站免费久久| 国产福利一区二区三区视频 | 亚洲一级在线观看| 美女一区二区在线观看| 成人少妇影院yyyy| 欧美日韩免费观看一区二区三区| 亚洲一区在线播放| 亚洲chinese男男1069| 狠狠色丁香婷综合久久| aaa欧美大片| 2023国产一二三区日本精品2022| 国产丝袜在线精品| 国产精品久久久一本精品| 亚洲最色的网站| 色婷婷av久久久久久久| 国产精品白丝在线| av中文字幕不卡| 国产精品久久久一本精品| 国产成人日日夜夜| 26uuu亚洲综合色欧美| 精品一区二区三区在线播放视频 | 日韩国产一区二| 精品久久久久久久久久久久包黑料 | 久久综合久久综合久久| 日韩高清电影一区| 欧美变态口味重另类| 免费人成网站在线观看欧美高清| 欧美日韩在线播放三区四区| 一卡二卡三卡日韩欧美| 欧美午夜精品电影| 三级一区在线视频先锋| 欧美一区二区三区色| 国产一区二区日韩精品| 中文字幕亚洲一区二区av在线| 一本色道久久综合狠狠躁的推荐| 亚洲色图第一区| 91精品福利在线一区二区三区| 精品制服美女丁香| 国产午夜精品理论片a级大结局| 成人美女在线观看| 亚洲第一在线综合网站| 国产午夜精品久久久久久免费视| 成人免费av资源| 日本成人在线看|