Options

class Options(context: Context, config: Bitmap.Config, colorSpace: ColorSpace?, size: Size, scale: Scale, allowInexactSize: Boolean, allowRgb565: Boolean, premultipliedAlpha: Boolean, diskCacheKey: String?, headers: Headers, tags: Tags, parameters: Parameters, memoryCachePolicy: CachePolicy, diskCachePolicy: CachePolicy, networkCachePolicy: CachePolicy)

A set of configuration options for fetching and decoding an image. Fetchers and Decoders should respect these options as best as possible.

Constructors

Options
Link copied to clipboard
fun Options(context: Context, config: Bitmap.Config = Bitmap.Config.ARGB_8888, colorSpace: ColorSpace? = NULL_COLOR_SPACE, size: Size = Size.ORIGINAL, scale: Scale = Scale.FIT, allowInexactSize: Boolean = false, allowRgb565: Boolean = false, premultipliedAlpha: Boolean = true, diskCacheKey: String? = null, headers: Headers = EMPTY_HEADERS, tags: Tags = Tags.EMPTY, parameters: Parameters = Parameters.EMPTY, memoryCachePolicy: CachePolicy = CachePolicy.ENABLED, diskCachePolicy: CachePolicy = CachePolicy.ENABLED, networkCachePolicy: CachePolicy = CachePolicy.ENABLED)

Functions

copy
Link copied to clipboard
fun copy(context: Context = this.context, config: Bitmap.Config = this.config, colorSpace: ColorSpace? = this.colorSpace, size: Size = this.size, scale: Scale = this.scale, allowInexactSize: Boolean = this.allowInexactSize, allowRgb565: Boolean = this.allowRgb565, premultipliedAlpha: Boolean = this.premultipliedAlpha, diskCacheKey: String? = this.diskCacheKey, headers: Headers = this.headers, tags: Tags = this.tags, parameters: Parameters = this.parameters, memoryCachePolicy: CachePolicy = this.memoryCachePolicy, diskCachePolicy: CachePolicy = this.diskCachePolicy, networkCachePolicy: CachePolicy = this.networkCachePolicy): Options
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int

Properties

allowInexactSize
Link copied to clipboard
val allowInexactSize: Boolean = false
'true' if the output image does not need to fit/fill the target's dimensions exactly.
allowRgb565
Link copied to clipboard
val allowRgb565: Boolean = false
'true' if a component is allowed to use Bitmap.Config.RGB_565 as an optimization.
colorSpace
Link copied to clipboard
val colorSpace: ColorSpace?
The preferred color space for any Bitmaps.
config
Link copied to clipboard
val config: Bitmap.Config
The requested config for any Bitmaps.
context
Link copied to clipboard
val context: Context
The Context used to execute this request.
diskCacheKey
Link copied to clipboard
val diskCacheKey: String? = null
The cache key to use when persisting images to the disk cache or 'null' if the component can compute its own.
diskCachePolicy
Link copied to clipboard
val diskCachePolicy: CachePolicy
Determines if this request is allowed to read/write from/to disk.
headers
Link copied to clipboard
val headers: Headers
The header fields to use for any network requests.
memoryCachePolicy
Link copied to clipboard
val memoryCachePolicy: CachePolicy
Determines if this request is allowed to read/write from/to memory.
networkCachePolicy
Link copied to clipboard
val networkCachePolicy: CachePolicy
Determines if this request is allowed to read from the network.
parameters
Link copied to clipboard
val parameters: Parameters
A map of custom parameters.
premultipliedAlpha
Link copied to clipboard
val premultipliedAlpha: Boolean = true
'true' if the color (RGB) channels of the decoded image should be pre-multiplied by the alpha channel.
scale
Link copied to clipboard
val scale: Scale
The scaling algorithm for how to fit the source image's dimensions into the target's dimensions.
size
Link copied to clipboard
val size: Size
The requested output size for the image request.
tags
Link copied to clipboard
val tags: Tags
A map of custom objects.