• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Graphic类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中br.com.etyllica.core.graphics.Graphic的典型用法代码示例。如果您正苦于以下问题:Java Graphic类的具体用法?Java Graphic怎么用?Java Graphic使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Graphic类属于br.com.etyllica.core.graphics包,在下文中一共展示了Graphic类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);

}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:22,代码来源:RemoteEnvironment.java


示例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);

}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:25,代码来源:MultiPilotEnvironment.java


示例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);

}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:24,代码来源:CleanEnvironment.java


示例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);
}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:23,代码来源:WindEnvironment.java


示例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()) + "%");
}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:17,代码来源:BatteryIndicator.java


示例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);		
}
 
开发者ID:yuripourre,项目名称:htbm-v2,代码行数:21,代码来源:StreetTile.java


示例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()));
}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:15,代码来源:ControllerExample.java


示例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();
	}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:16,代码来源:JoystickRadius.java


示例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);
  }
}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:31,代码来源:BatteryIndicator.java


示例10: draw

import br.com.etyllica.core.graphics.Graphic; //导入依赖的package包/类
@Override
public void draw(Graphic g) {

	background.draw(g);
	
	bar.draw(g);

	box.draw(g);

	obstacle.draw(g);

	for(Heart heart: obstacle.getHeartSequence()){
		heart.draw(g);
	}

	player.draw(g);

	marker.draw(g);
	markq.draw(g);
	marka.draw(g);
	markp.draw(g);
	markl.draw(g);
	
	
	performPerfect.draw(g);
	performGreat.draw(g);
	performGood.draw(g);
	performMiss.draw(g);
	stars.draw(g);
	
	g.setFont(g.getFont().deriveFont(22f));
	g.setColor(Color.WHITE);
	g.drawShadow(500,65,"POINTS:");
	g.drawShadow(600,65,getPoints());

}
 
开发者ID:yuripourre,项目名称:htbm-v2,代码行数:37,代码来源:HeartGame.java


示例11: draw

import br.com.etyllica.core.graphics.Graphic; //导入依赖的package包/类
@Override
public void draw(Graphic g) {

	sun.draw(g);

	clouds.draw(g);
	predios.draw(g);
	grama.draw(g);
	street.draw(g);
	
}
 
开发者ID:yuripourre,项目名称:htbm-v2,代码行数:12,代码来源:Background.java


示例12: draw

import br.com.etyllica.core.graphics.Graphic; //导入依赖的package包/类
@Override
public void draw(Graphic g) {

	for(StreetTile tile: streetTiles){
		tile.draw(g);
	}
	
}
 
开发者ID:yuripourre,项目名称:htbm-v2,代码行数:9,代码来源:Street.java


示例13: draw

import br.com.etyllica.core.graphics.Graphic; //导入依赖的package包/类
@Override
public void draw(Graphic g) {

	/*g.setColor(Color.WHITE);
	g.drawRect(x, y, w, h);

	g.drawRect(x, y, w/2, h/2);
	g.drawRect(x, y+w/2, w/2, h/2);
	g.drawRect(x+w/2, y, w/2, h/2);
	g.drawRect(x+w/2, y+w/2, w/2, h/2);

	//Left Side
	if(keyPressUpperLeft){
		g.fillRect(x, y, w/2, h/2);
	}
	if(keyPressLowerLeft){
		g.fillRect(x, y+w/2, w/2, h/2);
	}
	//Right Side
	if(keyPressUpperRight){
		g.fillRect(x+w/2, y, w/2, h/2);
	}
	if(keyPressLowerRight){
		g.fillRect(x+w/2, y+w/2, w/2, h/2);
	}*/

}
 
开发者ID:yuripourre,项目名称:htbm-v2,代码行数:28,代码来源:HeartBox.java


示例14: 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());
	
}
 
开发者ID:yuripourre,项目名称:htbm-v2,代码行数:28,代码来源:Player.java


示例15: 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()));

	}
 
开发者ID:yuripourre,项目名称:etyllic-pong,代码行数:15,代码来源:PongApplication.java


示例16: 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);
		}			
		
	}		

}
 
开发者ID:yuripourre,项目名称:multiplayer,代码行数:20,代码来源:ClientApplication.java


示例17: draw

import br.com.etyllica.core.graphics.Graphic; //导入依赖的package包/类
@Override
public void draw(Graphic g) {
	// TODO Auto-generated method stub

}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:6,代码来源:DEMView.java


示例18: 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);		


}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:22,代码来源:IndoorEnvironment.java


示例19: draw

import br.com.etyllica.core.graphics.Graphic; //导入依赖的package包/类
@Override
public void draw(Graphic g) {
	super.draw(g);
	g.drawImage(buffer, 20, 50);
}
 
开发者ID:yuripourre,项目名称:drone4,代码行数:6,代码来源:DJICameraExample.java


示例20: redraw

import br.com.etyllica.core.graphics.Graphic; //导入依赖的package包/类
private void redraw(Graphic g) {
			
	g.setImage(buffer.getBuffer());
	
	int width = buffer.getBuffer().getWidth();
	
	int dif = width-layer.getTileW();
	
	this.layer.setX(dif/2);
	
	layer.draw(g);
	
	this.layer.setX(0);
					
	buffer.refresh();

	if(!turnedRight) {
		buffer.flipHorizontal();
	}
	
	g.resetImage();
	
	needRedraw = false;		
}
 
开发者ID:yuripourre,项目名称:marvel-quest,代码行数:25,代码来源:Hero.java



注:本文中的br.com.etyllica.core.graphics.Graphic类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ListOrderedSet类代码示例发布时间:2022-05-22
下一篇:
Java HostLocation类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap