fromValue static method

NSViewLayerContentsPlacement fromValue(
  1. int value
)

Implementation

static NSViewLayerContentsPlacement fromValue(int value) => switch (value) {
  0 => NSViewLayerContentsPlacementScaleAxesIndependently,
  1 => NSViewLayerContentsPlacementScaleProportionallyToFit,
  2 => NSViewLayerContentsPlacementScaleProportionallyToFill,
  3 => NSViewLayerContentsPlacementCenter,
  4 => NSViewLayerContentsPlacementTop,
  5 => NSViewLayerContentsPlacementTopRight,
  6 => NSViewLayerContentsPlacementRight,
  7 => NSViewLayerContentsPlacementBottomRight,
  8 => NSViewLayerContentsPlacementBottom,
  9 => NSViewLayerContentsPlacementBottomLeft,
  10 => NSViewLayerContentsPlacementLeft,
  11 => NSViewLayerContentsPlacementTopLeft,
  _ => throw ArgumentError('Unknown value for NSViewLayerContentsPlacement: $value'),
};