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

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

?? image.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
						OS.BitBlt(bwDC, 0, 0, r.width, r.height, hdcSource, 0, r.height, OS.SRCCOPY);					} else {						OS.SelectObject(hdcSource, iconInfo.hbmColor);						OS.BitBlt(bwDC, 0, 0, r.width, r.height, hdcSource, 0, 0, OS.SRCCOPY);					}					/* Paint the destination rectangle in grey */					rect = new RECT();					rect.left = 0;					rect.top = 0;					rect.right = r.width;					rect.bottom = r.height;					hOldBmp = OS.SelectObject(hdcBmp, newHbmp);					OS.FillRect(hdcBmp, rect, OS.GetSysColorBrush(OS.COLOR_3DFACE));					/*					 * BitBlt the black bits in the monochrome bitmap into					 * COLOR_3DHILIGHT bits in the destination DC.					 * The magic ROP comes from Charles Petzold's book					 */					hb = OS.CreateSolidBrush(OS.GetSysColor(OS.COLOR_3DSHADOW));					oldBrush = OS.SelectObject(hdcBmp, hb);					OS.BitBlt(hdcBmp, 0, 0, r.width, r.height, bwDC, 0, 0, 0xB8074A);					/* Invert mask into hdcBw */					OS.BitBlt(bwDC, 0, 0, r.width, r.height, hdcMask, 0, 0, OS.NOTSRCCOPY);					/* Select black brush into destination */					hb = OS.CreateSolidBrush(0);					OS.DeleteObject(OS.SelectObject(hdcBmp, hb));					/*					 * Copy black bits from monochrome bitmap into black bits in the					 * destination DC.					 */					OS.BitBlt(hdcBmp, 0, 0, r.width, r.height, bwDC, 0, 0, 0xB8074A);					OS.DeleteObject(OS.SelectObject(hdcBmp, oldBrush));					/* Free resources */					OS.SelectObject(hdcSource, hOldSrc);					OS.DeleteDC(hdcSource);					OS.SelectObject(bwDC, hOldBw);					OS.DeleteDC(bwDC);					OS.SelectObject(hdcBmp, hOldBmp);					OS.DeleteDC(hdcBmp);					OS.SelectObject(hdcMask, hOldMask);					OS.DeleteDC(hdcMask);					OS.DeleteObject(hbmBW);										/* Release the HDC for the device */					device.internal_dispose_GC(hDC, null);								/* Create the new iconinfo */					ICONINFO newIconInfo = new ICONINFO();					newIconInfo.fIcon = iconInfo.fIcon;					newIconInfo.hbmMask = newHmask;					newIconInfo.hbmColor = newHbmp;					/* Create the new icon */					handle = OS.CreateIconIndirect(newIconInfo);					if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);					/* Free bitmaps */					OS.DeleteObject(newHbmp);					OS.DeleteObject(newHmask);					if (iconInfo.hbmColor != 0)						OS.DeleteObject(iconInfo.hbmColor);					OS.DeleteObject(iconInfo.hbmMask);					break;				default:					SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT);			}			if (device.tracking) device.new_Object(this);				return;		}		case SWT.IMAGE_GRAY: {			Rectangle r = srcImage.getBounds();			ImageData data = srcImage.getImageData();			PaletteData palette = data.palette;			ImageData newData = data;			if (!palette.isDirect) {				/* Convert the palette entries to gray. */				RGB [] rgbs = palette.getRGBs();				for (int i=0; i<rgbs.length; i++) {					if (data.transparentPixel != i) {						RGB color = rgbs [i];						int red = color.red;						int green = color.green;						int blue = color.blue;						int intensity = (red+red+green+green+green+green+green+blue) >> 3;						color.red = color.green = color.blue = intensity;					}				}				newData.palette = new PaletteData(rgbs);			} else {				/* Create a 8 bit depth image data with a gray palette. */				RGB[] rgbs = new RGB[256];				for (int i=0; i<rgbs.length; i++) {					rgbs[i] = new RGB(i, i, i);				}				newData = new ImageData(r.width, r.height, 8, new PaletteData(rgbs));				newData.maskData = data.maskData;				newData.maskPad = data.maskPad;				/* Convert the pixels. */				int[] scanline = new int[r.width];				int redMask = palette.redMask;				int greenMask = palette.greenMask;				int blueMask = palette.blueMask;				int redShift = palette.redShift;				int greenShift = palette.greenShift;				int blueShift = palette.blueShift;				for (int y=0; y<r.height; y++) {					int offset = y * newData.bytesPerLine;					data.getPixels(0, y, r.width, scanline, 0);					for (int x=0; x<r.width; x++) {						int pixel = scanline[x];						int red = pixel & redMask;						red = (redShift < 0) ? red >>> -redShift : red << redShift;						int green = pixel & greenMask;						green = (greenShift < 0) ? green >>> -greenShift : green << greenShift;						int blue = pixel & blueMask;						blue = (blueShift < 0) ? blue >>> -blueShift : blue << blueShift;						newData.data[offset++] =							(byte)((red+red+green+green+green+green+green+blue) >> 3);					}				}			}			init (device, newData);			if (device.tracking) device.new_Object(this);				return;		}		default:			SWT.error(SWT.ERROR_INVALID_ARGUMENT);	}}/** * Constructs an empty instance of this class with the * width and height of the specified rectangle. The result * may be drawn upon by creating a GC and using any of its * drawing operations, as shown in the following example: * <pre> *    Image i = new Image(device, boundsRectangle); *    GC gc = new GC(i); *    gc.drawRectangle(0, 0, 50, 50); *    gc.dispose(); * </pre> * <p> * Note: Some platforms may have a limitation on the size * of image that can be created (size depends on width, height, * and depth). For example, Windows 95, 98, and ME do not allow * images larger than 16M. * </p> * * @param device the device on which to create the image * @param bounds a rectangle specifying the image's width and height (must not be null) * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> *    <li>ERROR_NULL_ARGUMENT - if the bounds rectangle is null</li> *    <li>ERROR_INVALID_ARGUMENT - if either the rectangle's width or height is negative</li> * </ul> * @exception SWTError <ul> *    <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> * </ul> */public Image(Device device, Rectangle bounds) {	if (device == null) device = Device.getDevice();	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	init(device, bounds.width, bounds.height);	if (device.tracking) device.new_Object(this);	}/** * Constructs an instance of this class from the given * <code>ImageData</code>. * * @param device the device on which to create the image * @param data the image data to create the image from (must not be null) * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> *    <li>ERROR_NULL_ARGUMENT - if the image data is null</li> * </ul> * @exception SWTError <ul> *    <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the ImageData is not supported</li> * </ul> */public Image(Device device, ImageData data) {	if (device == null) device = Device.getDevice();	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	init(device, data);	if (device.tracking) device.new_Object(this);	}/** * Constructs an instance of this class, whose type is  * <code>SWT.ICON</code>, from the two given <code>ImageData</code> * objects. The two images must be the same size, and the mask image * must have a color depth of 1. Pixel transparency in either image * will be ignored. If either image is an icon to begin with, an * exception is thrown. * <p> * The mask image should contain white wherever the icon is to be visible, * and black wherever the icon is to be transparent. In addition, * the source image should contain black wherever the icon is to be * transparent. * </p> * * @param device the device on which to create the icon * @param source the color data for the icon * @param mask the mask data for the icon * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> *    <li>ERROR_NULL_ARGUMENT - if either the source or mask is null </li> *    <li>ERROR_INVALID_ARGUMENT - if source and mask are different sizes or *          if the mask is not monochrome, or if either the source or mask *          is already an icon</li> * </ul> * @exception SWTError <ul> *    <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> * </ul> */public Image(Device device, ImageData source, ImageData mask) {	if (device == null) device = Device.getDevice();	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	if (source == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	if (mask == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	if (source.width != mask.width || source.height != mask.height) {		SWT.error(SWT.ERROR_INVALID_ARGUMENT);	}	if (mask.depth != 1) {		/*		 * Feature in Windows. 1-bit DIB sections are buggy on Win98, so we		 * create 4-bit DIBs when given a 1-bit ImageData. In order to allow		 * users to draw on the masks, we must also support 4-bit masks in		 * icon creation by converting them into 1-bit masks.		 */		if (mask.depth != 4) SWT.error(SWT.ERROR_INVALID_ARGUMENT);		PaletteData palette = new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255,255,255)});		ImageData tempMask = new ImageData(mask.width, mask.height, 1, palette);		/* Find index of black in mask palette */		RGB[] rgbs = mask.getRGBs();		int blackIndex = 0;		while (blackIndex < rgbs.length) {			if (rgbs[blackIndex].equals(palette.colors[0])) break;			blackIndex++;		}		if (blackIndex == rgbs.length) SWT.error(SWT.ERROR_INVALID_ARGUMENT);		int[] pixels = new int[mask.width];		for (int y = 0; y < mask.height; y++) {			mask.getPixels(0, y, mask.width, pixels, 0);			for (int i = 0; i < pixels.length; i++) {				if (pixels[i] == blackIndex) {					pixels[i] = 0;				} else {					pixels[i] = 1;				}			}			tempMask.setPixels(0, y, mask.width, pixels, 0);		}		mask = tempMask;	}	init(device, this, source, mask);	if (device.tracking) device.new_Object(this);	}/** * Constructs an instance of this class by loading its representation * from the specified input stream. Throws an error if an error * occurs while loading the image, or if the result is an image * of an unsupported type. * <p> * This constructor is provided for convenience when loading a single * image only. If the stream contains multiple images, only the first * one will be loaded. To load multiple images, use  * <code>ImageLoader.load()</code>. * </p><p> * This constructor may be used to load a resource as follows: * </p> * <pre> *     new Image(device, clazz.getResourceAsStream("file.gif")); * </pre> * * @param device the device on which to create the image * @param stream the input stream to load the image from * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> *    <li>ERROR_NULL_ARGUMENT - if the stream is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> *    <li>ERROR_IO - if an IO error occurs while reading data</li> *    <li>ERROR_UNSUPPORTED_DEPTH - if the InputStream describes an image with an unsupported depth</li> * </ul> * @exception SWTError <ul> *    <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> * </ul> */public Image (Device device, InputStream stream) {	if (device == null) device = Device.getDevice();	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	init(device, new ImageData(stream));	if (device.tracking) device.new_Object(this);	}/** * Constructs an instance of this class by loading its representation * from the file with the specified name. Throws an error if an error * occurs while loading the image, or if the result is an image * of an unsupported type. * <p> * This constructor is provided for convenience when loading * a single image only. If the specified file contains * multiple images, only the first one will be used. * * @param device the device on which to create the image * @param filename the name of the file to load the image from * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> *    <li>ERROR_NULL_ARGUMENT - if the file name is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> *    <li>ERROR_IO - if an IO error occurs while reading data</li> *    <li>ERROR_UNSUPPORTED_DEPTH - if the image file has an unsupported depth</li> * </ul> * @exception SWTError <ul> *    <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> * </ul> */public Image (Device device, String filename) {	if (device == null) device = Device.getDevice();	if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	init(device, new ImageData(filename));	if (device.tracking) device.new_Object(this);	}/**  * Create a DIB from a DDB without using GetDIBits. Note that  * the DDB should not be selected into a HDC. */int createDIBFromDDB(int hDC, int hBitmap, int width, int height) {		/* Determine the DDB depth */	int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);	int planes = OS.GetDeviceCaps (hDC, OS.PLANES);	int depth = bits * planes;		/* Determine the DIB palette */	boolean isDirect = depth > 8;	RGB[] rgbs = null;	if (!isDirect) {		int numColors = 1 << depth;		byte[] logPalette = new byte[4 * numColors];		OS.GetPaletteEntries(device.hPalette, 0, numColors, logPalette);		rgbs = new RGB[numColors];		for (int i = 0; i < numColors; i++) {			rgbs[i] = new RGB(logPalette[i] & 0xFF, logPalette[i + 1] & 0xFF, logPalette[i + 2] & 0xFF);		}	}		boolean useBitfields = OS.IsWinCE && (depth == 16 || depth == 32);	BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();	bmiHeader.biSize = BITMAPINFOHEADER.sizeof;	bmiHeader.biWidth = width;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品亚洲一区二区三区在线 | 午夜精品久久久久影视| 亚洲欧美日韩电影| 喷水一区二区三区| 一本一道综合狠狠老| 久久理论电影网| 午夜不卡在线视频| 色婷婷亚洲一区二区三区| 久久久五月婷婷| 日本中文字幕一区二区有限公司| 成人免费视频播放| 日韩你懂的在线播放| 亚洲一区二区美女| 91视频观看免费| 中文字幕精品—区二区四季| 免费在线观看一区二区三区| 99精品1区2区| 国产日韩精品一区二区浪潮av| 亚洲欧美日韩电影| av亚洲精华国产精华精华 | 99精品热视频| 国产亚洲精品中文字幕| 亚洲一区二区视频在线| 色综合激情五月| 国产日韩欧美精品一区| 久久国产尿小便嘘嘘尿| 欧美日韩一区二区三区在线看| 国产精品嫩草99a| 国内欧美视频一区二区| 欧美高清精品3d| 水野朝阳av一区二区三区| 成人av中文字幕| 中文字幕+乱码+中文字幕一区| 久久99精品久久只有精品| 欧美电影在哪看比较好| 成人欧美一区二区三区白人 | 91网页版在线| 国产欧美日韩不卡免费| 大白屁股一区二区视频| 精品日韩欧美一区二区| 久久99热99| 欧美大胆一级视频| 国产精品18久久久久久久久| 欧美一区二区二区| 激情六月婷婷久久| 久久毛片高清国产| 日本欧美在线看| 欧美一区二区视频在线观看2020| 亚洲成在人线免费| 在线成人午夜影院| 秋霞电影一区二区| 欧美精品一区二区三区一线天视频| 石原莉奈在线亚洲二区| 精品国产成人在线影院 | 亚洲欧美中日韩| 99re这里只有精品6| 国产精品福利一区二区| 色综合 综合色| 一区二区三区四区国产精品| 欧美影视一区二区三区| 亚洲电影一区二区三区| 日韩三区在线观看| 国产一区二区免费视频| 国产精品激情偷乱一区二区∴| 成人av动漫网站| 人人精品人人爱| 久久久国产精华| 欧美日韩大陆一区二区| 日本va欧美va欧美va精品| 国产亚洲1区2区3区| 99re8在线精品视频免费播放| 亚洲va欧美va人人爽| 日韩欧美三级在线| 狠狠色丁香婷婷综合| 亚洲精品视频在线看| 欧美精品一卡二卡| 成年人国产精品| 偷拍一区二区三区四区| 国产喷白浆一区二区三区| 色婷婷综合久色| 国产综合色视频| 亚洲另类在线制服丝袜| 精品久久久久久久久久久院品网 | 欧美xxxx在线观看| 一本到一区二区三区| 蜜臀av一区二区| 一级日本不卡的影视| 日韩一级片网址| 欧美综合久久久| 精品一区二区三区免费视频| 亚洲图片自拍偷拍| 国产亚洲精久久久久久| 884aa四虎影成人精品一区| 成人性生交大片免费看中文| 日本午夜精品视频在线观看| 欧美高清在线视频| 亚洲精品一区二区三区四区高清| 成人动漫一区二区在线| 久久99最新地址| 亚洲自拍与偷拍| 亚洲男人电影天堂| 国产性色一区二区| www成人在线观看| 欧美日韩激情一区二区| 日本久久精品电影| 丁香婷婷综合五月| 国产乱码精品一区二区三| 亚洲www啪成人一区二区麻豆| 精品久久久久久久久久久久久久久| 色菇凉天天综合网| 捆绑紧缚一区二区三区视频| 午夜av一区二区三区| 樱桃视频在线观看一区| 亚洲蜜臀av乱码久久精品| 国产性色一区二区| 国产欧美日韩亚州综合 | 久久精品国产网站| 天堂影院一区二区| 日韩国产高清在线| 亚洲国产精品一区二区www在线| 一区二区免费看| 亚洲综合在线视频| 亚洲日本中文字幕区| 久久久久久久综合日本| 精品剧情在线观看| 欧美成人bangbros| 日韩欧美一级精品久久| 91久久精品一区二区| 色综合色综合色综合色综合色综合 | 一区二区三区产品免费精品久久75| 精品久久人人做人人爱| 欧美国产日韩在线观看| 欧美精品一区二区三区在线播放| 精品国产一区二区国模嫣然| 在线成人免费观看| 久久久亚洲精华液精华液精华液 | 成人免费小视频| 国产精品国产自产拍高清av| 亚洲免费看黄网站| 亚洲国产日韩在线一区模特 | 欧美午夜电影网| 欧美区一区二区三区| 日韩午夜在线影院| 久久久综合九色合综国产精品| 国产精品久久久久久久浪潮网站| 日韩欧美亚洲国产精品字幕久久久| www激情久久| 久久婷婷成人综合色| 亚洲色图清纯唯美| 亚洲精品videosex极品| 亚洲一区二区三区免费视频| 久久精品国产第一区二区三区| 国产一区二区精品久久99| 色综合久久中文字幕综合网| 欧美日韩一区二区三区视频| 精品美女一区二区| 中文字幕一区二区三区蜜月| 日韩制服丝袜先锋影音| 黑人巨大精品欧美一区| 99久久精品国产毛片| 91.麻豆视频| 国产精品超碰97尤物18| 亚洲午夜久久久| 高潮精品一区videoshd| 欧美午夜精品一区二区蜜桃| 久久久久久久久久久久电影| 亚洲乱码国产乱码精品精可以看 | 欧美综合在线视频| 欧美一级黄色录像| 亚洲一区二区三区四区不卡| 国产午夜亚洲精品午夜鲁丝片| 婷婷国产在线综合| 五月婷婷欧美视频| 成人91在线观看| 欧美日韩美少妇| 亚洲人成在线播放网站岛国| 亚洲国产中文字幕| fc2成人免费人成在线观看播放| 日韩一区二区视频| 亚洲免费观看在线视频| 成人妖精视频yjsp地址| 日韩写真欧美这视频| 日韩激情视频在线观看| 成人av手机在线观看| 久久久精品免费网站| 亚洲成人7777| 欧美在线一区二区三区| 久久久美女艺术照精彩视频福利播放| 日韩和欧美一区二区三区| 粉嫩一区二区三区性色av| 久久综合色播五月| 婷婷综合在线观看| 欧美日韩在线免费视频| 日本一区二区高清| 国产精品18久久久| 欧美色中文字幕| 亚洲福利一区二区| 成人av资源网站| 国产精品午夜久久| 99久久国产综合色|国产精品|