@@ -771,22 +771,22 @@ protected void arcImpl(float x, float y, float w, float h,
771771 float centerX = rect .centerX ();
772772 float centerY = rect .cenerY ();
773773
774- float startX = (float ) (halfWidth * Math .cos (Math .toRadians (start ))) + centerX ;
775- float startY = (float ) (halfHeight * Math .sin (Math .toRadians (start ))) + centerY ;
776- float endX = (float ) (halfWidth * Math .cos (Math .toRadians (endAngle ))) + centerX ;
777- float endY = (float ) (halfHeight * Math .sin (Math .toRadians (endAngle ))) + centerY ;
774+ float startX = (float ) (halfRectWidth * Math .cos (Math .toRadians (start ))) + centerX ;
775+ float startY = (float ) (halfRectHeight * Math .sin (Math .toRadians (start ))) + centerY ;
776+ float endX = (float ) (halfRectWidth * Math .cos (Math .toRadians (endAngle ))) + centerX ;
777+ float endY = (float ) (halfRectHeight * Math .sin (Math .toRadians (endAngle ))) + centerY ;
778778
779779 if (fill ){
780780 // draw the fill arc
781781 canvas .drawArc (rect ,start ,sweep ,false ,fillPaint );
782782 // draw the arc round border
783- canvas .drawAcr (rect ,start ,sweep ,false ,strokePaint );
783+ canvas .drawArc (rect ,start ,sweep ,false ,strokePaint );
784784 // draw the straight border
785785 canvas .drawLine (startX ,startY ,endX ,endY ,strokePaint );
786786 }
787787 if (stroke ) {
788788 // draw the arc
789- canvas .drawAcr (rect ,start ,sweep ,false ,strokePaint );
789+ canvas .drawArc (rect ,start ,sweep ,false ,strokePaint );
790790 // draw the straight border
791791 canvas .drawLine (startX ,startY ,endX ,endY ,strokePaint );
792792 }
0 commit comments