當前位置: 首頁>>代碼示例>>Java>>正文


Java Image.FILTER_NEAREST屬性代碼示例

本文整理匯總了Java中org.newdawn.slick.Image.FILTER_NEAREST屬性的典型用法代碼示例。如果您正苦於以下問題:Java Image.FILTER_NEAREST屬性的具體用法?Java Image.FILTER_NEAREST怎麽用?Java Image.FILTER_NEAREST使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.newdawn.slick.Image的用法示例。


在下文中一共展示了Image.FILTER_NEAREST屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: init

/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	this.container = container;
	
	sheet = new PackedSpriteSheet("testdata/testpack.def", Image.FILTER_NEAREST);
	rocket = sheet.getSprite("rocket");
	
	SpriteSheet anim = sheet.getSpriteSheet("runner");
	runner = new Animation();
	
	for (int y=0;y<2;y++) {
		for (int x=0;x<6;x++) {
			runner.addFrame(anim.getSprite(x,y), 50);
		}
	}
}
 
開發者ID:j-dong,項目名稱:trashjam2017,代碼行數:18,代碼來源:PackedSheetTest.java

示例2: init

/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	// force a 256 pixel limit for testing
	original = image = new BigImage("testdata/bigimage.tga", Image.FILTER_NEAREST, 512);
	sub = image.getSubImage(210,210,200,130);
	scaledSub = sub.getScaledCopy(2);
	image = image.getScaledCopy(0.3f);
	imageX = image.getFlippedCopy(true, false);
	imageY = imageX.getFlippedCopy(true, true);
	
	bigSheet = new SpriteSheet(original, 16, 16);
}
 
開發者ID:j-dong,項目名稱:trashjam2017,代碼行數:14,代碼來源:BigImageTest.java

示例3: init

/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	image = tga = new Image("testdata/logo.tga");
	scaleMe = new Image("testdata/logo.tga", true, Image.FILTER_NEAREST);
	gif = new Image("testdata/logo.gif");
	scaled = gif.getScaledCopy(120, 120);
	subImage = image.getSubImage(200,0,70,260);
	rot = 0;
}
 
開發者ID:j-dong,項目名稱:trashjam2017,代碼行數:11,代碼來源:CanvasContainerTest.java

示例4: init

/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	original = new BigImage("testdata/bigimage.tga", Image.FILTER_NEAREST, 256);
	bigSheet = new SpriteSheet(original, 16, 16);
}
 
開發者ID:j-dong,項目名稱:trashjam2017,代碼行數:7,代碼來源:BigSpriteSheetTest.java


注:本文中的org.newdawn.slick.Image.FILTER_NEAREST屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。