jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java
equal
deleted
inserted
replaced
638 JComponent c, int w, int h, |
638 JComponent c, int w, int h, |
639 Object[] extendedCacheKeys) { |
639 Object[] extendedCacheKeys) { |
640 // check if we can scale to the requested size |
640 // check if we can scale to the requested size |
641 Dimension canvas = ctx.canvasSize; |
641 Dimension canvas = ctx.canvasSize; |
642 Insets insets = ctx.stretchingInsets; |
642 Insets insets = ctx.stretchingInsets; |
643 if (insets.left + insets.right > w || insets.top + insets.bottom > h) { |
|
644 return; |
|
645 } |
|
646 |
|
647 if (w <= (canvas.width * ctx.maxHorizontalScaleFactor) && h <= (canvas.height * ctx.maxVerticalScaleFactor)) { |
643 if (w <= (canvas.width * ctx.maxHorizontalScaleFactor) && h <= (canvas.height * ctx.maxVerticalScaleFactor)) { |
648 // get image at canvas size |
644 // get image at canvas size |
649 VolatileImage img = getImage(g.getDeviceConfiguration(), c, canvas.width, canvas.height, extendedCacheKeys); |
645 VolatileImage img = getImage(g.getDeviceConfiguration(), c, canvas.width, canvas.height, extendedCacheKeys); |
650 if (img != null) { |
646 if (img != null) { |
651 // calculate dst inserts |
647 // calculate dst inserts |