shiftPath method
Shifts the current path by a given offset x
, y
.
If modifyPreviousPaths
is true, all previous paths will also be shifted
by the same offset.
Implementation
void shiftPath(double x, double y, [bool modifyPreviousPaths = false]) {
final offset = Offset(x, y);
if (modifyPreviousPaths) {
for (var command in _drawingQueue) {
command?.path = command.path?.shift(offset);
}
} else {
_currentDrawing?.path = _currentDrawing?.path?.shift(offset);
}
}