PsdPlacedTransform.fromList constructor

PsdPlacedTransform.fromList({
  1. required List<double> values,
})

Creates transform coordinates from the eight stored values.

Implementation

factory PsdPlacedTransform.fromList({required List<double> values}) {
  if (values.length != 8) {
    throw ArgumentError.value(values.length, 'values.length', 'must be eight');
  }
  return PsdPlacedTransform(
    topLeftX: values[0],
    topLeftY: values[1],
    topRightX: values[2],
    topRightY: values[3],
    bottomRightX: values[4],
    bottomRightY: values[5],
    bottomLeftX: values[6],
    bottomLeftY: values[7],
  );
}