public void append(Shape shape, boolean connect) { PathIterator p = shape.getPathIterator(null); append(p, connect); }
public void append(Shape shape, boolean connect) { PathIterator p = shape.getPathIterator(null); append(p, connect); }
/** * Returns how many times rectangle stripe cross shape or the are intersect */ public static int intersectShape(Shape s, double x, double y, double w, double h) { if (!s.getBounds2D().intersects(x, y, w, h)) { return 0; } return intersectPath(s.getPathIterator(null), x, y, w, h); }
/** * Returns how many times rectangle stripe cross shape or the are intersect */ public static int intersectShape(Shape s, double x, double y, double w, double h) { if (!s.getBounds2D().intersects(x, y, w, h)) { return 0; } return intersectPath(s.getPathIterator(null), x, y, w, h); }
/** * Returns how many times ray from point (x,y) cross shape */ public static int crossShape(Shape s, double x, double y) { if (!s.getBounds2D().contains(x, y)) { return 0; } return crossPath(s.getPathIterator(null), x, y); }
/** * Returns how many times ray from point (x,y) cross shape */ public static int crossShape(Shape s, double x, double y) { if (!s.getBounds2D().contains(x, y)) { return 0; } return crossPath(s.getPathIterator(null), x, y); }
public GeneralPath(Shape shape) { this(WIND_NON_ZERO, BUFFER_SIZE); PathIterator p = shape.getPathIterator(null); setWindingRule(p.getWindingRule()); append(p, false); }
public GeneralPath(Shape shape) { this(WIND_NON_ZERO, BUFFER_SIZE); PathIterator p = shape.getPathIterator(null); setWindingRule(p.getWindingRule()); append(p, false); }
public Shape createTransformedShape(Shape src) { if (src == null) { return null; } if (src instanceof GeneralPath) { return ((GeneralPath)src).createTransformedShape(this); } PathIterator path = src.getPathIterator(this); GeneralPath dst = new GeneralPath(path.getWindingRule()); dst.append(path, false); return dst; }
public Shape createTransformedShape(Shape src) { if (src == null) { return null; } if (src instanceof GeneralPath) { return ((GeneralPath)src).createTransformedShape(this); } PathIterator path = src.getPathIterator(this); GeneralPath dst = new GeneralPath(path.getWindingRule()); dst.append(path, false); return dst; }