StoryAreaPosition constructor
const
StoryAreaPosition({
- @JsonKey.new(name: 'x_percentage') required double xPercentage,
- @JsonKey.new(name: 'y_percentage') required double yPercentage,
- @JsonKey.new(name: 'width_percentage') required double widthPercentage,
- @JsonKey.new(name: 'height_percentage') required double heightPercentage,
- @JsonKey.new(name: 'rotation_angle') required double rotationAngle,
- @JsonKey.new(name: 'corner_radius_percentage') required double cornerRadiusPercentage,
Creates a new StoryAreaPosition object.
Implementation
const factory StoryAreaPosition({
/// The abscissa of the area's center, as a percentage of the media width
@JsonKey(name: 'x_percentage') required double xPercentage,
/// The ordinate of the area's center, as a percentage of the media height
@JsonKey(name: 'y_percentage') required double yPercentage,
/// The width of the area's rectangle, as a percentage of the media width
@JsonKey(name: 'width_percentage') required double widthPercentage,
/// The height of the area's rectangle, as a percentage of the media height
@JsonKey(name: 'height_percentage') required double heightPercentage,
/// The clockwise rotation angle of the rectangle, in degrees; 0-360
@JsonKey(name: 'rotation_angle') required double rotationAngle,
/// The radius of the rectangle corner rounding, as a percentage of the media width
@JsonKey(name: 'corner_radius_percentage')
required double cornerRadiusPercentage,
}) = _StoryAreaPosition;