简体   繁体   中英

Crop an android canvas drawArc

I try to create a custom widget and I have problem. I create an half circle with canvas.drawArc for create this:

裁剪圆圈
but the size of my widget is the square of arc.

Is it possible to crop widget size to take only the size of my half circle?

Thanks for your help.

I find my problem :

the call of setMeasuredDimension() is with bad dimension.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM