本文整理汇总了Java中br.com.etyllica.core.graphics.Graphic.setAlpha方法的典型用法代码示例。如果您正苦于以下问题:Java Graphic.setAlpha方法的具体用法?Java Graphic.setAlpha怎么用?Java Graphic.setAlpha使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类br.com.etyllica.core.graphics.Graphic
的用法示例。
在下文中一共展示了Graphic.setAlpha方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
int streetH = 160;
g.setAlpha(60);
g.setColor(Color.BLACK);
g.fillRect(x,y,w,streetH);
g.setColor(Color.BLUE);
g.drawRect(x,y,w,streetH);
g.setColor(Color.GRAY);
g.fillRect(x,y+streetH,w,h-streetH);
g.setColor(Color.BLUE);
g.drawRect(x,y+streetH,w,h-streetH);
g.setAlpha(100);
}
示例2: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
public void draw(Graphic g) {
g.setAlpha(50);
g.setColor(Color.BLACK);
g.fillOval(area);
if(active) {
g.setColor(Color.RED);
} else {
g.setColor(Color.YELLOW);
}
g.fillOval(joystick);
g.resetOpacity();
}
示例3: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
background.draw(g);
g.setColor(Color.BLACK);
g.setAlpha(40);
g.fillRect(20, 0, w-40, h);
g.setAlpha(100);
g.setFont(g.getFont().deriveFont(32f).deriveFont(Font.BOLD));
g.setColor(Color.WHITE);
g.drawStringShadowX(50, "Credits");
g.drawStringShadowX(250, "Pedro Viriato - Art");
g.drawStringShadowX(300, "Rafael Bastos - Sounds");
g.drawStringShadowX(350, "Yuri Pourre - Programming");
}
示例4: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
g.setAlpha(70);
drawShadow(g);
g.setAlpha(100);
if(needRedraw)
redraw(g);
buffer.draw(g);
}
示例5: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
background.draw(g);
g.setColor(Color.BLACK);
g.setAlpha(40);
g.fillRect(20, 0, w-40, h);
g.setAlpha(100);
g.setFont(g.getFont().deriveFont(32f).deriveFont(Font.BOLD));
g.setColor(Color.WHITE);
g.drawStringShadowX(50, "Instructions");
g.setFont(g.getFont().deriveFont(28f).deriveFont(Font.BOLD));
g.drawStringShadowX(110, "Use Q,A,P, and L keys to beat your heart");
g.drawStringShadowX(180, "Q beats the Upper Left part of Heart.");
g.drawStringShadowX(220, "A beats the Lower Left part of Heart.");
g.drawStringShadowX(260, "P beats the Upper Right part of Heart.");
g.drawStringShadowX(300, "L beats the Lower Right part of Heart.");
}