FlowEditer temp = (FlowEditer)v;
Graphics2D g2d = (Graphics2D) temp.getGraphics();
g2d.translate(temp.getBounds().x , temp.getBounds().y);
g2d.scale(temp.getBounds().x * this.scale , temp.getBounds().y * this.scale;FlowEditer这个类是我要放大的类,我继承了JComponent
另外就是上边的参数那样写对吗?this.scale是我要放大或缩小的比例
Graphics2D g2d = (Graphics2D) temp.getGraphics();
g2d.translate(temp.getBounds().x , temp.getBounds().y);
g2d.scale(temp.getBounds().x * this.scale , temp.getBounds().y * this.scale;FlowEditer这个类是我要放大的类,我继承了JComponent
另外就是上边的参数那样写对吗?this.scale是我要放大或缩小的比例
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货