drawArc奇怪的行为

时间:2017-02-23 20:24:36

标签: android drawing draw

代码:

int width = canvas.getWidth();
int height = canvas.getHeight();

int shift = 0;
RectF rect = new RectF(0 + shift, 0 + shift, width - 1 - shift, height - 1 - shift);

Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(30);
paint.setColor(0xff009900);

float angle_step = 180 / 5;

for (int i=0; i<5; i++) {
  canvas.drawArc(rect, 180 + angle_step * i, angle_step, true, paint);
}

结果:

问题: 如何使内部笔划而不是外部?

由于

0 个答案:

没有答案