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

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

?? imagedata.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html *  * Contributors: *     IBM Corporation - initial API and implementation *******************************************************************************/package org.eclipse.swt.graphics;import java.io.*;import org.eclipse.swt.*;import org.eclipse.swt.internal.CloneableCompatibility;/** * Instances of this class are device-independent descriptions * of images. They are typically used as an intermediate format * between loading from or writing to streams and creating an  * <code>Image</code>. * <p> * Note that the public fields <code>x</code>, <code>y</code>,  * <code>disposalMethod</code> and <code>delayTime</code> are * typically only used when the image is in a set of images used * for animation. * </p> * * @see Image * @see ImageLoader */public final class ImageData implements CloneableCompatibility {		/**	 * The width of the image, in pixels.	 */	public int width;	/**	 * The height of the image, in pixels.	 */	public int height;	/**	 * The color depth of the image, in bits per pixel.	 * <p>	 * Note that a depth of 8 or less does not necessarily	 * mean that the image is palette indexed, or	 * conversely that a depth greater than 8 means that	 * the image is direct color.  Check the associated	 * PaletteData's isDirect field for such determinations.	 */	public int depth;	/**	 * The scanline padding.	 * <p>	 * If one scanline of the image is not a multiple of	 * this number, it will be padded with zeros until it is.	 * </p>	 */	public int scanlinePad;	/**	 * The number of bytes per scanline.	 * <p>	 * This is a multiple of the scanline padding.	 * </p>	 */	public int bytesPerLine;	/**	 * The pixel data of the image.	 * <p>	 * Note that for 16 bit depth images the pixel data is stored	 * in least significant byte order; however, for 24bit and	 * 32bit depth images the pixel data is stored in most	 * significant byte order.	 * </p>	 */	public byte[] data;	/**	 * The color table for the image.	 */	public PaletteData palette;	/**	 * The transparent pixel.	 * <p>	 * Pixels with this value are transparent.	 * </p><p>	 * The default is -1 which means 'no transparent pixel'.	 * </p>	 */	public int transparentPixel;	/**	 * An icon-specific field containing the data from the icon mask.	 * <p>	 * This is a 1 bit bitmap stored with the most significant	 * bit first.  The number of bytes per scanline is	 * '((width + 7) / 8 + (maskPad - 1)) / maskPad * maskPad'.	 * </p><p>	 * The default is null which means 'no transparency mask'.	 * </p>	 */	public byte[] maskData;	/**	 * An icon-specific field containing the scanline pad of the mask.	 * <p>	 * If one scanline of the transparency mask is not a	 * multiple of this number, it will be padded with zeros until	 * it is.	 * </p>	 */	public int maskPad;		/**	 * The alpha data of the image.	 * <p>	 * Every pixel can have an <em>alpha blending</em> value that	 * varies from 0, meaning fully transparent, to 255 meaning	 * fully opaque.  The number of bytes per scanline is	 * 'width'.	 * </p>	 */	public byte[] alphaData;		/**	 * The global alpha value to be used for every pixel.	 * <p>	 * If this value is set, the <code>alphaData</code> field	 * is ignored and when the image is rendered each pixel	 * will be blended with the background an amount	 * proportional to this value.	 * </p><p>	 * The default is -1 which means 'no global alpha value'	 * </p>	 */	public int alpha;	/**	 * The type of file from which the image was read.	 * 	 * It is expressed as one of the following values:	 * <dl>	 * <dt><code>IMAGE_BMP</code></dt>	 * <dd>Windows BMP file format, no compression</dd>	 * <dt><code>IMAGE_BMP_RLE</code></dt>	 * <dd>Windows BMP file format, RLE compression if appropriate</dd>	 * <dt><code>IMAGE_GIF</code></dt>	 * <dd>GIF file format</dd>	 * <dt><code>IMAGE_ICO</code></dt>	 * <dd>Windows ICO file format</dd>	 * <dt><code>IMAGE_JPEG</code></dt>	 * <dd>JPEG file format</dd>	 * <dt><code>IMAGE_PNG</code></dt>	 * <dd>PNG file format</dd>	 * </dl>	 */	public int type;	/**	 * The x coordinate of the top left corner of the image	 * within the logical screen (this field corresponds to	 * the GIF89a Image Left Position value).	 */	public int x;	/**	 * The y coordinate of the top left corner of the image	 * within the logical screen (this field corresponds to	 * the GIF89a Image Top Position value).	 */	public int y;	/**	 * A description of how to dispose of the current image	 * before displaying the next.	 * 	 * It is expressed as one of the following values:	 * <dl>	 * <dt><code>DM_UNSPECIFIED</code></dt>	 * <dd>disposal method not specified</dd>	 * <dt><code>DM_FILL_NONE</code></dt>	 * <dd>do nothing - leave the image in place</dd>	 * <dt><code>DM_FILL_BACKGROUND</code></dt>	 * <dd>fill with the background color</dd>	 * <dt><code>DM_FILL_PREVIOUS</code></dt>	 * <dd>restore the previous picture</dd>	 * </dl>	 * (this field corresponds to the GIF89a Disposal Method value)	 */	public int disposalMethod;	/**	 * The time to delay before displaying the next image	 * in an animation (this field corresponds to the GIF89a	 * Delay Time value).	 */	public int delayTime;	/**	 * Arbitrary channel width data to 8-bit conversion table.	 */	static final byte[][] ANY_TO_EIGHT = new byte[9][];	static {		for (int b = 0; b < 9; ++b) {			byte[] data = ANY_TO_EIGHT[b] = new byte[1 << b];			if (b == 0) continue;			int inc = 0;			for (int bit = 0x10000; (bit >>= b) != 0;) inc |= bit;			for (int v = 0, p = 0; v < 0x10000; v+= inc) data[p++] = (byte)(v >> 8);		}	}	static final byte[] ONE_TO_ONE_MAPPING = ANY_TO_EIGHT[8];	/**	 * Scaled 8x8 Bayer dither matrix.	 */	static final int[][] DITHER_MATRIX = {		{ 0xfc0000, 0x7c0000, 0xdc0000, 0x5c0000, 0xf40000, 0x740000, 0xd40000, 0x540000 },		{ 0x3c0000, 0xbc0000, 0x1c0000, 0x9c0000, 0x340000, 0xb40000, 0x140000, 0x940000 },		{ 0xcc0000, 0x4c0000, 0xec0000, 0x6c0000, 0xc40000, 0x440000, 0xe40000, 0x640000 },		{ 0x0c0000, 0x8c0000, 0x2c0000, 0xac0000, 0x040000, 0x840000, 0x240000, 0xa40000 },		{ 0xf00000, 0x700000, 0xd00000, 0x500000, 0xf80000, 0x780000, 0xd80000, 0x580000 },		{ 0x300000, 0xb00000, 0x100000, 0x900000, 0x380000, 0xb80000, 0x180000, 0x980000 },		{ 0xc00000, 0x400000, 0xe00000, 0x600000, 0xc80000, 0x480000, 0xe80000, 0x680000 },		{ 0x000000, 0x800000, 0x200000, 0xa00000, 0x080000, 0x880000, 0x280000, 0xa80000 }	};/** * Constructs a new, empty ImageData with the given width, height, * depth and palette. The data will be initialized to an (all zero) * array of the appropriate size. * * @param width the width of the image * @param height the height of the image * @param depth the depth of the image * @param palette the palette of the image (must not be null) * * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not *        	one of 1, 2, 4, 8, 16, 24 or 32</li> *    <li>ERROR_NULL_ARGUMENT - if the palette is null</li> * </ul> */public ImageData(int width, int height, int depth, PaletteData palette) {	this(width, height, depth, palette,		4, null, 0, null,		null, -1, -1, SWT.IMAGE_UNDEFINED,		0, 0, 0, 0);}/** * Constructs a new, empty ImageData with the given width, height, * depth, palette, scanlinePad and data. * * @param width the width of the image * @param height the height of the image * @param depth the depth of the image * @param palette the palette of the image * @param scanlinePad the padding of each line, in bytes * @param data the data of the image * * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not *        	one of 1, 2, 4, 8, 16, 24 or 32</li> *    <li>ERROR_NULL_ARGUMENT - if the palette or data is null</li> *    <li>ERROR_CANNOT_BE_ZERO - if the scanlinePad is zero</li> * </ul> */public ImageData(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data) {	this(width, height, depth, palette,		scanlinePad, checkData(data), 0, null,		null, -1, -1, SWT.IMAGE_UNDEFINED,		0, 0, 0, 0);}/** * Constructs an <code>ImageData</code> loaded from the specified * input stream. Throws an error if an error occurs while loading * the image, or if the image has 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> * * @param stream the input stream to load the image from (must not be null) * * @exception IllegalArgumentException <ul> *    <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> * </ul> * * @see ImageLoader#load(InputStream) */public ImageData(InputStream stream) {	ImageData[] data = new ImageLoader().load(stream);	if (data.length < 1) SWT.error(SWT.ERROR_INVALID_IMAGE);	ImageData i = data[0];	setAllFields(		i.width,		i.height,		i.depth,		i.scanlinePad,		i.bytesPerLine,		i.data,		i.palette,		i.transparentPixel,		i.maskData,		i.maskPad,		i.alphaData,		i.alpha,		i.type,		i.x,		i.y,		i.disposalMethod,		i.delayTime);}/** * Constructs an <code>ImageData</code> loaded from a file with the * specified name. Throws an error if an error occurs loading the * image, or if the image has an unsupported type. * <p> * This constructor is provided for convenience when loading a single * image only. If the file contains multiple images, only the first * one will be loaded. To load multiple images, use  * <code>ImageLoader.load()</code>. * </p> * * @param filename the name of the file to load the image from (must not be null) * * @exception IllegalArgumentException <ul> *    <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> * </ul> */public ImageData(String filename) {	ImageData[] data = new ImageLoader().load(filename);	if (data.length < 1) SWT.error(SWT.ERROR_INVALID_IMAGE);	ImageData i = data[0];	setAllFields(		i.width,		i.height,		i.depth,		i.scanlinePad,		i.bytesPerLine,		i.data,		i.palette,		i.transparentPixel,		i.maskData,		i.maskPad,		i.alphaData,		i.alpha,		i.type,		i.x,		i.y,		i.disposalMethod,		i.delayTime);}/** * Prevents uninitialized instances from being created outside the package. */ImageData() {}/** * Constructs an image data by giving values for all non-computable fields. * <p> * This method is for internal use, and is not described further. * </p> */ImageData(	int width, int height, int depth, PaletteData palette,	int scanlinePad, byte[] data, int maskPad, byte[] maskData,	byte[] alphaData, int alpha, int transparentPixel, int type,	int x, int y, int disposalMethod, int delayTime){	if (palette == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	if (!(depth == 1 || depth == 2 || depth == 4 || depth == 8		|| depth == 16 || depth == 24 || depth == 32)) {		SWT.error(SWT.ERROR_INVALID_ARGUMENT);	}	if (width <= 0 || height <= 0) {		SWT.error(SWT.ERROR_INVALID_ARGUMENT);	}	if (scanlinePad == 0) SWT.error (SWT.ERROR_CANNOT_BE_ZERO);	int bytesPerLine = (((width * depth + 7) / 8) + (scanlinePad - 1))		/ scanlinePad * scanlinePad;	setAllFields(		width,		height,		depth,		scanlinePad,		bytesPerLine,		data != null ? data : new byte[bytesPerLine * height],		palette,		transparentPixel,		maskData,		maskPad,		alphaData,		alpha,		type,		x,		y,		disposalMethod,		delayTime);}/**

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品情趣| 久久精品久久综合| 91久久线看在观草草青青| 亚洲男人的天堂网| 中文字幕国产一区| 97精品久久久午夜一区二区三区 | 在线一区二区观看| 亚洲免费毛片网站| 91.com在线观看| 卡一卡二国产精品| 国产精品超碰97尤物18| 在线亚洲精品福利网址导航| 日日夜夜一区二区| 亚洲精品一区二区在线观看| 不卡的av电影在线观看| 亚洲第一福利一区| 久久天天做天天爱综合色| 97se亚洲国产综合在线| 三级在线观看一区二区| 国产日韩欧美高清在线| 欧美亚洲国产一卡| 国产麻豆精品95视频| 亚洲男人天堂av网| 日韩精品一区二区三区视频播放 | 国产高清在线精品| 一区二区三区在线免费播放| 7799精品视频| 成人福利视频在线看| 午夜精品aaa| 中文字幕的久久| 欧美久久免费观看| aa级大片欧美| 久久精品国产久精国产| 亚洲人精品午夜| 日韩精品一区二区三区中文不卡| 成人免费看视频| 蜜臀久久99精品久久久画质超高清| 欧美经典三级视频一区二区三区| 精品视频资源站| voyeur盗摄精品| 另类综合日韩欧美亚洲| 亚洲国产中文字幕| 中文字幕不卡在线| 精品三级在线观看| 欧美吻胸吃奶大尺度电影| 国产成人av电影在线播放| 午夜视频在线观看一区二区三区| 中文字幕不卡的av| 精品国产污污免费网站入口| 欧美日韩国产影片| 97精品国产露脸对白| 国产高清视频一区| 极品少妇xxxx精品少妇偷拍| 亚洲成av人综合在线观看| 亚洲欧洲在线观看av| 2020国产成人综合网| 5月丁香婷婷综合| 色综合久久精品| 日韩精品自拍偷拍| 欧美日韩成人综合| 91香蕉视频污在线| gogo大胆日本视频一区| 国产精品正在播放| 国产精品综合一区二区三区| 人人爽香蕉精品| 午夜不卡av在线| 亚洲国产cao| 亚洲午夜一区二区三区| ㊣最新国产の精品bt伙计久久| 国产亚洲综合av| 久久久蜜臀国产一区二区| 精品国产成人系列| 精品久久人人做人人爰| 日韩欧美一区二区视频| 日韩亚洲欧美在线观看| 91精品国产综合久久福利软件| 欧美精品xxxxbbbb| 欧美久久一二三四区| 欧美一区二区三区四区在线观看| 在线播放一区二区三区| 欧美一区二区三区喷汁尤物| 宅男噜噜噜66一区二区66| 欧美精品日日鲁夜夜添| 91精品麻豆日日躁夜夜躁| 91精品国产欧美一区二区18| 欧美一级片在线看| 精品99一区二区| 国产亚洲一二三区| 国产精品久久精品日日| 亚洲欧美偷拍另类a∨色屁股| 成人欧美一区二区三区黑人麻豆| 18欧美乱大交hd1984| 亚洲综合一区二区三区| 亚洲第一电影网| 国内精品不卡在线| 成人免费高清在线| 在线精品视频一区二区三四| 欧美狂野另类xxxxoooo| ww亚洲ww在线观看国产| 国产精品麻豆视频| 一区二区高清视频在线观看| 日韩高清一区二区| 国产成人午夜片在线观看高清观看| 成人午夜激情在线| 欧美熟乱第一页| 精品国产一区二区在线观看| 欧美激情综合网| 亚洲综合丝袜美腿| 老色鬼精品视频在线观看播放| 国产精品一区二区三区网站| 91免费看片在线观看| 欧美军同video69gay| 国产精品午夜春色av| 午夜精品久久一牛影视| 国产成人免费av在线| 欧美色手机在线观看| 精品成人免费观看| 亚洲久本草在线中文字幕| 日本午夜精品视频在线观看 | 99久久国产免费看| 欧美一区二区三区四区视频| 国产精品美女一区二区在线观看| 婷婷久久综合九色综合绿巨人| 国产一区二区三区久久久| 色婷婷久久一区二区三区麻豆| 日韩午夜在线播放| 成人在线视频一区二区| 欧美美女直播网站| 国产精品丝袜久久久久久app| 亚洲电影第三页| 成人自拍视频在线| 欧美xxxxxxxxx| 亚洲永久免费视频| 粉嫩av亚洲一区二区图片| 欧美人狂配大交3d怪物一区| 国产精品视频看| 毛片av中文字幕一区二区| 在线亚洲高清视频| 国产精品美女视频| 国产在线精品免费| 69成人精品免费视频| 中文字幕日本不卡| 福利一区二区在线| 欧美大片拔萝卜| 午夜精品一区二区三区免费视频| 成人福利电影精品一区二区在线观看| 欧美一区二区在线不卡| 亚洲综合色噜噜狠狠| 成人高清免费观看| 国产欧美综合在线观看第十页| 肉丝袜脚交视频一区二区| 欧美午夜免费电影| 亚洲老司机在线| av中文字幕不卡| 久久精品夜夜夜夜久久| 精彩视频一区二区| 精品国产免费一区二区三区四区| 天涯成人国产亚洲精品一区av| 91久久久免费一区二区| 亚洲精品国产一区二区精华液 | 国产精品亚洲一区二区三区妖精 | 亚洲美女一区二区三区| 99国产精品99久久久久久| 国产精品视频第一区| 国产91对白在线观看九色| 国产日产精品1区| 国产黄色91视频| 国产精品乱人伦中文| 99久久免费视频.com| 欧美激情一区二区| 99久久国产综合精品女不卡| 亚洲天堂av老司机| 91麻豆自制传媒国产之光| 一区二区三区在线视频观看58| 91免费视频大全| 午夜视频一区二区三区| 91精品国产色综合久久不卡蜜臀| 日本亚洲电影天堂| 2020国产精品| 91在线视频官网| 亚洲成av人**亚洲成av**| 欧美一区二区三区四区五区| 精品一区二区三区免费| 日本一区免费视频| 97精品视频在线观看自产线路二| 一区二区三区日韩欧美精品| 欧美主播一区二区三区美女| 视频一区二区不卡| 亚洲裸体xxx| 91精品久久久久久久91蜜桃| 青青国产91久久久久久| 久久网站最新地址| 成人免费毛片aaaaa**| 亚洲一区二区三区激情| 91精品在线麻豆| 久久av中文字幕片| 国产精品黄色在线观看| 精品视频免费在线| 韩国成人在线视频| 亚洲丝袜自拍清纯另类|