protected abstract class CompositeImageDescriptor.CachedImageDataProvider extends Object implements ImageDataProvider
ImageDataProvider
that caches the most recently returned
ImageData
object. I.e. consecutive calls to
ImageDataProvider.getImageData(int)
with the same zoom level are cheap.CompositeImageDescriptor.createCachedImageDataProvider(Image)
,
CompositeImageDescriptor.createCachedImageDataProvider(ImageDescriptor)
Modifier | Constructor and Description |
---|---|
protected |
CachedImageDataProvider() |
Modifier and Type | Method and Description |
---|---|
int |
computeInPoints(ToIntFunction<ImageData> function)
Returns a computed value in SWT logical points.
|
int |
getHeight()
Returns the
ImageData.height in points. |
int |
getWidth()
Returns the
ImageData.width in points. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getImageData
public int getWidth()
ImageData.width
in points. This method must only
be called within the dynamic scope of a call to
CompositeImageDescriptor.drawCompositeImage(int, int)
.public int getHeight()
ImageData.height
in points. This method must only
be called within the dynamic scope of a call to
CompositeImageDescriptor.drawCompositeImage(int, int)
.public int computeInPoints(ToIntFunction<ImageData> function)
CompositeImageDescriptor.drawCompositeImage(int, int)
.function
- a function that takes an ImageData
and computes a
value in pixels
Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.