本文整理匯總了Java中org.newdawn.slick.Graphics.texture方法的典型用法代碼示例。如果您正苦於以下問題:Java Graphics.texture方法的具體用法?Java Graphics.texture怎麽用?Java Graphics.texture使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.newdawn.slick.Graphics
的用法示例。
在下文中一共展示了Graphics.texture方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: render
import org.newdawn.slick.Graphics; //導入方法依賴的package包/類
/**
* @see org.newdawn.slick.BasicGame#render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
*/
public void render(GameContainer container, Graphics g) {
g.drawString("R - Toggle Rotationg",10,50);
g.drawImage(image1, 100, 236);
g.drawImage(image2, 600, 236);
g.translate(0, -150);
g.rotate(400, 300, ang);
g.texture(shape, image2);
g.texture(shape, image1, fill);
g.resetTransform();
g.translate(0, 150);
g.rotate(400, 300, ang);
g.texture(poly, image2);
g.texture(poly, image1, fill);
g.resetTransform();
}
示例2: render
import org.newdawn.slick.Graphics; //導入方法依賴的package包/類
/**
* @see org.newdawn.slick.Game#render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
*/
public void render(GameContainer container, Graphics g) throws SlickException {
g.setColor(Color.white);
g.texture(poly, image);
ShapeRenderer.texture(poly, image, texPaint);
}
示例3: render
import org.newdawn.slick.Graphics; //導入方法依賴的package包/類
/**
* @see org.newdawn.slick.Game#render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
*/
public void render(GameContainer container, Graphics g) throws SlickException {
g.setColor(Color.white);
g.texture(poly, image);
}