DomPoint constructor

  1. @DomName('DOMPoint.DOMPoint')
  2. @DocsEditable()
DomPoint([point_OR_x, num y, num z, num w ])

Implementation

@DomName('DOMPoint.DOMPoint')
@DocsEditable()
factory DomPoint([point_OR_x, num y, num z, num w]) {
  if ((point_OR_x is Map) && y == null && z == null && w == null) {
    var point_1 = convertDartToNative_Dictionary(point_OR_x);
    return DomPoint._create_1(point_1);
  }
  if (point_OR_x == null && y == null && z == null && w == null) {
    return DomPoint._create_2();
  }
  if ((point_OR_x is num || point_OR_x == null) &&
      y == null &&
      z == null &&
      w == null) {
    return DomPoint._create_3(point_OR_x);
  }
  if ((y is num || y == null) &&
      (point_OR_x is num || point_OR_x == null) &&
      z == null &&
      w == null) {
    return DomPoint._create_4(point_OR_x, y);
  }
  if ((z is num || z == null) &&
      (y is num || y == null) &&
      (point_OR_x is num || point_OR_x == null) &&
      w == null) {
    return DomPoint._create_5(point_OR_x, y, z);
  }
  if ((w is num || w == null) &&
      (z is num || z == null) &&
      (y is num || y == null) &&
      (point_OR_x is num || point_OR_x == null)) {
    return DomPoint._create_6(point_OR_x, y, z, w);
  }
  throw new ArgumentError("Incorrect number or type of arguments");
}