本文整理汇总了Java中br.com.etyllica.core.graphics.Graphic.setColor方法的典型用法代码示例。如果您正苦于以下问题:Java Graphic.setColor方法的具体用法?Java Graphic.setColor怎么用?Java Graphic.setColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类br.com.etyllica.core.graphics.Graphic
的用法示例。
在下文中一共展示了Graphic.setColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
// Draw PipCamera
g.drawImage(droneCamera.getBufferedImage(), 0, 60);
// Draw Information
g.setColor(Color.WHITE);
g.drawShadow(20, 60, "Scene", Color.BLACK);
g.drawShadow(20, 120, "DroneX: " + (drone.getX()), Color.BLACK);
g.drawShadow(20, 140, "DroneY: " + (drone.getY()), Color.BLACK);
g.drawShadow(20, 160, "DroneZ: " + (drone.getZ()), Color.BLACK);
g.drawShadow(20, 200, "DroneAngleY: " + (drone.getAngleY()), Color.BLACK);
g.drawShadow(20, 220, "CameraAngleX: " + (droneCamera.getAngleX()), Color.BLACK);
g.drawShadow(20, 240, "CameraAngleY: " + (droneCamera.getAngleY()), Color.BLACK);
g.drawShadow(20, 260, "CameraAngleZ: " + (droneCamera.getAngleZ()), Color.BLACK);
}
示例2: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
// Draw PipCamera
g.drawImage(droneCamera1.getBufferedImage(), 0, 60);
// Draw Information
g.setColor(Color.WHITE);
g.drawShadow(20, 60, "Scene", Color.BLACK);
g.drawShadow(20, 120, "DroneX: " + (drone1.getX()), Color.BLACK);
g.drawShadow(20, 140, "DroneY: " + (drone1.getY()), Color.BLACK);
g.drawShadow(20, 160, "DroneZ: " + (drone1.getZ()), Color.BLACK);
g.drawShadow(20, 200, "DroneAngleY: " + (drone1.getAngleY()), Color.BLACK);
g.drawShadow(20, 220, "CameraAngleX: " + (droneCamera1.getAngleX()), Color.BLACK);
g.drawShadow(20, 240, "CameraAngleY: " + (droneCamera1.getAngleY()), Color.BLACK);
g.drawShadow(20, 260, "CameraAngleZ: " + (droneCamera1.getAngleZ()), Color.BLACK);
batteryIndicator1.draw(g);
batteryIndicator2.draw(g);
}
示例3: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
// Draw PipCamera
g.drawImage(droneCamera.getBufferedImage(), 0, 60);
// Draw Information
g.setColor(Color.WHITE);
g.drawShadow(20, 60, "Scene", Color.BLACK);
g.drawShadow(20, 120, "DroneX: " + (drone.getX()), Color.BLACK);
g.drawShadow(20, 140, "DroneY: " + (drone.getY()), Color.BLACK);
g.drawShadow(20, 160, "DroneZ: " + (drone.getZ()), Color.BLACK);
g.drawShadow(20, 200, "DroneAngleY: " + (drone.getAngleY()), Color.BLACK);
g.drawShadow(20, 220, "CameraAngleX: " + (droneCamera.getAngleX()), Color.BLACK);
g.drawShadow(20, 240, "CameraAngleY: " + (droneCamera.getAngleY()), Color.BLACK);
g.drawShadow(20, 260, "CameraAngleZ: " + (droneCamera.getAngleZ()), Color.BLACK);
batteryIndicator.draw(g);
}
示例4: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
// Draw PipCamera
g.drawImage(droneCamera1.getBufferedImage(), 0, 60);
// Draw Information
g.setColor(Color.WHITE);
g.drawShadow(20, 60, "Scene", Color.BLACK);
g.drawShadow(20, 120, "DroneX: " + (drone1.getX()), Color.BLACK);
g.drawShadow(20, 140, "DroneY: " + (drone1.getY()), Color.BLACK);
g.drawShadow(20, 160, "DroneZ: " + (drone1.getZ()), Color.BLACK);
g.drawShadow(20, 200, "DroneAngleY: " + (drone1.getAngleY()), Color.BLACK);
g.drawShadow(20, 220, "CameraAngleX: " + (droneCamera1.getAngleX()), Color.BLACK);
g.drawShadow(20, 240, "CameraAngleY: " + (droneCamera1.getAngleY()), Color.BLACK);
g.drawShadow(20, 260, "CameraAngleZ: " + (droneCamera1.getAngleZ()), Color.BLACK);
batteryIndicator1.draw(g);
}
示例5: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
g.setColor(Color.GREEN);
int connectorSize = h / 12;
int offset = 2;
g.drawRect(x + w / 3, y, w / 3, connectorSize);
g.drawRect(x, y + connectorSize, w, h - connectorSize);
drawFill(g, connectorSize, offset);
g.setColor(Color.WHITE);
g.setFontSize(12f);
g.drawStringShadow(x, y - h / 2, w, h / 2, Integer.toString((int) battery.getLevel()) + "%");
}
示例6: 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);
}
示例7: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
background.draw(g);
leftJoystick.draw(g);
rightJoystick.draw(g);
g.setColor(Color.WHITE);
g.drawShadow(40, 40, Float.toString(leftJoystick.getSensitivityX()));
g.drawShadow(40, 80, Float.toString(leftJoystick.getSensitivityY()));
g.drawShadow(240, 40, Float.toString(rightJoystick.getSensitivityX()));
g.drawShadow(240, 80, Float.toString(rightJoystick.getSensitivityY()));
}
示例8: 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();
}
示例9: drawFill
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
private void drawFill(Graphic g, int connectorSize, int offset) {
double percent = battery.getLevel() / battery.getScale();
int division = ((h - connectorSize - offset * 2) / 4);
int startFill = y + connectorSize + offset;
int fillOffset = division + offset - 1;
if (percent > 0.75) {
g.fillRect(x + offset, startFill, w - offset - 1, division);
}
if (percent > 0.50) {
g.fillRect(x + offset, startFill + fillOffset, w - offset - 1, division);
}
if (percent > 0.25) {
g.fillRect(x + offset, startFill + fillOffset * 2, w - offset - 1, division);
}
if (percent > 0) {
g.fillRect(x + offset, startFill + fillOffset * 3, w - offset - 1, division + 1);
}
if (percent == 0) {
g.setColor(Color.RED);
g.drawLine(x + offset, startFill + fillOffset * 3 + division, x + w - offset, startFill
+ fillOffset * 3 + division);
}
}
示例10: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
Color color = Color.BLACK;
switch(action){
case RUN:
color = Color.RED;
break;
case JUMP:
color = Color.YELLOW;
break;
case FALL:
color = Color.GREEN;
break;
case WALK:
color = Color.BLUE;
break;
}
g.setColor(color);
layer.draw(g);
//camada.draw(g);
//g.drawRect(camada.getX(),camada.getY(),camada.getW(),camada.getH());
}
示例11: drawLines
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
private void drawLines(Graphic g){
g.setColor(Color.BLACK);
//Draw Line
int lineWidth = 10;
g.fillRect(w/2-lineWidth/2, 0, lineWidth, h);
//Drawing Score
g.setFont(g.getFont().deriveFont(22f));
g.write(w/2-80, 50, Integer.toString(paddle1.getScore()));
g.write(w/2+80, 50, Integer.toString(paddle2.getScore()));
}
示例12: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
g.setColor(Color.CYAN);
g.fillRect(0, 0, w, h);
g.setColor(Color.BLACK);
for(State state: players.values()) {
g.drawRect(state.x, state.y, 50, 50);
if(sender == state.id) {
g.setColor(Color.BLACK);
g.drawString(messageText, state.x, 80);
}
}
}
示例13: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
//Draw PipCamera
g.drawImage(drone.getCamera().getBufferedImage(), 0, 60);
//Draw Information
g.setColor(Color.WHITE);
g.drawShadow(20,20, "Scene",Color.BLACK);
g.drawShadow(20,40, "AngleX: "+(angleX-5),Color.BLACK);
g.drawShadow(20,60, "AngleY: "+(angleY),Color.BLACK);
g.drawShadow(20,100, "DroneX: "+(drone.getX()),Color.BLACK);
g.drawShadow(20,120, "DroneY: "+(drone.getY()),Color.BLACK);
g.drawShadow(20,140, "DroneZ: "+(drone.getZ()),Color.BLACK);
g.drawShadow(20,160, "DroneAngleY: "+(drone.getAngleY()),Color.BLACK);
}
示例14: draw
import br.com.etyllica.core.graphics.Graphic; //导入方法依赖的package包/类
@Override
public void draw(Graphic g) {
g.setColor(Color.BLUE);
g.fillRect(0, 0, 800, 200);
}
示例15: 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");
}