本文整理汇总了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);
}