In SWT, in Image's init method (line number 2003), there's a check for transparency which initializes an icon. There can be icons which are not transparent. In that case scaling them would not be possible since the init method is also used by the scaling method win32_getHandle.
The icon for the shell in the top right corner is set by setImages method in Decorations whoch specifically calls a method Display.createIcon which is identical to the block in init in Image (line no. 2003). Now that we have added the functionality of scaling to images. A non-transparent image created by createIcon method is unable to be scaled up using the win32_gethandle method since it doesn't end up in the block. Hence, adding an additional check for image.type == SWT.ICON lets it enter the block and scaled up properly.
We need to discuss on this topic and find out whats necessary.
Also, Display.CreateIcon can be Image.createIcon since we want to create an icon from the Image and also since we allow Display to do certain things by using some public fields in the image, it makes the icon incompatible to be scaled properly by the getHandle method.
In SWT, in Image's init method (line number 2003), there's a check for transparency which initializes an icon. There can be icons which are not transparent. In that case scaling them would not be possible since the init method is also used by the scaling method win32_getHandle.
The icon for the shell in the top right corner is set by setImages method in Decorations whoch specifically calls a method Display.createIcon which is identical to the block in init in Image (line no. 2003). Now that we have added the functionality of scaling to images. A non-transparent image created by createIcon method is unable to be scaled up using the win32_gethandle method since it doesn't end up in the block. Hence, adding an additional check for image.type == SWT.ICON lets it enter the block and scaled up properly.
We need to discuss on this topic and find out whats necessary.
Also, Display.CreateIcon can be Image.createIcon since we want to create an icon from the Image and also since we allow Display to do certain things by using some public fields in the image, it makes the icon incompatible to be scaled properly by the getHandle method.