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


Java Texture.getImageHeight方法代碼示例

本文整理匯總了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;
}
 
開發者ID:eliatlarge,項目名稱:FEMultiPlayer-V2,代碼行數:19,代碼來源:Animation.java

示例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();
}
 
開發者ID:massm039,項目名稱:SRPG,代碼行數:9,代碼來源:Button.java

示例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;
}
 
開發者ID:Korriban,項目名稱:DuskMoon,代碼行數:14,代碼來源:Art.java


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