Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@ private ImageHandle init(ImageData i, int zoom) {
*/
@Override
public long internal_new_GC (GCData data) {
return configureGC(data, 100);
return this.imageProvider.configureGCData(data);
}

private long configureGC(GCData data, int zoom) {
Expand Down Expand Up @@ -1854,6 +1854,10 @@ private abstract class AbstractImageProviderWrapper {

protected abstract Rectangle getBounds(int zoom);

protected long configureGCData(GCData data) {
return configureGC(data, 100);
}

public Collection<Integer> getPreservedZoomLevels() {
return Collections.emptySet();
}
Expand Down Expand Up @@ -2480,6 +2484,7 @@ private class ImageGcDrawerWrapper extends DynamicImageProviderWrapper {
private ImageGcDrawer drawer;
private int width;
private int height;
private int currentZoom = 100;

ImageGcDrawerWrapper(ImageGcDrawer imageGcDrawer, int width, int height) {
checkProvider(imageGcDrawer, ImageGcDrawer.class);
Expand All @@ -2494,13 +2499,19 @@ protected Rectangle getBounds(int zoom) {
return DPIUtil.scaleBounds(rectangle, zoom, 100);
}

@Override
protected long configureGCData(GCData data) {
return configureGC(data, currentZoom);
}

@Override
ImageData newImageData(int zoom) {
return getImageMetadata(zoom).getImageData();
}

@Override
protected ImageHandle newImageHandle(int zoom) {
currentZoom = zoom;
int gcStyle = drawer.getGcStyle();
Image image;
if ((gcStyle & SWT.TRANSPARENT) != 0) {
Expand Down
Loading