admin:huo123456@qq
2019-01-21 d42cb45f8fc0932e9a0766f98c445635a85b22d3
修改
2个文件已修改
26 ■■■■ 已修改文件
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/MyFileAction.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/actions/MyFileAction.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/MyFileAction.class
Binary files differ
gx_tieta/src/com/fgkj/actions/MyFileAction.java
@@ -378,19 +378,21 @@
            //System.out.println("font_size:"+font_size+"   note_size:"+note_size+"  buffImg.getWidth():"+buffImg.getWidth());
            if(note_size<buffImg.getWidth()) {
                 g.drawString(note,  0 , font_size*6);
            }else {
                for (int i = 0; i <=note_size/buffImg.getWidth(); i++) {
                    if(i==0) {
                        g.drawString(note.substring( 0,buffImg.getWidth()/font_size*(i+1) ),  0 , font_size*(5+i+1));
                    }else {
                        if(i==note_size/buffImg.getWidth()) {
                            g.drawString(note.substring( buffImg.getWidth()/font_size*(i),(note.length()) ), 0 , font_size*(5+i+1));
                        }else{
                            g.drawString(note.substring( buffImg.getWidth()/font_size*(i),buffImg.getWidth()/font_size*(i+1) ), 0 , font_size*(5+i+1));
                        }
                    }
                }
            }
            for (int i = 0; i <=note_size/buffImg.getWidth(); i++) {
                if(i==0) {
                    g.drawString(note.substring( 0,buffImg.getWidth()/font_size*(i+1) ),  0 , font_size*(5+i+1));
                }else {
                    if(i==note_size/buffImg.getWidth()) {
                        g.drawString(note.substring( buffImg.getWidth()/font_size*(i),(note.length()) ), 0 , font_size*(5+i+1));
                    }else{
                        g.drawString(note.substring( buffImg.getWidth()/font_size*(i),buffImg.getWidth()/font_size*(i+1) ), 0 , font_size*(5+i+1));
                    }
                }
            }
            // 9、释放资源
            g.dispose();
            // 10、生成图片