android-components / mozilla.components.browser.icons / DesiredSize

DesiredSize

data class DesiredSize (source)

Represents the desired size of an icon loaded by BrowserIcons.

Constructors

Name Summary
<init> DesiredSize(targetSize: Int, maxSize: Int, maxScaleFactor: Float)
Represents the desired size of an icon loaded by BrowserIcons.

Properties

Name Summary
maxScaleFactor val maxScaleFactor: Float
The factor that the image can be scaled up before being thrown out. A lower scale factor results in less pixelation.
maxSize val maxSize: Int
The maximum size of an image before it will be thrown out, in pixels. Extremely large images are suspicious and should be ignored.
targetSize val targetSize: Int
The size the image will be displayed at, in pixels.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.