WeightNode

data class WeightNode(val weight: Float, val child: PdfNode) : PdfNode

Wrapper that gives child a fractional share of the parent container's remaining space along the main axis.

Inside a RowNode the weight applies to width: every weighted child receives (weight / sumOfWeights) × (rowWidth − fixedWidth). Inside a ColumnNode the weight applies to height in exactly the same way. The minimum sensible weight is 1f; values smaller than 1f are still honoured proportionally.

Constructors

Link copied to clipboard
constructor(weight: Float, child: PdfNode)

Properties

Link copied to clipboard
Link copied to clipboard