public void append (IShape shape, boolean connect) { PathIterator p = shape.pathIterator(null); append(p, connect); }
public void append (IShape shape, boolean connect) { PathIterator p = shape.pathIterator(null); append(p, connect); }
/** * Returns how many times rectangle stripe cross shape or the are intersect */ public static int intersectShape (IShape s, float x, float y, float w, float h) { if (!s.bounds().intersects(x, y, w, h)) { return 0; } return intersectPath(s.pathIterator(null), x, y, w, h); }
/** * Returns how many times a ray from point (x,y) crosses a shape. */ public static int crossShape (IShape s, float x, float y) { if (!s.bounds().contains(x, y)) { return 0; } return crossPath(s.pathIterator(null), x, y); }
public Path (IShape shape) { this(WIND_NON_ZERO, BUFFER_SIZE); PathIterator p = shape.pathIterator(null); setWindingRule(p.windingRule()); append(p, false); }
/** * Returns how many times a ray from point (x,y) crosses a shape. */ public static int crossShape (IShape s, float x, float y) { if (!s.bounds().contains(x, y)) { return 0; } return crossPath(s.pathIterator(null), x, y); }
public Path (IShape shape) { this(WIND_NON_ZERO, BUFFER_SIZE); PathIterator p = shape.pathIterator(null); setWindingRule(p.windingRule()); append(p, false); }
/** * Returns how many times rectangle stripe cross shape or the are intersect */ public static int intersectShape (IShape s, float x, float y, float w, float h) { if (!s.bounds().intersects(x, y, w, h)) { return 0; } return intersectPath(s.pathIterator(null), x, y, w, h); }
/** * Creates and returns a new shape that is the supplied shape transformed by this transform's * matrix. */ public static IShape createTransformedShape (Transform t, IShape src) { if (src == null) { return null; } if (src instanceof Path) { return ((Path)src).createTransformedShape(t); } PathIterator path = src.pathIterator(t); Path dst = new Path(path.windingRule()); dst.append(path, false); return dst; }
/** * Creates and returns a new shape that is the supplied shape transformed by this transform's * matrix. */ public static IShape createTransformedShape (Transform t, IShape src) { if (src == null) { return null; } if (src instanceof Path) { return ((Path)src).createTransformedShape(t); } PathIterator path = src.pathIterator(t); Path dst = new Path(path.windingRule()); dst.append(path, false); return dst; }
int coordsIndex = 0; for (PathIterator pi = s.pathIterator(null); !pi.isDone(); pi.next()) { _coords = adjustSize(_coords, coordsIndex + 6); _rules = adjustSize(_rules, rulesIndex + 1);
int coordsIndex = 0; for (PathIterator pi = s.pathIterator(null); !pi.isDone(); pi.next()) { _coords = adjustSize(_coords, coordsIndex + 6); _rules = adjustSize(_rules, rulesIndex + 1);