2362N/A * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A // Note: the right curves should be an empty set with this op... 0N/A // assert(e.getCurveTag() == CTAG_LEFT); 0N/A // Note: the right curves should be an empty set with this op... 0N/A // assert(e.getCurveTag() == CTAG_LEFT); 0N/A /* Constants to tag the left and right curves in the edge list */ 0N/A /* Constants to classify edges */ 0N/A /* Constants used to classify result state */ 0N/A // Active edges are between left (inclusive) and right (exclusive) 0N/A // Prune active edges that fall off the top of the active y range 0N/A // Grab a new "top of Y range" if the active edges are empty 0N/A // Incorporate new active edges that enter the active y range 0N/A // Sort the current active edges by their X values and 0N/A // determine the maximum valid Y range where the X ordering 0N/A // Note: We could start at left+1, but we need to make 0N/A // sure that edgelist[left] has its equivalence set to 0. 0N/A // If the curves are equal, mark them to be 0N/A // deleted later if they cancel each other 0N/A // out so that we avoid having extraneous 0N/A // Now prune the active edge list. 0N/A // For each edge in the list, determine its classification 0N/A // (entering shape, exiting shape, ignore - no change) and 0N/A // record the current Y range and its classification in the 0N/A // Edge object for use later in constructing the new outline. 0N/A // Find one of the segments in the "equal" range 0N/A // with the right transition state and prefer an 0N/A // edge that was either active up until ystart 0N/A // or the edge that extends the furthest downward 0N/A // (i.e. has the most potential for continuation) 0N/A // Note: classify() must be called 0N/A // on every edge we consume here. 0N/A // assert(getState() == AreaOp.RSTAG_OUTSIDE); 0N/A // Finally capture the bottom of the valid Y range as the top 0N/A // of the next Y range. 0N/A * Connect chains or links if they are the only things left... 0N/A // assert(link != null && chain != null); 0N/A * Connect chains or links if they close off an open area... 0N/A * Connect chains or links if their successor is 0N/A * between them and their potential connectee... 0N/A // assert(link != null); 0N/A // assert(chain != null); 0N/A // assert(chain.getEtag() == link.getEtag()); 0N/A * Does the position of the next edge at v1 "obstruct" the 0N/A * connectivity between current edge and the potential 0N/A * partner edge which is positioned at v2? 0N/A * Phase tells us whether we are testing for a transition 0N/A * into or out of the interior part of the resulting area. 0N/A * Require 4-connected continuity if this edge and the partner 0N/A * edge are both "entering into" type edges 0N/A * Allow 8-connected continuity for "exiting from" type edges