ResourceBuilders.InlineImageResource.Builder

Added in 1.0.0
Deprecated in 1.2.0

class ResourceBuilders.InlineImageResource.Builder


Builder for InlineImageResource

Summary

Public constructors

Public functions

ResourceBuilders.InlineImageResource

Builds an instance from accumulated values.

ResourceBuilders.InlineImageResource.Builder

Sets the byte array representing the image.

ResourceBuilders.InlineImageResource.Builder
setFormat(format: Int)

Sets the format of the byte array data representing the image.

ResourceBuilders.InlineImageResource.Builder
setHeightPx(heightPx: @Dimension(unit = 1) Int)

Sets the native height of the image, in pixels.

ResourceBuilders.InlineImageResource.Builder
setWidthPx(widthPx: @Dimension(unit = 1) Int)

Sets the native width of the image, in pixels.

Public constructors

Builder

Added in 1.0.0
Deprecated in 1.2.0
Builder()

Public functions

build

Added in 1.0.0
Deprecated in 1.2.0
fun build(): ResourceBuilders.InlineImageResource

Builds an instance from accumulated values.

setData

Added in 1.0.0
Deprecated in 1.2.0
fun setData(data: ByteArray): ResourceBuilders.InlineImageResource.Builder

Sets the byte array representing the image.

setFormat

Added in 1.0.0
Deprecated in 1.2.0
fun setFormat(format: Int): ResourceBuilders.InlineImageResource.Builder

Sets the format of the byte array data representing the image. May be left unspecified or set to IMAGE_FORMAT_UNDEFINED in which case the platform will attempt to extract this from the raw image data. If the platform does not support the format, the image will not be decoded or displayed.

setHeightPx

Added in 1.0.0
Deprecated in 1.2.0
fun setHeightPx(heightPx: @Dimension(unit = 1) Int): ResourceBuilders.InlineImageResource.Builder

Sets the native height of the image, in pixels. Only required for formats (e.g. IMAGE_FORMAT_RGB_565) where the image data does not include size.

setWidthPx

Added in 1.0.0
Deprecated in 1.2.0
fun setWidthPx(widthPx: @Dimension(unit = 1) Int): ResourceBuilders.InlineImageResource.Builder

Sets the native width of the image, in pixels. Only required for formats (e.g. IMAGE_FORMAT_RGB_565) where the image data does not include size.