本文整理匯總了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);
}
}
}
示例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);
}
示例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;
}
示例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);
}