Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个编码图像。我想在它上面画一个 FontImage 以获得另一个 EncodedImage。它类似于 LayeredLayout (一层在另一层之上),但在这种情况下,我需要一个新的 EncodedImage 与两个图像合并。
谢谢
使用可变图像。
Image img = Image.create(encImage.getWidth(), encImage.getHeight(), 0); Graphics g = img.getGraphics(); g.drawImage(encImage, 0, 0); g.drawImage(fontImage.scaled(encImage.getWidth(), encImage.getHeight()).toImage(), 0, 0);