You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
was used for this purpose by specifying the full source bounds. The new method simplifies the process by eliminating the need to provide the actual image bounds when drawing the entire image.
23
+
A new `drawImage` method in `GC` allows drawing the **full image** into a specified destination rectangle:
Until now, the existing method `drawImage(image, srcX, srcY, srcWidth, srcHeight, destX, destY, destWidth, destHeight)` was used for this purpose by specifying the full source bounds. The new method simplifies the process by eliminating the need to provide the actual image bounds when drawing the entire image.
25
28
26
29
#### New vs. Existing Method
27
30
-**Existing method:** Handles scaling and cropping; requires explicit source bounds. Best suited for drawing a cropped part of the image. However, this is not a very common use case in Eclipse products, as images are mostly drawn at their full sizes.
When using the new `drawImage` method, images that can provide size-specific data (such as SVGs or images backed by `ImageDataAtSizeProvider`) are loaded at the destination size, avoiding blurry scaling.
43
+
When using the new `drawImage` method, images that can provide size-specific data (such as SVGs) are loaded at the destination size, avoiding blurry scaling.
41
44
For all other images the behavior remains the same as before _i.e._ they are loaded at the closest available zoom level.
42
45
This destination-size loading is currently only available in the new method but may be added to the existing method in the future.
0 commit comments