gpt4 book ai didi

java - GraphicsConfiguration 在 Java 中代表什么?

转载 作者:搜寻专家 更新时间:2023-11-01 03:36:31 24 4
gpt4 key购买 nike

Java 8 文档以下列方式描述 GraphicsConfiguration。

The GraphicsConfiguration class describes the characteristics of a graphics destination such as a printer or monitor

虽然描述有点非技术性和模糊性,但足以让我在屏幕截图应用程序中使用它,但我仍然不明白为什么一个 GraphicsDevice 有多个 GraphicsConfigurations。在 GraphicsDevice 的文档中指出:

Each graphics device has one or more GraphicsConfiguration objects associated with it. These objects specify the different configurations in which the GraphicsDevice can be used.

这些“不同的配置”是什么,它们会在什么时候出现?

最佳答案

如该类的 Javadoc 中所述:

There can be many GraphicsConfiguration objects associated with a single graphics device, representing different drawing modes or capabilities. The corresponding native structure will vary from platform to platform. For example, on X11 windowing systems, each visual is a different GraphicsConfiguration. On Microsoft Windows, GraphicsConfigurations represent PixelFormats available in the current resolution and color depth.

http://docs.oracle.com/javase/7/docs/api/java/awt/GraphicsConfiguration.html

对于 X11 和术语“视觉”,此链接澄清了一点:http://tronche.com/gui/x/xlib/utilities/visual.html - 当然,对于“普通”应用程序,这可能会令人恼火,但由于 Java AWT 使用底层 OS 图形,它必须表示其特性。

关于java - GraphicsConfiguration 在 Java 中代表什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30038833/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com