Replies: 3 comments 8 replies
|
A problem I've discovered relates to the parent Shell shell = new Shell();
GraphicalViewerImpl viewer = new GraphicalViewerImpl();
viewer.createControl(shell);
// (Set EditPartFactory and Root EditPart here)
LayerManager layerManager = LayerManager.Helper.find(viewer);
IFigure figure = layerManager.getLayer(LayerConstants.PRINTABLE_LAYERS);
ImagePrintFigureOperation op = new ImagePrintFigureOperation(shell, figure);
Image image = op.run();I've been disposing of that This means that the If the Image is short-lived (for example saving it to file) this is not a problem as the Shell can be disposed after saving the Image, but if the Image is long-lived, as we do in Archi when creating hundreds of Gallery thumbnails of diagrams, this is a problem. |
|
Thanks for your insights.
How could that be done? I tried a few things but keep coming back to your solution with the provider. The actual problem behind all of this is text clipping in Figures in Images only on Windows. If the text clipping could be solved that would be great. To be clear, in Archi we have the following use cases:
|


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I've opened this discussion as one central place to discuss issues around using
ImagePrintFigureOperationas some problems are related to SWT and also because the Pull Requests here are getting cluttered with side issues (brought up by me) and this information is scattered in Issues and PRs.Just a reminder that the reason that
ImagePrintFigureOperationwas created was to solve the problem of clipped text when creating an Image from a Figure.For reference:
#1001
#1148
All reactions