public void addLines(CGAffineTransform m, CGPoint[] points) { if (points == null) { throw new NullPointerException("points"); } CGPoint first = Struct.allocate(CGPoint.class, points.length); first.update(points); addLines(m, first, points.length); } /*<methods>*/
public void addRects(CGAffineTransform m, CGRect[] rects) { if (rects == null) { throw new NullPointerException("rects"); } CGRect first = Struct.allocate(CGRect.class, rects.length); first.update(rects); addRects(m, first, rects.length); } public void addLines(CGAffineTransform m, CGPoint[] points) {
@Override public Path reset() { cgPath.dispose(); cgPath = CGMutablePath.createMutable(); return this; }
@Override public Canvas fillCircle(float x, float y, float radius) { RoboGradient gradient = currentState().gradient; if (gradient == null) { bctx.fillEllipseInRect(new CGRect(x-radius, y-radius, 2*radius, 2*radius)); } else { CGMutablePath cgPath = CGMutablePath.createMutable(); cgPath.addArc(null, x, y, radius, 0, 2*Math.PI, false); bctx.addPath(cgPath); bctx.clip(); gradient.fill(bctx); } isDirty = true; return this; }
@Override public Path moveTo(float x, float y) { cgPath.moveToPoint(null, x, y); return this; }
@Override public Path quadraticCurveTo(float cpx, float cpy, float x, float y) { cgPath.addQuadCurveToPoint(null, cpx, cpy, x, y); return this; }
@Override public Path close() { cgPath.closeSubpath(); return this; }
@Override public Path bezierTo(float c1x, float c1y, float c2x, float c2y, float x, float y) { cgPath.addCurveToPoint(null, c1x, c1y, c2x, c2y, x, y); return this; }
@Override protected void finalize() { cgPath.dispose(); // meh } }
@Override public Path lineTo(float x, float y) { cgPath.addLineToPoint(null, x, y); return this; }
@Override public Path reset() { cgPath.dispose(); cgPath = CGMutablePath.createMutable(); return this; }
@Override public Canvas fillCircle(float x, float y, float radius) { RoboGradient gradient = currentState().gradient; if (gradient == null) { bctx.fillEllipseInRect(new CGRect(x-radius, y-radius, 2*radius, 2*radius)); } else { CGMutablePath cgPath = CGMutablePath.createMutable(); cgPath.addArc(null, x, y, radius, 0, 2*Math.PI, false); bctx.addPath(cgPath); bctx.clip(); gradient.fill(bctx); } isDirty = true; return this; }
@Override public Path moveTo(float x, float y) { cgPath.moveToPoint(null, x, y); return this; }
@Override public Path quadraticCurveTo(float cpx, float cpy, float x, float y) { cgPath.addQuadCurveToPoint(null, cpx, cpy, x, y); return this; }
@Override public Path close() { cgPath.closeSubpath(); return this; }
@Override public Path bezierTo(float c1x, float c1y, float c2x, float c2y, float x, float y) { cgPath.addCurveToPoint(null, c1x, c1y, c2x, c2y, x, y); return this; }
@Override protected void finalize() { cgPath.dispose(); // meh } }
@Override public Path lineTo(float x, float y) { cgPath.addLineToPoint(null, x, y); return this; }
public void addLines(CGAffineTransform m, CGPoint[] points) { if (points == null) { throw new NullPointerException("points"); } CGPoint first = Struct.allocate(CGPoint.class, points.length); first.update(points); addLines(m, first, points.length); } /*<methods>*/
public void addRects(CGAffineTransform m, CGRect[] rects) { if (rects == null) { throw new NullPointerException("rects"); } CGRect first = Struct.allocate(CGRect.class, rects.length); first.update(rects); addRects(m, first, rects.length); } public void addLines(CGAffineTransform m, CGPoint[] points) {