怎么用java切割出不规则图形的图片
我只有这么点分了
那怎么将一张图片分割成凹凸的形状 如拼图游戏 展开
//用基本图形拼呀
import java.awt.Graphics;
import javax.swing.*;
public class IrregulaShape extends JPanel{
@Override
public void paint(Graphics g) {
super.paint(g);
g.drawRect(100, 50,100, 100);
g.drawArc(100, 25, 50, 50, 0, 180);
// g.fillRect(100, 50, 100, 100);
// g.fillOval(100, 25, 50, 50);
}
public static void main(String[] args) {
JFrame jFrame = new JFrame("不规则的!");
IrregulaShape j = new IrregulaShape();
jFrame.add(j);
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.setSize(500,500);
jFrame.setLocationRelativeTo(null);
jFrame.setVisible(true);
}