List of usage examples for android.graphics Outline Outline
public Outline()
From source file:org.protocoderrunner.apprunner.api.PUI.java
@ProtocoderScript
@APIParam(params = { "View", "x", "y", "w", "h" })
public void clipCircle(View v, final int x, final int y, final int w, final int h) {
Outline outline = new Outline();
outline.setOval(x, y, w, h);// w w w .j a va 2s . c o m
v.setClipToOutline(true);
ViewOutlineProvider viewOutlineProvider = new ViewOutlineProvider() {
@Override
public void getOutline(View view, Outline outline) {
// Or read size directly from the view's width/height
outline.setOval(x, y, w, h);
}
};
v.setOutlineProvider(viewOutlineProvider);
}