clamp method
Clamps the extent to the given bounds.
Implementation
Brush2DExtent clamp(Rect bounds) {
return Brush2DExtent(
x.clamp(bounds.left, bounds.right),
y.clamp(bounds.top, bounds.bottom),
);
}
Clamps the extent to the given bounds.
Brush2DExtent clamp(Rect bounds) {
return Brush2DExtent(
x.clamp(bounds.left, bounds.right),
y.clamp(bounds.top, bounds.bottom),
);
}