@Override public Canvas clip(Path clipPath) { bctx.addPath(((RoboPath) clipPath).cgPath); bctx.clip(); return this; }
@Override public Canvas clip(Path clipPath) { bctx.addPath(((RoboPath) clipPath).cgPath); bctx.clip(); return this; }
@Override public Canvas fillRoundRect(float x, float y, float width, float height, float radius) { addRoundRectPath(x, y, width, height, radius); RoboGradient gradient = currentState().gradient; if (gradient == null) { bctx.fillPath(); } else { bctx.clip(); gradient.fill(bctx); } isDirty = true; return this; }
@Override public Canvas fillPath(Path path) { bctx.addPath(((RoboPath) path).cgPath); RoboGradient gradient = currentState().gradient; if (gradient == null) { bctx.fillPath(); } else { bctx.clip(); gradient.fill(bctx); } isDirty = true; return this; }
@Override public Canvas fillPath(Path path) { bctx.addPath(((RoboPath) path).cgPath); RoboGradient gradient = currentState().gradient; if (gradient == null) { bctx.fillPath(); } else { bctx.clip(); gradient.fill(bctx); } isDirty = true; return this; }
@Override public Canvas fillRoundRect(float x, float y, float width, float height, float radius) { addRoundRectPath(x, y, width, height, radius); RoboGradient gradient = currentState().gradient; if (gradient == null) { bctx.fillPath(); } else { 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; }
@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; }