The bitmaps produced through the Copy to Clipboard and Export Image features have the same resolution as the image in the editor. While this resolution is appropriate for use within the tool, it can lead to a pixelated look when the images are integrated as figures in other applications.
This feature is to add an option to scale the image x4 before exporting it. We can do this by applying a transform to Canvas#snapshot as follows:
SnapshotParameters spa = new SnapshotParameters();
spa.setTransform(Transform.scale(HIGH_DPI_SCALE_FACTOR, HIGH_DPI_SCALE_FACTOR));
canvas.snapshot(spa, image);
It's important that this is optional because the export function will take perceptibly longer, and the resulting images will be larger.
Thanks to Gabriel Cormier-Affleck for suggesting this feature and the implementation strategy.
The bitmaps produced through the Copy to Clipboard and Export Image features have the same resolution as the image in the editor. While this resolution is appropriate for use within the tool, it can lead to a pixelated look when the images are integrated as figures in other applications.
This feature is to add an option to scale the image x4 before exporting it. We can do this by applying a transform to
Canvas#snapshot
as follows:It's important that this is optional because the export function will take perceptibly longer, and the resulting images will be larger.
Thanks to Gabriel Cormier-Affleck for suggesting this feature and the implementation strategy.