Java 帮助。如何绘制图像
您好,我开始从事这个项目,我需要一张图片(美国地图),然后我需要在地图上不同位置的不同大小的圆圈。像这样的东西: http://www.npr.org/templates/ story/story.php?storyId=110997398
最好的方法是什么?我从未接触过 Java 2-d,但我猜这就是我应该使用的。
Hi I'm starting to work on this project where I need to have a picture (map of the US) and then I need to circles of different sizes on the map at different locations. Something like this: http://www.npr.org/templates/story/story.php?storyId=110997398
What's the best way to go about doing it? I've never dealt with Java 2-d but I'm guessing that's what I should use.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,Java 2D 应该正是您所需要的,并且 Sun 有一些真正的很好的教程。
如果您四处搜索,您可以找到很多 Java 2D 游戏教程(像这个):出色地。学习它们可能更有趣,并且它们展示了您正在寻找的相同功能。
Yes, Java 2D should be exactly what you need, and Sun has some really good tutorials for it.
If you search around you can find lots of Java 2D game tutorials (like this one) as well. They might be a little more interesting to learn from, and they demonstrate the same features that you're looking for.
希望您不必太准确,因为球体(又名“世界”)上的圆看起来不像二维上的圆,而二维圆是世界坐标中的其他东西。
如果只是为了娱乐和训练,您可以继续在投影地图上绘制二维圆圈,但如果您需要在世界上绘制“真实”圆圈,则应该使用能够将形状转换为任何投影的库。
上次我使用 OpenMap ,这非常简单。
Hope you don't have to be to accurate, because a circle on a sphere (aka 'world') doesn't look like a circle on 2-D and a 2-D circle is something else in world coordinates.
If it's just for fun and training, you could continue with drawing 2-D circles on the projected map but if you need to draw 'real' circles on the world, you should use a library with the power to transform a shape to any projection.
Last time I used OpenMap and it was pretty easy.