use of org.robovm.apple.coregraphics.CGMutablePath in project playn by threerings.
the class RoboCanvas method fillCircle.
@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;
}
Aggregations