Community
Participate
Working Groups
Build Identifier: This appears to be a bug in SWT on a Mac. If you have an image that is being drawn on a Canvas, and the image changes, then calling the scaling gc.drawImage () call does not update the Canvas. No SWTError or Exceptions are thrown. Here is an example of the call: gc.drawImage (offscreenImage, 0, 0, imageSize.width, imageSize.height, 0, 0, smallerWidth, smallerHeight); Attached is a small sample that illustrates the problem. The sample is a little convoluted because whenever you draw into an Image object you have to be very careful not to read and write to the image at the same time, hence the MUTEX object. To demonstrate the problem, resize the canvas. If the canvas is larger than 400x400, then the image will change every second. If it gets smaller than the 400x400 then the image stops being updated. An additional note: if you change the source width and height slightly in the drawImage call, then this problem goes away. i.e. add "-1" to imageSize.width in the drawImage call. I tested this in carbon 3.4 and 3.5 and cocoa 3.6, this sample work well. But in carbon 3.6.1, it does not work. Reproducible: Always Steps to Reproduce: 1. Download Attached sample depending on swt-3.6.1-carbon-macosx. 2. Run MainApp.java in Java application. 3. Change shell size. If the shell is larger than 400x400, then the image will change every second. If it gets smaller than the 400x400 then the image stops being updated.
Created attachment 184089 [details] Sample code
Carbon is not being updated for 3.7. As this works in Cocoa I'm closing as WONTFIX.