< prev index next >

src/java.desktop/share/classes/sun/java2d/pipe/DrawImage.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 399,412 **** if (ddy1 > d) ddy1 = d; else if (ddy2 < d) ddy2 = d; } Region clip = sg.getCompClip(); ! final int dx1 = Math.max((int) Math.floor(ddx1), clip.lox); ! final int dy1 = Math.max((int) Math.floor(ddy1), clip.loy); ! final int dx2 = Math.min((int) Math.ceil(ddx2), clip.hix); ! final int dy2 = Math.min((int) Math.ceil(ddy2), clip.hiy); if (dx2 <= dx1 || dy2 <= dy1) { // empty destination means no output return; } --- 399,412 ---- if (ddy1 > d) ddy1 = d; else if (ddy2 < d) ddy2 = d; } Region clip = sg.getCompClip(); ! final int dx1 = Math.max((int) Math.floor(ddx1), clip.getLoX()); ! final int dy1 = Math.max((int) Math.floor(ddy1), clip.getLoY()); ! final int dx2 = Math.min((int) Math.ceil(ddx2), clip.getHiX()); ! final int dy2 = Math.min((int) Math.ceil(ddy2), clip.getHiY()); if (dx2 <= dx1 || dy2 <= dy1) { // empty destination means no output return; }
< prev index next >