copyFrom method
Copies the drawing data from the other
, Graphics object.
If deepClone
is true, it performs a deep clone of the drawing data,
otherwise, it performs a shallow clone.
Implementation
void copyFrom(Graphics other, [bool deepClone = false]) {
_drawingQueue.clear();
for (final command in other._drawingQueue) {
_drawingQueue.add(command!.clone(deepClone, deepClone));
}
mask = other.mask;
alpha = other.alpha;
_currentDrawing = other._currentDrawing?.clone();
}