Ale*_* K. 5 java swt image eclipse-rcp
在我的eclipse-rcp应用程序中,我需要创建尺寸为30000x10000像素或更高的图像.此图像是NatTable表示.使用标准的图像创建方法,它失败了不同的问题:OutOfMemory,SWTError - IllegalArgument或我的电脑停止响应(顺便说一句,它的Windows 7,64位,4 RAM - 客户端有更慢的笔记本电脑,但仍然需要创建图片) .这是一段代码:
private Image getNattableImageRepresentation(final Display display) {
final Rectangle totalGridArea = getTotalGridArea(); //this returns Rectangle(0,0,30000,10000)
setGridLayerSize(totalGridArea);
final Image nattableImage = new Image(display, totalGridArea);
final GC nattableGC = new GC(nattableImage);
gridLayer.getLayerPainter().paintLayer(gridLayer, nattableGC, 0, 0, totalGridArea, configRegistry);//nattable API, which draws an image into a specified gc
restoreGridLayerState();
return nattableImage;
}
return null;
}
Run Code Online (Sandbox Code Playgroud)
是否有任何技巧来创建如此巨大的图像或可能是API?Java Advanced Imaging Api适用于此目的吗?
任何建议表示赞赏.
归档时间: |
|
查看次数: |
766 次 |
最近记录: |