pushData method
Push a GraphicsDrawingData into the commands list.
This way you can use the low level APIs as you please.
When set asCurrent
to true
, it will be used as the current
GraphicsDrawingData and you can keep modifying the internal path
with Graphics commands.
This should be used only if you are operating with Path and Paint
directly.
x
and y
can shift the Path coordinates.
Implementation
void pushData(
GraphicsDrawingData data, [
bool asCurrent = false,
double? x,
double? y,
]) {
if (x != null && y != null && data.path != null) {
data.path = data.path!.shift(Offset(x, y));
}
_drawingQueue.add(data);
if (asCurrent) {
_currentDrawing = data;
}
}