本文整理匯總了Java中org.newdawn.slick.opengl.Texture.getImageHeight方法的典型用法代碼示例。如果您正苦於以下問題:Java Texture.getImageHeight方法的具體用法?Java Texture.getImageHeight怎麽用?Java Texture.getImageHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.newdawn.slick.opengl.Texture
的用法示例。
在下文中一共展示了Texture.getImageHeight方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: Animation
import org.newdawn.slick.opengl.Texture; //導入方法依賴的package包/類
/**
* Instantiates a new single-frame animation.
*
* @param t the texture
* @param blend the blend mode to use when drawing this animation
*/
public Animation(Texture t, BlendModeArgs blend) {
texture = t;
width = t.getImageWidth();
height = t.getImageHeight();
length = 1;
rows = 1;
columns = 1;
speed = 0;
currentFrame = 0;
counter = 0;
this.blend = blend;
}
示例2: Button
import org.newdawn.slick.opengl.Texture; //導入方法依賴的package包/類
public Button(String name, Texture texture, int x, int y) {
this.name = name;
this.texture = texture;
this.x = x;
this.y = y;
this.width = texture.getImageWidth();
this.height = texture.getImageHeight();
}
示例3: convertImage
import org.newdawn.slick.opengl.Texture; //導入方法依賴的package包/類
private Image convertImage(String path) throws IOException {
BufferedImage bufferedImage = ImageIO.read(DuskMoon.class.getResourceAsStream("/"+path));
Texture texture = BufferedImageUtil.getTexture("", bufferedImage);
Image image = null;
try {
image = new Image(texture.getImageWidth(), texture.getImageHeight());
image.setTexture(texture);
} catch (SlickException e) {
e.printStackTrace();
}
return image;
}