0
私はいくつかの距離を追加しようとしている(例えば10pxのを)爆発し、それが成功せず、中心だが、ここで私はこれまで試したものです:のJava 2Dは、円グラフのセグメント(弧)の間円グラフセグメント
int value = 20; // example
double arcAngle = (value * 360/100);
double angle = 360 - (arcAngle/2); // direction to add the distance to (center of arc)
double newX = pieCenterX + Math.cos(angle * Math.PI/180.0) * 10;
double newY = pieCenterY + Math.sin(angle * Math.PI/180.0) * 10;
// then drawing the arc with new x and y
g.fill(new Arc2D.Double(newX, newY, bounds.getWidth(), bounds.getHeight(), startAngle, arcAngle, Arc2D.PIE));
理想的には私はそのようなもので終わる必要があります:私はTHIにアプローチする方法について多くを知らない
私のコードは他の場所にある例から抜粋したものです。
投稿[MCVE]と10pxのギャップがあるべき場所次の写真に説明.. – user1803551