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

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

?? image.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
				if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);				OS.GetDIBits(hBitmapDC, info.hbmMask, 0, height, 0, bmi, OS.DIB_RGB_COLORS);				OS.MoveMemory(bmiHeader, bmi, BITMAPINFOHEADER.sizeof);				imageSize = bmiHeader.biSizeImage;				maskData = new byte[imageSize];				int lpvMaskBits = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, imageSize);				if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);				OS.GetDIBits(hBitmapDC, info.hbmMask, 0, height, lpvMaskBits, bmi, OS.DIB_RGB_COLORS);				OS.MoveMemory(maskData, lpvMaskBits, imageSize);					OS.HeapFree(hHeap, 0, lpvMaskBits);				/* Loop to invert the mask */				for (int i = 0; i < maskData.length; i++) {					maskData[i] ^= -1;				}				/* Make sure mask scanlinePad is 2 */				int maskPad;				int bpl = imageSize / height;				for (maskPad = 1; maskPad < 128; maskPad++) {					int calcBpl = (((width + 7) / 8) + (maskPad - 1)) / maskPad * maskPad;					if (calcBpl == bpl) break;				}				maskData = ImageData.convertPad(maskData, width, height, 1, maskPad, 2);			}			/* Clean up */			OS.HeapFree(hHeap, 0, lpvBits);			OS.SelectObject(hBitmapDC, hOldBitmap);			if (oldPalette != 0) {				OS.SelectPalette(hBitmapDC, oldPalette, false);				OS.RealizePalette(hBitmapDC);			}			OS.DeleteDC(hBitmapDC);						/* Release the HDC for the device */			device.internal_dispose_GC(hDC, null);						if (info.hbmColor != 0) OS.DeleteObject(info.hbmColor);			if (info.hbmMask != 0) OS.DeleteObject(info.hbmMask);			/* Construct and return the ImageData */			ImageData imageData = new ImageData(width, height, depth, palette, 4, data);			imageData.maskData = maskData;			imageData.maskPad = 2;			return imageData;		}		case SWT.BITMAP: {			/* Get the basic BITMAP information */			bm = new BITMAP();			OS.GetObject(handle, BITMAP.sizeof, bm);			depth = bm.bmPlanes * bm.bmBitsPixel;			width = bm.bmWidth;			height = bm.bmHeight;			/* Find out whether this is a DIB or a DDB. */			boolean isDib = (bm.bmBits != 0);			/* Get the HDC for the device */			int hDC = device.internal_new_GC(null);			/*			* Feature in WinCE.  GetDIBits is not available in WinCE.  The			* workaround is to create a temporary DIB from the DDB and use			* the bmBits field of DIBSECTION to retrieve the image data.			*/			int handle = this.handle;			if (OS.IsWinCE) {				if (!isDib) {					boolean mustRestore = false;					if (memGC != null && !memGC.isDisposed()) {						mustRestore = true;						GCData data = memGC.data;						if (data.hNullBitmap != 0) {							OS.SelectObject(memGC.handle, data.hNullBitmap);							data.hNullBitmap = 0;						}					}					handle = createDIBFromDDB(hDC, this.handle, width, height);					if (mustRestore) {						int hOldBitmap = OS.SelectObject(memGC.handle, this.handle);						memGC.data.hNullBitmap = hOldBitmap;					}					isDib = true;				}			}			DIBSECTION dib = null;			if (isDib) {				dib = new DIBSECTION();				OS.GetObject(handle, DIBSECTION.sizeof, dib);			}			/* Calculate number of colors */			int numColors = 0;			if (depth <= 8) {				if (isDib) {					numColors = dib.biClrUsed;				} else {					numColors = 1 << depth;				}			}			/* Create the BITMAPINFO */			byte[] bmi = null;			BITMAPINFOHEADER bmiHeader = null;			if (!isDib) {				bmiHeader = new BITMAPINFOHEADER();				bmiHeader.biSize = BITMAPINFOHEADER.sizeof;				bmiHeader.biWidth = width;				bmiHeader.biHeight = -height;				bmiHeader.biPlanes = 1;				bmiHeader.biBitCount = (short)depth;				bmiHeader.biCompression = OS.BI_RGB;				bmi = new byte[BITMAPINFOHEADER.sizeof + numColors * 4];				OS.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof);			}						/* Create the DC and select the bitmap */			int hBitmapDC = OS.CreateCompatibleDC(hDC);			int hOldBitmap = OS.SelectObject(hBitmapDC, handle);			/* Select the palette if necessary */			int oldPalette = 0;			if (!isDib && depth <= 8) {				int hPalette = device.hPalette;				if (hPalette != 0) {					oldPalette = OS.SelectPalette(hBitmapDC, hPalette, false);					OS.RealizePalette(hBitmapDC);				}			}			/* Find the size of the image and allocate data */			int imageSize;			if (isDib) {				imageSize = dib.biSizeImage;			} else {				/* Call with null lpBits to get the image size */				if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);				OS.GetDIBits(hBitmapDC, handle, 0, height, 0, bmi, OS.DIB_RGB_COLORS);				OS.MoveMemory(bmiHeader, bmi, BITMAPINFOHEADER.sizeof);				imageSize = bmiHeader.biSizeImage;			}			byte[] data = new byte[imageSize];			/* Get the bitmap data */			if (isDib) {				if (OS.IsWinCE && this.handle != handle) {					/* get image data from the temporary DIB */					OS.MoveMemory(data, dib.bmBits, imageSize);				} else {					OS.MoveMemory(data, bm.bmBits, imageSize);				}			} else {				int hHeap = OS.GetProcessHeap();				int lpvBits = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, imageSize);						if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);				OS.GetDIBits(hBitmapDC, handle, 0, height, lpvBits, bmi, OS.DIB_RGB_COLORS);				OS.MoveMemory(data, lpvBits, imageSize);				OS.HeapFree(hHeap, 0, lpvBits);			}			/* Calculate the palette */			PaletteData palette = null;			if (depth <= 8) {				RGB[] rgbs = new RGB[numColors];				if (isDib) {					if (OS.IsWinCE) {						/* 						* Feature on WinCE.  GetDIBColorTable is not supported.						* The workaround is to set a pixel to the desired						* palette index and use getPixel to get the corresponding						* RGB value.						*/						int red = 0, green = 0, blue = 0;						byte[] pBits = new byte[1];						OS.MoveMemory(pBits, bm.bmBits, 1);						byte oldValue = pBits[0];									int mask = (0xFF << (8 - bm.bmBitsPixel)) & 0x00FF;						for (int i = 0; i < numColors; i++) {							pBits[0] = (byte)((i << (8 - bm.bmBitsPixel)) | (pBits[0] & ~mask));							OS.MoveMemory(bm.bmBits, pBits, 1);							int color = OS.GetPixel(hBitmapDC, 0, 0);							blue = (color & 0xFF0000) >> 16;							green = (color & 0xFF00) >> 8;							red = color & 0xFF;							rgbs[i] = new RGB(red, green, blue);						}		       			pBits[0] = oldValue;			       		OS.MoveMemory(bm.bmBits, pBits, 1);									} else {						byte[] colors = new byte[numColors * 4];						OS.GetDIBColorTable(hBitmapDC, 0, numColors, colors);						int colorIndex = 0;						for (int i = 0; i < rgbs.length; i++) {							rgbs[i] = new RGB(colors[colorIndex + 2] & 0xFF, colors[colorIndex + 1] & 0xFF, colors[colorIndex] & 0xFF);							colorIndex += 4;						}					}				} else {					int srcIndex = BITMAPINFOHEADER.sizeof;					for (int i = 0; i < numColors; i++) {						rgbs[i] = new RGB(bmi[srcIndex + 2] & 0xFF, bmi[srcIndex + 1] & 0xFF, bmi[srcIndex] & 0xFF);						srcIndex += 4;					}				}				palette = new PaletteData(rgbs);			} else if (depth == 16) {				palette = new PaletteData(0x7C00, 0x3E0, 0x1F);			} else if (depth == 24) {				palette = new PaletteData(0xFF, 0xFF00, 0xFF0000);			} else if (depth == 32) {				palette = new PaletteData(0xFF00, 0xFF0000, 0xFF000000);			} else {				SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);			}			/* Clean up */			OS.SelectObject(hBitmapDC, hOldBitmap);			if (oldPalette != 0) {				OS.SelectPalette(hBitmapDC, oldPalette, false);				OS.RealizePalette(hBitmapDC);			}			if (OS.IsWinCE) {				if (handle != this.handle) {					/* free temporary DIB */					OS.DeleteObject (handle);									}			}			OS.DeleteDC(hBitmapDC);						/* Release the HDC for the device */			device.internal_dispose_GC(hDC, null);						/* Construct and return the ImageData */			ImageData imageData = new ImageData(width, height, depth, palette, 4, data);			imageData.transparentPixel = this.transparentPixel;			imageData.alpha = alpha;			if (alpha == -1 && alphaData != null) {				imageData.alphaData = new byte[alphaData.length];				System.arraycopy(alphaData, 0, imageData.alphaData, 0, alphaData.length);			}			return imageData;		}		default:			SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT);			return null;	}}/** * Returns an integer hash code for the receiver. Any two  * objects which return <code>true</code> when passed to  * <code>equals</code> must return the same value for this * method. * * @return the receiver's hash * * @see #equals */public int hashCode () {	return handle;}void init(Device device, int width, int height) {	if (width <= 0 || height <= 0) {		SWT.error (SWT.ERROR_INVALID_ARGUMENT);	}	this.device = device;	type = SWT.BITMAP;	int hDC = device.internal_new_GC(null);	handle = OS.CreateCompatibleBitmap(hDC, width, height);	if (handle != 0) {		int memDC = OS.CreateCompatibleDC(hDC);		int hOldBitmap = OS.SelectObject(memDC, handle);		OS.PatBlt(memDC, 0, 0, width, height, OS.PATCOPY);		OS.SelectObject(memDC, hOldBitmap);		OS.DeleteDC(memDC);	}	device.internal_dispose_GC(hDC, null);	if (handle == 0) {		SWT.error(SWT.ERROR_NO_HANDLES, null, device.getLastError());	}}/** * Feature in WinCE.  GetIconInfo is not available in WinCE. * The workaround is to cache the object ImageData for images * of type SWT.ICON. The bitmaps hbmMask and hbmColor can then * be reconstructed by using our version of getIconInfo. * This function takes an ICONINFO object and sets the fields * hbmMask and hbmColor with the corresponding bitmaps it has * created. * Note.  These bitmaps must be freed - as they would have to be * if the regular GetIconInfo had been used. */static void GetIconInfo(Image image, ICONINFO info) {	int[] result = init(image.device, null, image.data);	info.hbmColor = result[0];	info.hbmMask = result[1];}static int[] init(Device device, Image image, ImageData i) {	if (image != null) image.device = device;		/*	 * BUG in Windows 98:	 * A monochrome DIBSection will display as solid black	 * on Windows 98 machines, even though it contains the	 * correct data. The fix is to convert 1-bit ImageData	 * into 4-bit ImageData before creating the image.	 */	/* Windows does not support 2-bit images. Convert to 4-bit image. */	if ((i.depth == 1 && i.getTransparencyType() != SWT.TRANSPARENCY_MASK) || i.depth == 2) {		ImageData img = new ImageData(i.width, i.height, 4, i.palette);		ImageData.blit(ImageData.BLIT_SRC, 			i.data, i.depth, i.bytesPerLine, i.getByteOrder(), 0, 0, i.width, i.height, null, null, null,			ImageData.ALPHA_OPAQUE, null, 0, 0, 0,			img.data, img.depth, img.bytesPerLine, i.getByteOrder(), 0, 0, img.width, img.height, null, null, null, 			false, false);		img.transparentPixel = i.transparentPixel;		img.maskPad = i.maskPad;		img.maskData = i.maskData;		img.alpha = i.alpha;		img.alphaData = i.alphaData;		i = img;	}	/*	 * Windows supports 16-bit mask of (0x7C00, 0x3E0, 0x1F),	 * 24-bit mask of (0xFF0000, 0xFF00, 0xFF) and 32-bit mask	 * (0x00FF0000, 0x0000FF00, 0x000000FF) as documented in 	 * MSDN BITMAPINFOHEADER.  Make sure the image is 	 * Windows-supported.	 */	/*	* Note on WinCE.  CreateDIBSection requires the biCompression	* field of the BITMAPINFOHEADER to be set to BI_BITFIELDS for	* 16 and 32 bit direct images (see MSDN for CreateDIBSection).	* In this case, the color mask can be set to any value.  For	* consistency, it is set to the same mask used by non WinCE	* platforms in BI_RGB mode.	*/	if (i.palette.isDirect) {		final PaletteData palette = i.palette;		final int redMask = palette.redMask;		final int greenMask = palette.greenMask;		final int blueMask = palette.blueMask;		int newDepth = i.depth;		int newOrder = ImageData.MSB_FIRST;		PaletteData newPalette = null;		switch (i.depth) {			case 8:				newDepth = 16;				newOrder = ImageData.LSB_FIRST;				newPalette = new PaletteData(0x7C00, 0x3E0, 0x1F);				break;			case 16:				newOrder = ImageData.LSB_FIRST;				if (!(redMask == 0x7C00 && greenMask == 0x3E0 && blueMask == 0x1F)) {					newPalette = new PaletteData(0x7C00, 0x3E0, 0x1F);				}				break;			case 24: 				if (!(redMask == 0xFF && greenMask == 0xFF00 && blueMask == 0xFF0000)) {					newPalette = new PaletteData(0xFF, 0xFF00, 0xFF0000);				}				break;			case 32: 				if (!(redMask == 0xFF00 && greenMask == 0xFF0000 && blueMask == 0xFF000000)) {					newPalette = new PaletteData(0xFF00, 0xFF0000, 0xFF000000);				}				break;			default:				SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);		}		if (newPalette != null) {			ImageData img = new ImageData(i.width, i.height, newDepth, newPalette);			ImageData.blit(ImageData.BLIT_SRC, 					i.data, i.depth, i.bytesPerLine, i.getByteOrder(), 0, 0, i.width, i.height, redMask, greenMask, blueMask,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品综合在线视频| 中文字幕日韩一区| 久久精品网站免费观看| 久久综合色婷婷| 综合在线观看色| 香蕉av福利精品导航| 国产伦精品一区二区三区在线观看| 成人免费毛片app| 欧美日韩中文一区| 精品国产青草久久久久福利| 日韩久久一区二区| 日韩精品高清不卡| 成人福利视频在线| 欧美酷刑日本凌虐凌虐| 久久久99精品免费观看不卡| 亚洲柠檬福利资源导航| 麻豆91精品91久久久的内涵| av一二三不卡影片| 日韩欧美电影一区| 亚洲青青青在线视频| 日韩av电影天堂| www.亚洲免费av| 日韩视频免费观看高清在线视频| 国产精品剧情在线亚洲| 久久成人18免费观看| 色一情一伦一子一伦一区| 精品第一国产综合精品aⅴ| 亚洲精品免费电影| 国产一区亚洲一区| 正在播放一区二区| 综合在线观看色| 精品亚洲成a人在线观看| 色噜噜夜夜夜综合网| 久久久久国产精品人| 性久久久久久久久| 色香色香欲天天天影视综合网| 精品不卡在线视频| 亚洲va中文字幕| 色综合天天综合色综合av| 亚洲精品一区二区在线观看| 亚洲bdsm女犯bdsm网站| 99久久综合精品| 久久精品亚洲精品国产欧美| 日本在线不卡一区| 欧美日韩大陆一区二区| 一色屋精品亚洲香蕉网站| 国产一区二区不卡老阿姨| 欧美日本精品一区二区三区| 亚洲精品免费在线观看| 9i在线看片成人免费| 国产亚洲欧美日韩日本| 精品一区二区三区久久| 91精品国产91久久综合桃花| 亚洲香肠在线观看| 一本色道久久综合狠狠躁的推荐| 久久日韩精品一区二区五区| 美女在线视频一区| 欧美日韩国产另类一区| 亚洲精品日韩一| 91在线免费看| 日韩理论片一区二区| av电影天堂一区二区在线观看| 久久精品一区二区三区不卡牛牛| 免费成人在线视频观看| 91精品国产高清一区二区三区蜜臀| 亚洲一区在线观看免费| 色综合久久久久久久久久久| 中文字幕一区二区三区四区不卡 | 欧美一三区三区四区免费在线看 | 91精品国产入口| 视频一区二区不卡| 7777精品伊人久久久大香线蕉| 夜夜夜精品看看| 在线观看欧美黄色| 亚洲自拍偷拍九九九| 在线观看日韩精品| 午夜免费久久看| 这里只有精品免费| 久久精品国产秦先生| 精品久久久久久最新网址| 精品一区二区三区香蕉蜜桃 | 国产一区二区三区蝌蚪| 久久久久99精品国产片| 国产一区二区精品久久99| 久久久久久日产精品| 国产凹凸在线观看一区二区| 国产欧美va欧美不卡在线| 懂色av一区二区三区蜜臀 | 色天使色偷偷av一区二区| 亚洲精选视频免费看| 欧美视频完全免费看| 日韩精品欧美精品| 精品国产乱码久久久久久久| 国产一区二区按摩在线观看| 国产精品嫩草99a| 日本道在线观看一区二区| 亚洲综合区在线| 日韩精品在线看片z| 国产精品夜夜嗨| 一色桃子久久精品亚洲| 欧美视频一区二区在线观看| 美腿丝袜亚洲色图| 国产精品水嫩水嫩| 欧美在线free| 久久精品国产一区二区| 中文字幕免费不卡在线| 欧美亚洲国产一区二区三区| 日本91福利区| 欧美激情一区三区| 91福利资源站| 精品综合免费视频观看| 国产精品的网站| 欧美一区二区三区四区五区 | 中文字幕av一区二区三区| 99re免费视频精品全部| 天天综合色天天综合| 亚洲精品一区二区三区在线观看| 99re热视频精品| 毛片不卡一区二区| 综合婷婷亚洲小说| 日韩亚洲欧美成人一区| www.视频一区| 毛片av一区二区三区| 日韩美女精品在线| 日韩午夜激情免费电影| 成人av集中营| 日本特黄久久久高潮| 一色屋精品亚洲香蕉网站| 日韩一区二区三区四区五区六区| 99久久婷婷国产精品综合| 人人狠狠综合久久亚洲| 亚洲欧美日韩国产另类专区| 欧美r级电影在线观看| 色婷婷综合久久| 国产毛片精品视频| 亚洲国产成人91porn| 国产欧美一区二区三区在线老狼| 欧美性xxxxxxxx| 国产传媒一区在线| 午夜精品久久久久久久| 国产精品婷婷午夜在线观看| 日韩女优av电影在线观看| 色婷婷av久久久久久久| 国产成人精品一区二区三区网站观看 | 秋霞av亚洲一区二区三| 亚洲色图清纯唯美| 久久久久久久综合| 777xxx欧美| 欧美性一二三区| 91视视频在线直接观看在线看网页在线看| 欧美国产1区2区| 欧美一区二区在线视频| 欧美大片在线观看| 欧美私人免费视频| 岛国av在线一区| 美腿丝袜亚洲三区| 亚洲第一精品在线| 亚洲激情中文1区| 国产精品久久久久久久久果冻传媒| 日韩精品一区二区在线观看| 欧美亚洲禁片免费| 色婷婷亚洲一区二区三区| 成人精品免费看| 国产精品18久久久久久久久久久久| 日韩和欧美一区二区三区| 一区二区在线观看不卡| 中文字幕一区二区三区av| 国产网站一区二区| 亚洲精品在线一区二区| 日韩欧美高清一区| 日韩精品中文字幕在线一区| 91精品国产综合久久久蜜臀粉嫩| 欧美日韩不卡在线| 精品视频一区二区不卡| 欧美亚一区二区| 欧美日韩亚洲高清一区二区| 欧美专区日韩专区| 在线观看精品一区| 在线视频欧美区| 欧美综合欧美视频| 欧美图区在线视频| 欧美日韩国产一级| 欧美精品第1页| 欧美一区二区私人影院日本| 制服丝袜一区二区三区| 欧美一级高清片| 日韩一级二级三级精品视频| 日韩欧美视频一区| 欧美精品一区二区三区很污很色的 | 国产婷婷色一区二区三区四区 | 成人爱爱电影网址| 99在线精品免费| 色琪琪一区二区三区亚洲区| 色综合久久88色综合天天| 91黄色激情网站| 欧美日本在线看| 日韩一区二区三区三四区视频在线观看 | 日韩久久一区二区| 亚洲综合久久av| 天堂久久久久va久久久久|