Package org.eclipse.swt.graphics
Interface ImageGcDrawer
- All Known Implementing Classes:
TransparencyColorImageGcDrawer
public interface ImageGcDrawer
Interface to provide a callback mechanism to draw on different GC instances
depending on the zoom the image will be used for. A common use case is when
the application is moved from a low DPI monitor to a high DPI monitor. This
provides API which will be called by SWT during the image rendering.
This interface needs to be implemented by client code to provide logic that
draws on the empty GC on demand.
- Since:
- 3.129
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Draws an image on a GC for a requested zoom level.default void
postProcess
(ImageData imageData) Executes post processing on ImageData.
-
Method Details
-
drawOn
Draws an image on a GC for a requested zoom level.- Parameters:
gc
- The GC will draw on the underlying Image and is configured for the targeted zoomimageWidth
- The width of the image in points to draw onimageHeight
- The height of the image in points to draw on
-
postProcess
Executes post processing on ImageData. This method will always be called afterdrawOn
and contain the resulting ImageData.- Parameters:
imageData
- The resulting ImageData afterdrawOn
was called
-