简体   繁体   English

Java中的Graphics2D

[英]Graphics2D in Java

Firstly, sorry for this type of question. 首先,对不起这类问题。 I´m learning Java programming, I have quite a lot skills in this language, but until now I haven´t used graphics2D. 我正在学习Java编程,我在这门语言方面有很多技巧,但直到现在我还没有使用过graphics2D。 I want to learn how to create graphics, but I haven´t found any helpful tutorial. 我想学习如何创建图形,但我还没有找到任何有用的教程。 Please, do you know some good tutorial about learning how to create graphics? 请问,你知道一些关于学习如何创建图形的好教程吗? Thanks in advance. 提前致谢。

It depends by what you mean by Graphics2D. 这取决于Graphics2D的含义。 This covers a large area, from painting custom components to painting games and/or animation 这涵盖了大面积,从绘制自定义组件到绘画游戏和/或动画

I'd start with something like 2D Graphics Trail 我从2D Graphics Trail开始

I'd make sure your familiar with Custom Painting in Swing 我确保你熟悉Swing中的Custom Painting

I'd also make myself familiar with Painting in AWT and Swing 我也熟悉AWT和Swing中的绘画

Once that begins to make scene, you'd take a look at Concurrency in Swing because eventually you want to use Threads . 一旦开始制作场景,你就看看Swing中的Concurrency,因为最终你想要使用Threads Pay close attention to the Event Dispatching Thread topic 密切关注Event Dispatching Thread主题

Java How To Program 9/e (early objects) has some very nice introduction to Java's graphics. Java如何编程9 / e(早期对象)有一些非常好的Java图形介绍。

At each chapter there is a Case Study where you are introduced to different graphics java features and also there are exercises which are very challenging. 在每一章都有一个案例研究 ,在这里您将了解不同的图形java功能,还有一些非常具有挑战性的练习。

Then, later there is the Graphics and Java 2D chapter (chapter 15) where there is a very nice cover of Java's 2D graphics. 然后,稍后会有图形和Java 2D章节(第15章),其中有一个非常好的Java 2D图形封面。

Then if you want to go deeper into Java's 2D Graphics, you can browse through the Java 2D API Specification 然后,如果您想深入了解Java的2D图形,您可以浏览Java 2D API规范

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM