Poly Image
class PolyImage @JvmOverloads constructor(val resourcePath: String, val type: PolyImage.Type = from(resourcePath)) : Resource
Image representation in PolyUI. The image is lazily-loaded from the resourcePath.
Parameters
resource Path
the path to the resource
type
the image type. This is automatically inferred from the file extension normally, but you can manually select it.
Types
Link copied to clipboard
Styles for Google Material icons
Link copied to clipboard
Types for images in PolyUI.
Properties
Functions
Link copied to clipboard
load the given resource synchronously into a new byte array. you may then perform any operations on the result.
inline fun <T> load(errorHandler: (Throwable) -> T & Any = { throw it }, mapper: (ByteArray) -> T & Any): T
load the given resource synchronously, mapping to definitely non-nullable type T. you may then perform any operations on the result.
Link copied to clipboard
return the stream of this resource. it is the caller's responsibility to close the stream.