Skip to content

Commit 06359c0

Browse files
committed
Update PGraphicsAndroid2D.java
fix some type error
1 parent 867b5df commit 06359c0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/src/processing/core/PGraphicsAndroid2D.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)