}
private void clickShutter() throws ScreenShotException {
- capture();
+ Image maskImage = skin.getDisplayCanvas().getMaskImage();
+ if (maskImage != null) {
+ capture(SkinUtil.getMaskDataForImage(shell.getDisplay(), maskImage));
+ } else {
+ capture(null);
+ }
shell.getDisplay().asyncExec(new Runnable() {
@Override
});
}
- protected void capture() throws ScreenShotException {
+ protected void capture(ImageData maskData) throws ScreenShotException {
/* abstract */
}
this.palette = palette;
}
- protected void capture() throws ScreenShotException {
+ @Override
+ protected void capture(ImageData maskData) throws ScreenShotException {
logger.info("screenshot capture");
DataTranfer dataTranfer = skin.communicator.sendDataToQEMU(
imageData = getRotateImageData(imageData);
Image tempImage = imageShot;
- imageShot = new Image(Display.getDefault(), imageData);
+ if (maskData != null) {
+ imageShot = new Image(Display.getDefault(), imageData, maskData);
+ } else {
+ imageShot = new Image(Display.getDefault(), imageData);
+ }
if (tempImage != null) {
tempImage.dispose();
this.palette = palette;
}
- protected void capture() throws ScreenShotException {
+ @Override
+ protected void capture(ImageData maskData) throws ScreenShotException {
logger.info("screenshot capture");
int width = skin.getEmulatorSkinState().getCurrentResolutionWidth();
imageData = getRotateImageData(imageData);
Image tempImage = imageShot;
- imageShot = new Image(Display.getDefault(), imageData);
+ if (maskData != null) {
+ imageShot = new Image(Display.getDefault(), imageData, maskData);
+ } else {
+ imageShot = new Image(Display.getDefault(), imageData);
+ }
if (tempImage != null) {
tempImage.dispose();