- Image consensus = nullFrame.createImage(fullsizeWidth, 60);\r
- Graphics g = consensus.getGraphics();\r
- ap.annotationPanel.drawGraph(g, av.conservation, fullsizeWidth, 60);\r
- mg.drawImage(consensus, 0, sequencesHeight, width,\r
- sequencesHeight + graphHeight, 0, 0, fullsizeWidth, 60, this);\r
-\r
-\r
- boolean oldRenderGaps = av.renderGaps;\r
- try{\r
- // We'll have to draw the full size alignment in chunks, as an image of the\r
- // whole alignment requires too much memory\r
-\r
- // Max size depends on the font size, the following is a\r
- // guess at a size which works\r
- int maxSize = 2000 / av.getFont().getSize();\r
- Image block;\r
- int blockx=0, blocky=0, blockw=0, blockh=0, eRes=0, eSeq=0;\r
-\r
- av.setRenderGaps(false);\r
- for(int sRes=0, chunkx=0; sRes<alwidth; sRes+=maxSize, chunkx++)\r
- {\r
- eSeq = 0;\r
- eRes+=maxSize;\r
- if(eRes>alwidth)\r
- eRes = alwidth;\r
-\r
- for(int sSeq=0, chunky=0; sSeq<alheight; sSeq+=maxSize, chunky++)\r
- {\r
- eSeq+=maxSize;\r
- if(eSeq>alheight)\r
- eSeq = alheight;\r
-\r
- blocky = 0;\r
- blockx = (int)((float)sRes/(float)alwidth * width);\r
-\r
- block = nullFrame.createImage((eRes-sRes)*av.charWidth, (eSeq-sSeq)*av.charHeight);\r
- g = block.getGraphics();\r