void drawFiboArc(xGraphics g, stTrendLine t) { uint color = t.color;// Constants.COLOR_FIBO_DOT_LINE2; // blue g.setColor(color); float[] percent = { 23.6f, 38.2f, 50.0f, 61.8f, 100f, 161.8f }; String[] txt = { "23.6", "38.2", "50", "61.8", "100", "161.8" }; int y = 0; double R = (t.x[0] - t.x[1]) * (t.x[0] - t.x[1]) + (t.y[0] - t.y[1]) * (t.y[0] - t.y[1]); R = Math.Sqrt(R); int r; g.setColor(color); for (int i = 0; i < percent.Length; i++) { r = (int)(R * percent[i]) / 100; if (i == 4) { g.drawArc(t.x[0], t.y[0], r, 0f, 360); } else { g.drawArcDot(t.x[0], t.y[0], r, 0f, 360); } g.drawString(mFont, txt[i], t.x[0] - r, t.y[0]); } }