| | |
| | | int ax = pX - (inviteCode.length() - 4)*13 ;
|
| | | int ay = pY + size + 118;
|
| | |
|
| | | System.out.println(inviteCode.length());
|
| | | |
| | | int ax_diap = ax;
|
| | | int width_diap = 235 + (int) (24.6 * (inviteCode.length() - 4));
|
| | | g2d.setColor(Color.white);
|
| | | // 画出一个矩形
|
| | | g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, 0.5f)); // 透明度 |
| | | g2d.fillRect(ax_diap, ay - 38, width_diap, 50);
|
| | | g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, 0.65f)); // 透明度 |
| | | g2d.fillRect(ax, ay - 38, width_diap, 50);
|
| | | // 前半圆
|
| | | g2d.fillArc(ax_diap - 25, ay- 38, 50, 50, 90, 180);
|
| | | g2d.fillArc(ax - 25, ay- 38, 50, 50, 90, 180);
|
| | | // 后半圆
|
| | | g2d.fillArc(ax_diap + width_diap - 25, ay- 38, 50, 50, 270, 180);
|
| | | g2d.fillArc(ax + width_diap - 25, ay- 38, 50, 50, 270, 180);
|
| | |
|
| | | g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 1f));
|
| | | String st = "邀请码:" + inviteCode;
|