Line data Source code
1 : import 'package:mrx_icon_font_gen/parser/path/model/command_arguments.dart'; 2 : 3 : class EllipticalArcArgument extends CommandArguments { 4 : final double rx; 5 : final double ry; 6 : final double xAxisRotation; 7 : final int largeArcFlag; 8 : final int sweepFlag; 9 : final double x; 10 : final double y; 11 : 12 4 : EllipticalArcArgument({ 13 : required double rx, 14 : required double ry, 15 : required double xAxisRotation, 16 : required int largeArcFlag, 17 : required int sweepFlag, 18 : required double x, 19 : required double y, 20 8 : }) : rx = double.parse(rx.toStringAsFixed(2)), 21 8 : ry = double.parse(ry.toStringAsFixed(2)), 22 8 : xAxisRotation = double.parse(xAxisRotation.toStringAsFixed(2)), 23 4 : largeArcFlag = largeArcFlag == 0 ? 0 : 1, 24 4 : sweepFlag = sweepFlag == 0 ? 0 : 1, 25 8 : x = double.parse(x.toStringAsFixed(2)), 26 8 : y = double.parse(y.toStringAsFixed(2)); 27 : 28 3 : @override 29 : String toString() { 30 39 : return '${rx.toStringAsFixed(2)} ${ry.toStringAsFixed(2)} ${xAxisRotation.toStringAsFixed(2)} $largeArcFlag $sweepFlag ${x.toStringAsFixed(2)} ${y.toStringAsFixed(2)}'; 31 : } 32 : 33 4 : @override 34 : bool operator ==(Object other) { 35 4 : if (other is! EllipticalArcArgument) { 36 : return false; 37 : } 38 12 : return rx == other.rx && 39 12 : ry == other.ry && 40 12 : xAxisRotation == other.xAxisRotation && 41 12 : largeArcFlag == other.largeArcFlag && 42 12 : sweepFlag == other.sweepFlag && 43 12 : x == other.x && 44 12 : y == other.y; 45 : } 46 : 47 3 : @override 48 3 : int get hashCode => Object.hash( 49 3 : rx, 50 3 : ry, 51 3 : xAxisRotation, 52 3 : largeArcFlag, 53 3 : sweepFlag, 54 3 : x, 55 3 : y, 56 : ); 57 : }