@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 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; }