jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java
changeset 33856 875f59862274
parent 29896 a5ac6d82efa2
child 47160 ac5434728c3b
equal deleted inserted replaced
33855:2450e37e84dd 33856:875f59862274
   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