How to draw a circle with a transparent middle

后端 未结 1 1595
天涯浪人
天涯浪人 2021-02-12 04:26

I am trying to draw a white circle with the following code:

mPaint.setColor(0xFFFFFFFF);
canvas.drawCircle(x, y, radius, mPaint);

But it is bei

1条回答
  •  悲哀的现实
    2021-02-12 05:26

    I suspect you want:

    mPaint.setStyle(Paint.Style.STROKE);
    

    so that it doesn't do the filling. But then again, I've never used the Android API - this is really just a guess based on the docs :)

    0 讨论(0)
提交回复
热议问题