ImageFactory

actual interface ImageFactory

Factory for delegating construction of bitmap images. WorldWind shapes configured with a ImageFactory construct their bitmaps lazily, typically when the shape becomes visible on screen.

Inheritors

expect interface ImageFactory

Factory for delegating construction of images. WorldWind shapes configured with a ImageFactory construct their images lazily, typically when the shape becomes visible on screen.

Inheritors

actual interface ImageFactory

Factory for delegating construction of images. iOS variant returns UIImage? so the existing ImageDecoder.decodeUIImage pipeline can convert it into RGBA bytes for GL upload. Apps that need raw bytes should still wrap into a UIImage (cheap on iOS).

Inheritors

actual interface ImageFactory

Factory for delegating construction of images. WorldWind shapes configured with a ImageFactory construct their images lazily, typically when the shape becomes visible on screen.

Inheritors

actual interface ImageFactory

Factory for delegating construction of images. WorldWind shapes configured with a ImageFactory construct their images lazily, typically when the shape becomes visible on screen.

Inheritors

Properties

isRunBlocking
Link copied to clipboard

Bitmap factory runs asynchronously by default, but this behavior can be changed by overriding current attribute.

Image factory runs asynchronously by default, but this behavior can be changed by overriding current attribute.

Functions

Link copied to clipboard
abstract suspend fun createBitmap(): Bitmap?

Returns the bitmap associated with this factory. This method may be called more than once and may be called from a non-UI thread. Each invocation must return a bitmap with equivalent content, dimensions and configuration. Any side effects applied to the WorldWind scene by the factory must be executed on the main thread.
The factory must not retain any reference to the returned bitmap and must not attempt to recycle the bitmap.

createImage
Link copied to clipboard
abstract suspend fun createImage(): UIImage?
abstract suspend fun createImage(): BufferedImage?

Returns the image associated with this factory. This method may be called more than once and may be called from a non-UI thread. Each invocation must return an image with equivalent content, dimensions and configuration. Any side effects applied to the WorldWind scene by the factory must be executed on the main thread.

abstract suspend fun createImage(): TexImageSource?

Returns the image associated with this factory. This method may be called more than once and may be called from a non-UI thread. Each invocation must return an image with equivalent content, dimensions and configuration. Any side effects applied to the WorldWind scene by the factory must be executed on the main thread.