mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix painting error stripes into cached image
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.ui.stripe;
|
||||
|
||||
import com.intellij.util.ui.ImageUtil;
|
||||
import com.intellij.util.ui.RegionPainter;
|
||||
|
||||
import java.awt.AlphaComposite;
|
||||
@@ -164,8 +165,8 @@ public class ErrorStripePainter extends RegionPainter.Image {
|
||||
}
|
||||
|
||||
private void updateImage(BufferedImage image, boolean force) {
|
||||
int width = image.getWidth();
|
||||
int height = image.getHeight();
|
||||
int width = ImageUtil.getUserWidth(image);
|
||||
int height = ImageUtil.getUserHeight(image);
|
||||
Graphics2D g = image.createGraphics();
|
||||
|
||||
myImageHeight = 0;
|
||||
|
||||
@@ -134,7 +134,7 @@ public interface RegionPainter<T> {
|
||||
@Override
|
||||
public void paint(Graphics2D g, int x, int y, int width, int height, Object object) {
|
||||
if (width > 0 && height > 0) {
|
||||
if (myImage == null || width != myImage.getWidth() || height != myImage.getHeight()) {
|
||||
if (myImage == null || width != ImageUtil.getUserWidth(myImage) || height != ImageUtil.getRealHeight(myImage)) {
|
||||
myImage = createImage(width, height);
|
||||
}
|
||||
else if (myImage != null) {
|
||||
|
||||
Reference in New Issue
Block a user