本文整理匯總了Java中org.newdawn.slick.Graphics.clearAlphaMap方法的典型用法代碼示例。如果您正苦於以下問題:Java Graphics.clearAlphaMap方法的具體用法?Java Graphics.clearAlphaMap怎麽用?Java Graphics.clearAlphaMap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.newdawn.slick.Graphics
的用法示例。
在下文中一共展示了Graphics.clearAlphaMap方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: 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);
}
示例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);
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);
}