vi-eclipse / Eclipse-Platform

Umbrella repository for managing a backlog of features/issues related to the Eclipse Platform
2 stars 0 forks source link

Add ImageDrawingProvider interface for Images #143

Open akoch-yatta opened 2 weeks ago

akoch-yatta commented 2 weeks ago

Currently some custom-drawing image scenarios (e.g. in CTabFolder) are solved via ImageDataProvider. Problem with that is, that in the provider another image is created to draw the image and retrieve the ImageData. As there is no way in the current API to pass the zoom from getImageData() into a new image, this use case should be convered by another interface. This interface will look like

public interface ImageDrawingProvider {
    void drawImage(GC gc);

the GC that is passed to the method will be preconfigured with the correct zoom.

The implementation must be done for the win32, gtk and cocoa implementation. Most of the code should be added to the common package, but the Image implementation must be provided for all three variants