< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2008, 2011, 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) 2008, 2018, 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
*** 199,209 **** double x1, y1, x2, y2; switch (sg2d.transformState) { case SunGraphics2D.TRANSFORM_GENERIC: case SunGraphics2D.TRANSFORM_TRANSLATESCALE: { ! double coords[] = {ux1, uy1, ux2, uy2}; sg2d.transform.transform(coords, 0, coords, 0, 2); x1 = coords[0]; y1 = coords[1]; x2 = coords[2]; y2 = coords[3]; --- 199,209 ---- double x1, y1, x2, y2; switch (sg2d.transformState) { case SunGraphics2D.TRANSFORM_GENERIC: case SunGraphics2D.TRANSFORM_TRANSLATESCALE: { ! double[] coords = {ux1, uy1, ux2, uy2}; sg2d.transform.transform(coords, 0, coords, 0, 2); x1 = coords[0]; y1 = coords[1]; x2 = coords[2]; y2 = coords[3];
*** 255,265 **** if (len == 0) { dx = len = 1; // dy = 0; already } // delta transform the transposed (90 degree rotated) unit vector ! double unitvector[] = {dy/len, -dx/len}; sg2d.transform.deltaTransform(unitvector, 0, unitvector, 0, 1); lw *= len(unitvector[0], unitvector[1]); } lw = Math.max(lw, minPenSize); dx = x2 - x1; --- 255,265 ---- if (len == 0) { dx = len = 1; // dy = 0; already } // delta transform the transposed (90 degree rotated) unit vector ! double[] unitvector = {dy/len, -dx/len}; sg2d.transform.deltaTransform(unitvector, 0, unitvector, 0, 1); lw *= len(unitvector[0], unitvector[1]); } lw = Math.max(lw, minPenSize); dx = x2 - x1;
< prev index next >