SpatialSmoothFeatheringSize

interface SpatialSmoothFeatheringSize


Defines a feathering size based on the percent width and height of the layout.

Summary

Public functions

Float
toHeightPercent(pixels: Float, density: Density)

Edge feathering based on percent width of the canvas.

Float
toWidthPercent(pixels: Float, density: Density)

Edge feathering based on percent width of the canvas.

Public functions

toHeightPercent

Added in 1.0.0-alpha04
fun toHeightPercent(pixels: Float, density: Density): Float

Edge feathering based on percent width of the canvas.

Parameters
pixels: Float

Height of canvas in pixels.

density: Density

The current density of the screen.

Returns
Float

A percent in the range of 0 - 0.5f.

toWidthPercent

Added in 1.0.0-alpha04
fun toWidthPercent(pixels: Float, density: Density): Float

Edge feathering based on percent width of the canvas.

Parameters
pixels: Float

Width of canvas in pixels.

density: Density

The current density of the screen.

Returns
Float

A percent in the range of 0 - 0.5f.