< prev index next >

src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java

Print this page

        

*** 540,550 **** if (orCode != 0) { final int sideCode = outcode0 & outcode1; // basic rejection criteria: if (sideCode == 0) { ! // ovelap clip: if (subdivide) { // avoid reentrance subdivide = false; // subdivide curve => callback with subdivided parts: boolean ret = curveSplitter.splitLine(cx0, cy0, x1, y1, --- 540,550 ---- if (orCode != 0) { final int sideCode = outcode0 & outcode1; // basic rejection criteria: if (sideCode == 0) { ! // overlap clip: if (subdivide) { // avoid reentrance subdivide = false; // subdivide curve => callback with subdivided parts: boolean ret = curveSplitter.splitLine(cx0, cy0, x1, y1,
*** 634,643 **** --- 634,646 ---- } // Ignore caps like finish(false) emitReverse(); this.prev = CLOSE; + this.cx0 = sx0; + this.cy0 = sy0; + this.cOutCode = sOutCode; if (opened) { // do not emit close opened = false; } else {
*** 668,678 **** private void finish(final int outcode) { // Problem: impossible to guess if the path will be closed in advance // i.e. if caps must be drawn or not ? // Solution: use the ClosedPathDetector before Stroker to determine // if the path is a closed path or not ! if (!rdrCtx.closedPath) { if (outcode == 0) { // current point = end's cap: if (capStyle == CAP_ROUND) { drawRoundCap(cx0, cy0, cmx, cmy); } else if (capStyle == CAP_SQUARE) { --- 671,683 ---- private void finish(final int outcode) { // Problem: impossible to guess if the path will be closed in advance // i.e. if caps must be drawn or not ? // Solution: use the ClosedPathDetector before Stroker to determine // if the path is a closed path or not ! if (rdrCtx.closedPath) { ! emitReverse(); ! } else { if (outcode == 0) { // current point = end's cap: if (capStyle == CAP_ROUND) { drawRoundCap(cx0, cy0, cmx, cmy); } else if (capStyle == CAP_SQUARE) {
*** 693,704 **** emitLineTo(sx0 + smy - smx, sy0 - smx - smy); emitLineTo(sx0 + smy + smx, sy0 - smx + smy); } } } - } else { - emitReverse(); } emitClose(); } private void emitMoveTo(final float x0, final float y0) { --- 698,707 ----
*** 1058,1068 **** if (orCode != 0) { final int sideCode = outcode0 & outcode1 & outcode2 & outcode3; // basic rejection criteria: if (sideCode == 0) { ! // ovelap clip: if (subdivide) { // avoid reentrance subdivide = false; // subdivide curve => callback with subdivided parts: boolean ret = curveSplitter.splitCurve(cx0, cy0, x1, y1, --- 1061,1071 ---- if (orCode != 0) { final int sideCode = outcode0 & outcode1 & outcode2 & outcode3; // basic rejection criteria: if (sideCode == 0) { ! // overlap clip: if (subdivide) { // avoid reentrance subdivide = false; // subdivide curve => callback with subdivided parts: boolean ret = curveSplitter.splitCurve(cx0, cy0, x1, y1,
*** 1206,1216 **** if (orCode != 0) { final int sideCode = outcode0 & outcode1 & outcode2; // basic rejection criteria: if (sideCode == 0) { ! // ovelap clip: if (subdivide) { // avoid reentrance subdivide = false; // subdivide curve => call lineTo() with subdivided curves: boolean ret = curveSplitter.splitQuad(cx0, cy0, x1, y1, --- 1209,1219 ---- if (orCode != 0) { final int sideCode = outcode0 & outcode1 & outcode2; // basic rejection criteria: if (sideCode == 0) { ! // overlap clip: if (subdivide) { // avoid reentrance subdivide = false; // subdivide curve => call lineTo() with subdivided curves: boolean ret = curveSplitter.splitQuad(cx0, cy0, x1, y1,
< prev index next >