OmegaT の背景に画像を表示します。
タイリング画像の無駄な作成を最適化
| @@ -81,8 +81,8 @@ | ||
| 81 | 81 | // に変更する。 |
| 82 | 82 | int width = getWidth(); |
| 83 | 83 | int height = getHeight(); |
| 84 | - if (width > image.getWidth() || height > image.getHeight()) { | |
| 85 | - this.tiledImage = createTiledImage(image, width, height); | |
| 84 | + if (width > tiledImage.getWidth() || height > tiledImage.getHeight()) { | |
| 85 | + tiledImage = createTiledImage(image, width, height); | |
| 86 | 86 | } |
| 87 | 87 | g2.drawImage(tiledImage, 0, paintMarginTop, this); |
| 88 | 88 |