Java 如何以编程方式创建显示其分辨率或多个分辨率的图像
如何仅使用 SE(即不使用任何库)以编程方式创建在 Java 中显示 n 个分辨率的图像/图标/位图。
例如,一系列分辨率,例如
[ [640, 480], [720, 576] ]
分辨率的位置并不重要,但最好如图所示。
使用自定义颜色/字体?甚至可能只是一条线而不是实心填充?
How can I programmatically create an Image/Icon/Bitmap that shows n number of resolutions in Java using just the SE i.e. no libraries.
e.g. an array of resolutions like
[ [640, 480], [720, 576] ]
to
The location of the resolution doesn't matter but would be preferable as shown.
With custom colours/fonts ? maybe even just a line rather than solid fill ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
利用
java.awt.*
和javax.imageio.*
中的图像类:我假设您将在输入对上有一个循环,然后您将必须摆弄所需的算术才能将文本的各个位获取到您想要的位置
Make use of the image classes in
java.awt.*
andjavax.imageio.*
:I assume you'll have a loop over your input pairs, then you'll have to fiddle around with the arithmetic needed to get the various bits of text where you want them