clip property
Returns the current drawing clip.
Implementation
@override
PRectangle? get clip => _clip;
Sets the drawing clip.
Implementation
@override
set clip(PRectangle? clip) {
if (clip == null) {
if (_clip != null) {
var rect = Path2D()..rect(0, 0, width, height);
_setClipGlobal(rect);
_clip = null;
}
} else {
if (_clip != clip) {
var clipPath = clip.asPath2D;
_setClipGlobal(clipPath);
_clip = clip;
}
}
}