|
|
@ -63,10 +63,6 @@ public abstract class TemplateThemePreviewPane<T extends TemplateTheme> extends |
|
|
|
g2d.dispose(); |
|
|
|
g2d.dispose(); |
|
|
|
g2d = image.createGraphics(); |
|
|
|
g2d = image.createGraphics(); |
|
|
|
|
|
|
|
|
|
|
|
// 使用TYPE_INT_RGB和new Color(255, 255, 255, 1)设置有透明背景buffer image,
|
|
|
|
|
|
|
|
// 使得创建出来的透明像素是(255, 255, 255, 1),而不是(0, 0, 0, 0)
|
|
|
|
|
|
|
|
// 这样不支持透明通道缩略图的旧设计器打开新设计器创建的模版时,就不会创建出拥有黑色背景的缩略图
|
|
|
|
|
|
|
|
g2d.setColor(new Color(255, 255, 255, 1)); |
|
|
|
|
|
|
|
g2d.fillRect(0, 0, width, height); |
|
|
|
g2d.fillRect(0, 0, width, height); |
|
|
|
|
|
|
|
|
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON); |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON); |
|
|
|