本文整理匯總了Java中org.newdawn.slick.Graphics.setDrawMode方法的典型用法代碼示例。如果您正苦於以下問題:Java Graphics.setDrawMode方法的具體用法?Java Graphics.setDrawMode怎麽用?Java Graphics.setDrawMode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.newdawn.slick.Graphics
的用法示例。
在下文中一共展示了Graphics.setDrawMode方法的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("T - TGA Snapshot", 10,50);
g.drawString("J - JPG Snapshot", 10,70);
g.drawString("P - PNG Snapshot", 10,90);
g.setDrawMode(Graphics.MODE_ADD);
g.drawImage(copy, 200, 300);
g.setDrawMode(Graphics.MODE_NORMAL);
g.drawString(message, 10,400);
g.drawRect(200,0,400,300);
g.translate(400, 250);
fire.render();
this.g = g;
}
示例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.clearAlphaMap();
g.setDrawMode(Graphics.MODE_NORMAL);
textureMap.draw(10,50);
g.setColor(Color.red);
g.fillRect(290,40,200,200);
g.setColor(Color.white);
// write only alpha
g.setDrawMode(Graphics.MODE_ALPHA_MAP);
alphaMap.draw(300,50);
g.setDrawMode(Graphics.MODE_ALPHA_BLEND);
textureMap.draw(300,50);
g.setDrawMode(Graphics.MODE_NORMAL);
}
示例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.clearAlphaMap();
g.setDrawMode(Graphics.MODE_NORMAL);
g.setColor(Color.white);
g.fillOval(100,100,150,150);
textureMap.draw(10,50);
g.copyArea(copy, 100,100);
g.setColor(Color.red);
g.fillRect(300,100,200,200);
copy.draw(350,150);
}