copy method

  1. @override
Shape copy(
  1. Curve source
)
override

Copies another name object to this instance.

Implementation

@override
Shape copy(source){
  if(source is Shape){
    super.copy(source);

    holes = [];
    for (int i = 0, l = source.holes.length; i < l; i++) {
      final hole = source.holes[i];
      holes.add(hole.clone() as Shape);
    }
  }

  return this;
}