FitWidth

data class FitWidth(val alignment: Alignment = Alignment.Center) : Fit

Preserve aspect ratio and scale the artboard width to match the containing view's width.

If the aspect ratios between the artboard and containing view do not match, this will result in either vertical clipping or space in the vertical axis.

Parameters

alignment

The vertical alignment of the artboard within the containing view. Defaults to Alignment.Center.

Constructors

Link copied to clipboard
constructor(alignment: Alignment = Alignment.Center)

Properties

Link copied to clipboard
open override val alignment: Alignment
Link copied to clipboard
open val scaleFactor: Float = 1.0f

Default scale factor. Only relevant with Fit.Layout, but still passed when drawing or on pointer events.