Package-level declarations

Contains the touch gesture capable bitmap view and the gesture detectors used to recognize rotation gestures performed with two fingers, reporting angle variations, pivot points and angular velocity to registered listeners.

It also defines ImageSource, the provider of large images that are decoded one region at a time at a reduced resolution, so that they can be displayed without loading them fully into memory. ImageSources creates such sources from drawable resources, assets, files, content URIs or encoded bytes, while BitmapImageSource wraps a bitmap that is already held in memory.

GestureBitmapView decodes such images in several resolutions (a preview, cached levels and a detail patch for the visible region) and exposes setImageSource, setImageResource, setImageUri, setImageFile, regionDecodingEnabled, hardwareBitmapsEnabled, cachedLevelsMemoryBudget and imageLoadListener to control it. invalidateImage(region) refreshes the image after its contents change, imageOverlayDrawer draws on top of it in image pixels and mapViewToImage converts view coordinates into image pixels.

Types

Link copied to clipboard

ImageSource backed by a bitmap that is held whole in memory.

Link copied to clipboard
class GestureBitmapView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : View

View used to display a bitmap allowing gestures to change view zooming, panning and rotation.

Link copied to clipboard

Provider of the pixels of a large image, which can be decoded one region at a time.

Link copied to clipboard

Factories of ImageSource instances backed by an encoded image (JPEG, PNG or WebP) that is decoded one region at a time.

Link copied to clipboard

Raised if provided matrix does not represent a valid metric transformation.

Link copied to clipboard
data class MetricTransformationParameters(var scale: Double = 1.0, var rotationAngle: Double = 0.0, var horizontalTranslation: Double = 0.0, var verticalTranslation: Double = 0.0) : Serializable

Contains parameters defining a 2D metric transformation.

Link copied to clipboard

ImageSource that decodes regions of an encoded image (JPEG, PNG or WebP) using a BitmapRegionDecoder, so the whole image never needs to be held in memory.

Link copied to clipboard

Gesture detector to handle rotation gestures with two fingers.