StyleImage

data class StyleImage(val imageId: String, val image: Image, val scale: Float? = null, val sdf: Boolean = false, val stretchX: List<ImageStretches> = listOf(), val stretchY: List<ImageStretches> = listOf(), val content: ImageContent? = null)

Style image to used with runtime styling.

Parameters

imageId

the id of the image

image

pixel data of the image

scale

scale factor for the image

sdf

option to treat whether image is SDF(signed distance field) or not

stretchX

An array of two-element arrays, consisting of two numbers that represent the from position and the to position of areas that can be stretched horizontally.

stretchY

An array of two-element arrays, consisting of two numbers that represent the from position and the to position of areas that can be stretched vertically.

content

An array of four numbers, with the first two specifying the left, top corner, and the last two specifying the right, bottom corner. If present, and if the icon uses icon-text-fit, the symbol's text will be fit inside the content box.

Constructors

Link copied to clipboard
fun StyleImage(imageId: String, image: Image, scale: Float? = null, sdf: Boolean = false, stretchX: List<ImageStretches> = listOf(), stretchY: List<ImageStretches> = listOf(), content: ImageContent? = null)

Properties

Link copied to clipboard
val content: ImageContent? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val scale: Float? = null
Link copied to clipboard
val sdf: Boolean = false
Link copied to clipboard
Link copied to clipboard