001/* 002 * To change this template, choose Tools | Templates 003 * and open the template in the editor. 004 */ 005package sec.sun.awt.geom; 006 007/** 008 * 009 * @author Michael Deutch 010 */ 011public class NZWindOp { 012 013 private int count; 014 015 public void newRow() { 016 count = 0; 017 } 018 019 public int classify(Edge e) { 020 // Note: the right curves should be an empty set with this op... 021 // assert(e.getCurveTag() == CTAG_LEFT); 022 int newCount = count; 023 int type = (newCount == 0 ? AreaOp2.ETAG_ENTER : AreaOp2.ETAG_IGNORE); 024 newCount += e.getCurve().getDirection(); 025 count = newCount; 026 return (newCount == 0 ? AreaOp2.ETAG_EXIT : type); 027 } 028 029 public int getState() { 030 return ((count == 0) ? AreaOp2.RSTAG_OUTSIDE : AreaOp2.RSTAG_INSIDE); 031 } 032 033}