Saving SwtChart as an Image file Problem
Status: Beta
Brought to you by:
yoshitaka
Hello Guys,
private void createImageFile(Composite composite){
Image image = new Image(Display.getDefault(), composite.getBounds().width, composite.getBounds().height);
ImageLoader loader = new ImageLoader();
GC gc = new GC(image);
gc.setTransform(tr);
sc.print(gc);
tr.dispose();
gc.dispose();
loader.data = new ImageData[]{image.getImageData()};
loader.save("C:\\Users\\na35732\\Desktop\\out.png", SWT.IMAGE_PNG);
System.out.println("Image is generated");
}
The above Function is able to generate the image file, But in the image the legends are missing.
Can you please Help me to solve this probelm?
Thanks,
Praveen.
You can see the missing legends in the attached image
seems to be the same root cause as bug #26