Package-level declarations
Types
Link copied to clipboard
Concrete implementation of ImagePlugin, the plugin is used to add an image to be used in the style.
Link copied to clipboard
class ImageNinePatchExtensionImpl(builder: ImageNinePatchExtensionImpl.Builder) : StyleContract.StyleImageExtension
Concrete implementation of ImagePlugin (see ImageExtensionImpl) but taking 9-patch Bitmap in order to calculate stretchX, stretchY and paddings automatically.
Link copied to clipboard
data class NinePatchImage(val internalImage: Image, val stretchX: List<ImageStretches>, val stretchY: List<ImageStretches>, val imageContent: ImageContent)
Data class describing 9-patch bitmap.
Functions
Link copied to clipboard
Extension function to add an image provided by the Style Extension to the Style.
Link copied to clipboard
Extension function to add 9-patch image provided by the Style Extension to the Style.
fun MapboxStyleManager.addImage9Patch(imageId: String, bitmap: Bitmap, scale: Float = pixelRatio, sdf: Boolean = false): Expected<String, None>
Adds an 9-patch image to be used in the style. X-stretches, Y-stretches and padding will be calculated from Bitmap.getNinePatchChunk.
Link copied to clipboard
fun image(imageId: String, bitmap: Bitmap, block: ImageExtensionImpl.Builder.() -> Unit = {}): ImageExtensionImpl
fun image(imageId: String, image: Image, block: ImageExtensionImpl.Builder.() -> Unit = {}): ImageExtensionImpl
DSL function for ImageExtensionImpl.
Link copied to clipboard
fun image9Patch(imageId: String, bitmap: Bitmap, block: ImageNinePatchExtensionImpl.Builder.() -> Unit? = null): ImageNinePatchExtensionImpl
DSL function for ImageNinePatchExtensionImpl.
Link copied to clipboard
Utility function returning NinePatchImage from a given Bitmap.